For bulk read() and write() I/O the best sized buffer is 8 kbytes. 4k is
pretty good, too. Anything larger blows the user-side buffer out of L1.
This is for x86.
This is a pretty important point, so let's repeat it:
Userspace programmers who are writing bulk-transfer read/write loops
should use an 8 kbyte transfer buffer.
> /dev/md0 raid-0 with O_DIRECT: 91847kbyte/sec (2781usec
> avg latency/read)
> /dev/md0 raid-0: 129455kbyte/sec
> (1978usec avg latency/read)
> /dev/md0 raid-0 with O_NOCOPY: 195868kbyte/sec (1297usec avg
> latency/read)
hmm. Why is O_DIRECT always the slowest? (and it would presumably do
even worse with an 8k transfer size).
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/