Tagged articles
sendfile
45 articles · Page 1 of 1
This article compares traditional file-to-network data transfer (4 copies, 2 CPU copies) with Linux sendfile zero-copy (2 DMA copies, 0 CPU copies), explaining how sendfile eliminates two CPU-mediated copies by moving data directly from kernel page cache to socket buffer, while noting limitations like file-to-socket only, no compression, and UDP incompatibility.
DMALinuxkernel
0 likes · 18 min read

This article details six essential Nginx configuration optimizations for high-concurrency scenarios, covering worker processes, connection limits, epoll event model, TCP reuse via sendfile and TCP options, HTTP keepalive, and upstream connection pooling with concrete examples and configuration snippets.
Epollconfiguration-optimizationhigh concurrency
0 likes · 5 min read

This article walks through practical Nginx high‑concurrency tuning steps—including worker_processes, worker_connections, Linux file‑descriptor limits, and sendfile zero‑copy settings—to dramatically increase throughput and handle tens of thousands of simultaneous connections.
Performance Tuninghigh concurrencylinux limits
0 likes · 3 min read

This article provides a comprehensive, step‑by‑step analysis of Linux zero‑copy mechanisms—sendfile, mmap, and splice—detailing their internal workflows, performance trade‑offs, code examples, and practical selection guidelines for high‑throughput backend development.
Linuxmmapperformance
0 likes · 41 min read

The article explains how Direct Memory Access (DMA) eliminates CPU‑bound data copies, compares traditional I/O with zero‑copy techniques such as mmap and sendfile, and shows how reducing system calls and context switches can double file‑transfer throughput while highlighting the limits of kernel cache for large files.
DMALinux I/Oasynchronous I/O
0 likes · 15 min read

The article analyzes why Kafka delivers about 50% higher throughput than RocketMQ, examining zero‑copy mechanisms (mmap vs sendfile), the resulting system‑call and data‑copy differences, and how RocketMQ’s richer feature set trades off raw performance for functionality.
KafkaMessage QueueRocketMQ
0 likes · 9 min read

This article explains how to achieve million‑level concurrent connections with Nginx by tuning OS limits, worker processes, epoll event handling, gzip compression, and zero‑copy file transfer, providing concrete configuration snippets and performance rationale for each optimization.
EpollGZIPLinux
0 likes · 4 min read

This article explains why traditional I/O interfaces rely on data copying, demonstrates the hidden overhead of read/write in a network server, and introduces zero‑copy methods such as mmap, sendfile, DMA Gather Copy, and splice to dramatically reduce copies and context switches for faster I/O.
IO optimizationLinuxmmap
0 likes · 12 min read

This article breaks down zero‑copy data transfer techniques—write+read, mmap+write, sendfile, sendfile + SG‑DMA, and splice—showing how they reduce CPU copies and context switches to boost I/O performance in modern operating systems.
BackendData Transfermmap
0 likes · 9 min read

This article explains the concept of zero‑copy in Linux, compares the four main system calls—sendfile, mmap, splice and tee—describes their APIs, internal mechanisms, performance characteristics, typical use‑cases and provides practical code examples for high‑performance network programming.
LinuxTEEmmap
0 likes · 37 min read

Zero‑copy eliminates CPU‑mediated data copies between user and kernel spaces by using DMA and memory‑mapping, dramatically improving I/O performance, reducing context switches, and enabling high‑throughput applications such as file servers, Kafka brokers, and Java networking frameworks.
DMAI/O optimizationJava
0 likes · 28 min read

This article explains how Linux zero‑copy techniques—DMA, sendfile, splice, mmap + write, and tee—reduce CPU involvement in large file and network transfers by moving data directly within kernel space, detailing their workflows, code examples, performance trade‑offs, and suitable use cases.
DMALinuxSystem Programming
0 likes · 20 min read


ITPUBDec 1, 2024 · Fundamentals
The article explains how Kafka’s use of sendfile zero‑copy gives it higher throughput than RocketMQ, which relies on mmap, and discusses the trade‑offs between performance and feature richness when choosing between the two message‑queue systems.
Message QueueRocketMQmmap
0 likes · 9 min read

The article compares Kafka and RocketMQ, explaining how Kafka’s use of sendfile zero‑copy reduces system calls and data copies, while RocketMQ relies on mmap, leading to lower throughput but richer features, and offers guidance on choosing between them based on scenario.
KafkaMessage QueueRocketMQ
0 likes · 8 min read

This article explains the concept of zero‑copy, compares traditional I/O copying with mmap, sendfile, DMA scatter/gather and splice techniques, and shows how Java NIO leverages mmap and sendfile to achieve high‑performance data transfer while minimizing CPU involvement.
IOJava NIOmmap
0 likes · 15 min read

