On Tue, Jan 2, 2018 at 4:15 PM, Thomas Koenig <tkoe...@netcologne.de> wrote: > Hi Janne, > >> +#define MAX_CHUNK 2147479552 > > > Two things to discuss: > > Should this also be backported to the 7-branch?
Probably yes. Is the 6 branch still active? If so, maybe that one as well. > Also, we could set the default subrecord length for unformatted > I/O to the same value. Save a syscall :-) > > What do you think? I played around a bit with slightly modified dd test scripts found at http://blog.tdg5.com/tuning-dd-block-size/ and it seems the optimal transfer size is actually quite small, bigger isn't necessarily better. On an NVME SSD the write performance basically flatlined above 2048 bytes, for reads the best was around 64kB at 10.5 GB/s after which it slowly dropped until reaching about 7.1 GB/s at a 512MB block size. For copying from /dev/zero -> /dev/null I got the best speed at a block size of 128kB. That being said, I suspect the reason is that in this kind of copy operation small blocks win since they fit into the CPU cache. So it might not matter for some application that wants to read or write a large file to/from disk. -- Janne Blomqvist