This article explains the concepts of synchronous vs. asynchronous execution, blocking vs. non‑blocking operations, user and kernel space, process switching, file descriptors, cache I/O, and compares various Linux I/O models such as select, poll, epoll, signal‑driven and asynchronous I/O.
This article explains the differences between synchronous and asynchronous execution, blocking and non‑blocking operations, user and kernel space, process switching, file descriptors, cache I/O, and compares various I/O models—including blocking, non‑blocking, multiplexing, signal‑driven, and asynchronous—while highlighting the characteristics of select, poll, and epoll.
This article explains fundamental concepts of streams, I/O operations, blocking and non‑blocking behavior, compares blocking wait with busy polling, and then details five practical solutions—including multithreading, select, and epoll—while presenting Linux epoll API usage, code examples, and a comprehensive overview of seven common server concurrency models.
This article explains server‑side network concurrency models, the fundamentals of streams and I/O operations, compares blocking and non‑blocking approaches, and details practical solutions such as multithreading, busy‑polling, select and epoll with code examples and performance analysis.
This article explains the structure and operation of Linux timerfd, covering its representation in /proc, the timerfd_create/settime/gettime system calls, internal kernel structures, and how timerfd integrates with epoll for event-driven programming.
This article explains the principles behind Linux's epoll mechanism, how IO multiplexing enables a single thread to manage many file descriptors efficiently, the role of non‑blocking sockets, and why epoll outperforms select and poll for high‑concurrency network services.
This article explains the basic network programming pattern, introduces epoll as an I/O multiplexing solution for high‑concurrency servers, and demonstrates how Redis 5.0 integrates epoll through its event‑loop abstraction with detailed code examples and debugging tips.
This article explains the drawbacks of traditional blocking network I/O, introduces non‑blocking reads, and walks through the evolution from multithreaded workarounds to kernel‑level multiplexing mechanisms such as select, poll, and epoll, showing code examples and performance considerations.
This article explains the fundamentals of IO multiplexing in Linux, compares naive loop‑based approaches with kernel‑provided mechanisms, dives deep into epoll's three system calls, its internal red‑black‑tree and ready‑list design, and shows which file descriptors can be efficiently managed with epoll.
This article explains the fundamentals of Linux epoll as a high‑performance IO multiplexing tool, compares it with select and poll, shows why non‑blocking file descriptors are required, and details the kernel‑level data structures and callbacks that make epoll efficient for backend services.
This article explains the differences between epoll's level‑triggered (LT) and edge‑triggered (ET) modes, shows how to use epoll_create, epoll_ctl, and epoll_wait, provides complete C++ examples for read and write handling, and offers practical guidance on avoiding common pitfalls in high‑performance Linux network programming.
Learn how Linux’s non‑blocking I/O mechanisms such as select, poll, and epoll enable high‑concurrency servers, explore OpenResty’s Lua‑based architecture, and follow step‑by‑step instructions for installing, configuring, and troubleshooting a performant OpenResty/Nginx environment on Linux.
This guide explains Linux socket programming techniques such as non‑blocking I/O and epoll, introduces the OpenResty platform built on Nginx and Lua, and provides step‑by‑step instructions for installing, configuring, and optimizing high‑concurrency web services with code examples.
The article explains Nginx’s master‑worker architecture, showing how the master process handles signals, restarts workers, and performs hot configuration or binary reloads, while workers use an event‑driven epoll loop with an accept‑mutex to efficiently process connections and balance load across cores without multithreading.
libtask, a lightweight coroutine library written by Russ Cox, demonstrates how to build a cooperative multitasking scheduler in C, detailing task creation, context switching, epoll‑based I/O handling, and a non‑preemptive FIFO scheduling model that enables asynchronous I/O to appear synchronous for server development.
Through a playful narrative, the article explains how Linux processes interact with the kernel, why blocking I/O is inefficient, and how the epoll system call and its associated mechanisms like soft interrupts and the scheduler dramatically improve network concurrency and performance.
This article explains Redis's clean and elegant I/O multiplexing implementation, covering blocking I/O limitations, the reactor pattern, abstraction of select/epoll/kqueue into a unified API, key source functions, and platform‑specific module selection to achieve high‑performance single‑threaded networking.
This article provides a deep technical walkthrough of libuv’s Linux implementation, covering epoll‑based I/O handling, level‑ and edge‑triggered events, the event‑loop architecture, timer management with a min‑heap, thread‑pool integration, and the mechanisms that drive asynchronous callbacks in Node.js.
This article provides a deep, step‑by‑step analysis of Linux's epoll mechanism, covering socket creation with accept, the internal structures of eventpoll, how epoll_ctl registers sockets, the wait‑queue interactions, and the exact code paths that move a TCP packet from the NIC to a user‑space process.
This article provides an in‑depth exploration of Linux’s epoll mechanism, covering its blocking behavior, kernel‑level processing, NAPI optimization, comparisons with select/poll, and practical insights into I/O multiplexing, helping backend engineers understand performance characteristics and design efficient network services.
This article explains Nginx's high performance by examining its multi‑process architecture, asynchronous event‑driven design, modular components, and I/O multiplexing mechanisms such as epoll, while also comparing it with Apache and detailing connection limits and request handling flow.
This article walks through Linux process states, fork/exec creation, CPU vs load metrics, network I/O models, and a real‑world Nginx high‑load case, showing how strace, accept_mutex, and SO_REUSEPORT can resolve the issue.
This guide explains how Linux socket I/O multiplexing (select, poll, epoll) powers high‑concurrency servers, why caching and asynchronous non‑blocking are crucial, and provides step‑by‑step instructions to install, configure, and develop with OpenResty, Nginx, and Lua for scalable backend applications.
This article explains how Android drives applications through a message‑driven model by detailing the roles of Message, MessageQueue, Looper, Handler, and ThreadLocal, and walks through the native implementation of ActivityThread's main loop, including prepareMainLooper, MessageQueue initialization, epoll integration, and the polling mechanisms that power the message processing cycle.
This article compares Linux's select, poll, and epoll mechanisms, explaining their internal workings, limitations such as FD_SETSIZE and linear scanning, and why epoll's event‑driven design offers superior scalability and performance for high‑concurrency network servers.
This article explains why Redis, a single‑threaded server, adopts I/O multiplexing to avoid blocking, compares blocking I/O with multiplexed models, and details the internal implementation of select, epoll, and kqueue wrappers that power Redis's high‑performance event loop.
This article explains the fundamentals of blocking and non‑blocking I/O, compares select, poll, and epoll mechanisms, introduces the Reactor model and its variants, and shows how to solve the C10K problem with processes, threads, thread pools, and event‑driven architectures, complete with code examples.
This guide explains how to tune Linux for high‑concurrency workloads by disabling unnecessary iptables, raising the per‑process file descriptor limit, modifying kernel TCP parameters via sysctl, and choosing appropriate I/O event mechanisms such as epoll or AIO.
This article compares the three I/O multiplexing mechanisms—select, poll, and epoll—by analyzing their time complexities, limitations, trigger modes, performance characteristics, and implementation details, helping developers choose the most suitable method for different Linux networking scenarios.
This article compares the three I/O multiplexing mechanisms—select, poll, and epoll—detailing their time‑complexities, limitations, implementation details, trigger modes, and performance trade‑offs to help developers choose the most suitable method for different Linux networking scenarios.
This article thoroughly examines Linux's epoll mechanism, detailing its SLAB memory management, middle‑layer design, edge and level triggering, comparison with select/poll, and related advanced polling technologies such as /dev/poll and kqueue, while also discussing C10K/C10M challenges and practical solutions.
This article explains the Linux kernel's wait‑queue mechanism, the sleep and wake‑up logic behind socket events, and how the IO‑multiplexing models select, poll, and epoll are implemented, including their core code paths, performance trade‑offs, and edge versus level triggering.
This article provides a comprehensive analysis of Linux's epoll mechanism, covering its fundamental data structures, key kernel functions, wait‑queue handling, event insertion, wake‑up logic, and the differences between edge‑triggered and level‑triggered modes, while including full source code excerpts for reference.
This guide explains how to improve network subsystem performance on Kunpeng processors by using tools such as ethtool and strace, adjusting PCIe payload size, binding NIC interrupts to NUMA‑local cores, tweaking interrupt coalescing, enabling TSO, and replacing select with epoll for high‑concurrency workloads.
This article dives deep into Node.js internals, explaining why the runtime is both single‑threaded and multi‑threaded, how the event loop, libuv thread pool, epoll/kqueue, and worker_threads collaborate to deliver non‑blocking I/O and efficient concurrency.
This article examines Redis's I/O multiplexing mechanism, explaining why it uses non‑blocking models, detailing the Reactor pattern, comparing select, epoll, and kqueue, and providing a thorough walkthrough of the underlying C code that implements event creation, addition, deletion, and polling across platforms.
This article details a competition‑level solution that implements a high‑throughput HTTP server using a custom multi‑threaded epoll model, UDP‑based protocol conversion, sparse indexing, and optimized write‑read schemes to achieve top performance on limited‑resource hardware.
This article explains the fundamentals of high‑concurrency systems, covering how network cards and routers handle massive traffic, the role of the operating system and epoll/select, various I/O models, reactor and multithreading patterns, and strategies to improve CPU and I/O utilization.
The article explains the thundering herd problem where many processes wake for a single event, describes Linux’s kernel fixes for accept() and partial epoll solutions, and details how Nginx avoids the issue using a custom inter‑process accept mutex and lock design.
This article explains the lifecycle of data in I/O operations, compares blocking, non‑blocking, and asynchronous models, introduces zero‑copy techniques, and details how select, poll, and epoll enable efficient multiplexed I/O handling in server applications.
This article explains the thundering herd phenomenon in Linux network programming, demonstrates how to reproduce it with multi‑process accept and epoll examples, analyzes why modern kernels often suppress it, and discusses mitigation techniques such as mutex locking in Nginx.
This article provides a comprehensive, source‑code‑driven walkthrough of the Redis client‑server interaction, detailing the six main steps from socket establishment to command execution and response, while also covering auxiliary mechanisms such as beforeSleep processing, key expiration strategies, and the underlying epoll I/O multiplexing model.
This article introduces Linux’s epoll mechanism, explains how to create and control epoll instances with epoll_create, epoll_ctl, and epoll_wait, describes the associated data structures and event flags, compares epoll to select, and highlights its O(1) scalability advantages for high‑connection backend applications.
An in‑depth comparison reveals how Nginx’s epoll‑based I/O model delivers higher concurrency, better efficiency, reduced memory copying, and non‑blocking operation, while Apache’s traditional select model is limited by FD_SETSIZE, linear scanning, and greater kernel‑user space copying overhead.
This guide explains how to increase Linux's per-process file descriptor limits, adjust kernel TCP parameters, and adopt high-performance I/O models such as epoll or AIO to support tens of thousands of concurrent TCP connections.
The article explores the evolution from single‑core processors to multi‑core systems, explains threading, blocking, and synchronization concepts, and compares high‑performance communication models such as asynchronous I/O, IOCP on Windows and epoll on Linux, highlighting their trade‑offs for backend server scalability.