Zero‑copy techniques such as mmap + write, sendfile, and sendfile + DMA scatter/gather reduce CPU‑memory copies and context switches compared with traditional read/write IO, improving performance for high‑throughput systems like RocketMQ and Kafka, while explaining user‑kernel mode, DMA, and their trade‑offs.
DMAIO performanceLinux
0 likes · 11 min read

The article explains how RocketMQ’s reliance on mmap‑based zero‑copy leads to more data copies and system‑call overhead compared to Kafka’s sendfile approach, resulting in lower throughput, and discusses when to choose each message‑queue system based on functional needs and performance requirements.
KafkaMessage QueueRocketMQ
0 likes · 8 min read

This article explains the principles of Direct Memory Access (DMA), compares it with traditional I/O, details the DMA data‑transfer workflow, and explores zero‑copy techniques such as mmap + write and sendfile, highlighting how they reduce context switches, data copies, and improve overall Linux I/O efficiency.
DMALinux I/Oasync I/O
0 likes · 15 min read

This article explains Direct Memory Access (DMA), compares it with traditional I/O, details the complete DMA‑based I/O workflow, and explores zero‑copy techniques such as mmap, sendfile, and asynchronous I/O, highlighting their impact on context switches, data copies, and overall transfer performance.
DMAI/O optimizationLinux
0 likes · 14 min read

This article explains the traditional I/O read/write workflow, identifies its performance bottlenecks, introduces the concept of zero‑copy, and demonstrates practical zero‑copy implementations—including DMA, sendfile, shared memory, memory‑mapped files, and Java NIO techniques such as ByteBuffer, Channel, transferTo/transferFrom, and memory‑mapped files.
DMAI/OJava NIO
0 likes · 15 min read

This article explains the zero‑copy technique in Java, covering I/O fundamentals, kernel read/write flow, mmap+write and Sendfile methods, virtual memory mapping, MappedByteBuffer and DirectByteBuffer usage, channel‑to‑channel transfer, Netty composite buffers, and how frameworks like RocketMQ and Kafka leverage zero‑copy for performance.
Java NIONettymmap
0 likes · 13 min read

This article explains the concept of zero‑copy, how it eliminates redundant data copying in I/O operations, and demonstrates its implementation in Java through buffers, mmap+write, Sendfile, MappedByteBuffer, DirectByteBuffer, channel‑to‑channel transfers, and Netty’s composite buffers.
Java NIOMappedByteBufferNetty
0 likes · 12 min read

This article explains how zero‑copy techniques such as DMA, sendfile, mmap and Direct I/O reduce data copies and context switches in Linux, compares their mechanisms, advantages and drawbacks, and shows typical use cases like Kafka for high‑performance I/O.
DMADirect I/OLinux
0 likes · 14 min read

This article explains the concept of zero‑copy, its benefits for I/O performance, and how Java NIO, Netty, Kafka, RocketMQ and related APIs such as mmap+write and sendfile implement zero‑copy to avoid unnecessary data copying between kernel and user space.
I/O performanceJava NIOMappedByteBuffer
0 likes · 13 min read

The article explains how traditional I/O incurs four data copies and context switches, and how DMA, zero‑copy techniques such as sendfile, mmap, splice, and Direct I/O reduce copying and system calls, improving performance for disk‑to‑network data transfers in Linux.
DMADirect I/OI/O optimization
0 likes · 16 min read

This article explains the concept of zero‑copy I/O, how DMA offloads data movement between memory, disks and network cards, and compares practical implementations such as sendfile, mmap and Direct I/O, highlighting their benefits, limitations and typical use cases in Linux systems.
DMADirect I/Ommap
0 likes · 15 min read

This article explains how Linux zero‑copy mechanisms such as DMA, sendfile, mmap and Direct I/O reduce data copies and context switches, detailing their operation, advantages, limitations, and real‑world usage in systems like Kafka and MySQL.
DMADirect I/OLinux
0 likes · 20 min read

This article explains how zero‑copy techniques such as DMA, sendfile, mmap and Direct I/O reduce the four data copies and context switches normally required for disk‑to‑network transfers, improving performance for systems like Kafka and MySQL while outlining their trade‑offs.
DMADirect I/OLinux
0 likes · 15 min read

This article explains how DMA offloads memory‑to‑device data transfers, reduces the four data copies and context switches of traditional I/O, and introduces zero‑copy methods such as sendfile, mmap and Direct I/O, illustrating their mechanisms, advantages, limitations, and real‑world use cases like Kafka and MySQL.
DMADirect I/OI/O optimization
0 likes · 15 min read

This article explains the costly four‑copy, four‑context‑switch data path in traditional Linux I/O, introduces DMA as a co‑processor that offloads memory transfers, describes zero‑copy techniques such as sendfile, mmap and Direct I/O, and shows how Kafka and MySQL leverage these methods to reduce CPU overhead and improve throughput.
DMADirect I/OKafka
0 likes · 16 min read

