Let\'s say I want to write a 1 GB of data to the file on, say ext3 Linux filesystem using write(2) syscall and this happens in a very busy
As discussed in comments, I believe the exact size don't matter that much, assuming it is :
stat(".") etc.)posix_memalign).So a power of two between 16kbytes and a few megabytes should probably fit. Most of the time is spent on reading the disk. Filesystem and disk benchmarks are quite flat in that range.
4Kbytes seems to often be the page size and the disk chunk size.
Of course, you can tune things, even tune, when making the file system with mke2fs, the file system block size.
And I'll bet that the optimal is really dependent upon your hardware (SSD, hard disks?) and your system (and its load).