This article explains why zero‑copy techniques such as mmap, sendfile and DMA dramatically reduce CPU copies and context switches in traditional read/write I/O, improving the performance of high‑throughput systems like RocketMQ and Kafka.
DMAIO performanceLinux
0 likes · 11 min read

Zero‑copy I/O minimizes data copying by using DMA and kernel mechanisms such as mmap + write or the sendfile() system call, with sendfile achieving true zero‑copy through fewer system calls, context switches, and memory copies compared to traditional read/write paths.
DMAI/O optimizationLinux
0 likes · 8 min read

This article explains how zero‑copy techniques such as mmap, sendfile, and splice reduce CPU involvement in data transfer by avoiding memory copies between kernel and user spaces, and shows how Java NIO and Netty implement these mechanisms for high‑performance backend I/O.
BackendJava NIOmmap
0 likes · 8 min read

Zero-copy techniques such as mmap + write, sendfile, and sendfile + DMA scatter/gather reduce CPU copies and context switches by leveraging kernel‑space data transfers and DMA, dramatically improving I/O performance for high‑throughput systems like RocketMQ and Kafka, as explained with detailed process flows and comparisons.
DMAIO performancemmap
0 likes · 10 min read

This article explains the concepts of user space and kernel space, shows how traditional file‑to‑socket transfers involve multiple data copies with read/write system calls, and demonstrates how the Linux sendfile system call implements zero‑copy to reduce copies and system calls for high‑performance servers.
Backend PerformanceLinuxsendfile
0 likes · 6 min read

The article explains Linux zero‑copy I/O techniques—mmap, sendfile, splice, and tee—detailing their design principles, execution flows, context‑switch and data‑copy reductions, advantages, limitations, and appropriate use cases, helping developers choose the optimal method for high‑performance file and network transfers.
I/OLinuxTEE
0 likes · 11 min read

This article explains the concept of zero-copy I/O, covering buffer types, virtual memory, mmap+write and sendfile techniques in Java, and demonstrates how Java NIO, Netty, and other frameworks like RocketMQ and Kafka leverage zero-copy to reduce data copying and improve performance.
mmapperformancesendfile
0 likes · 14 min read

This article explains Linux's zero‑copy techniques—mmap, sendfile, and splice—detailing how they reduce data copies between user and kernel space, improve I/O efficiency, handle edge cases like SIGBUS, and leverage DMA to minimize CPU overhead in server file transfers.
Linuxmmapperformance
0 likes · 11 min read

This article explains the zero‑copy technique in Java, covering basic I/O concepts, buffer management, mmap + write and Sendfile methods, and how frameworks like NIO, Netty, Kafka, and RocketMQ use these mechanisms to eliminate data copies and improve performance.
JavaNIONetty
0 likes · 11 min read


ITPUBJul 23, 2020 · Fundamentals
This article explains why traditional read/write file serving incurs multiple data copies and context switches, then introduces mmap, sendfile, and splice as zero‑copy methods that reduce CPU load, discuss their usage, limitations, and practical pitfalls for high‑performance Linux servers.
I/O optimizationLinuxmmap
0 likes · 11 min read

This article explains how zero‑copy techniques such as DMA, mmap, and sendfile work, compares them with traditional file I/O, shows their Java NIO implementations, and presents performance test results demonstrating the advantages of mmap for small files and sendfile for large files.
DMAFile I/OJava NIO
0 likes · 9 min read

This article explains the zero‑copy principle, describes core I/O concepts such as buffers and virtual memory, and details Java implementations including mmap + write, Sendfile, MappedByteBuffer, DirectByteBuffer, channel‑to‑channel transfer, and Netty’s composite buffers for high‑performance data transfer.
JavaNIONetty
0 likes · 12 min read


ITPUBJul 1, 2019 · Big Data
This article explains how Kafka achieves ultra‑high throughput by using sequential disk writes, memory‑mapped files, zero‑copy sendfile reads, and batch compression, while also describing its data retention policies and the trade‑offs of synchronous versus asynchronous producer modes.
Memory Mapped Filesbatch compressionhigh-throughput
0 likes · 9 min read

This article explains why static files and JavaScript may not update correctly in a Vagrant‑VirtualBox development setup on Windows, describes the underlying VirtualBox sendfile bug, and provides step‑by‑step instructions to disable sendfile in both Nginx and Apache to resolve the issue.
ApacheVagrantVirtualBox
0 likes · 5 min read

Zero‑copy, implemented via the Linux sendfile system call, eliminates data copying between kernel and user space, reducing context switches and memory usage, thereby significantly improving the performance of web servers such as Apache and Nginx.
performancesendfileweb server
0 likes · 3 min read
