Windows desktop machine is connected via 1GB Ehternet cable to personal NAS (under development) with Ubuntu on it. While reading and writing files (> 1GB size) from/to NAS strace was conducted to monitor samba process system calls, due to the fact tha samba is the one which is doing hard work.Below is the small section of the strace output:mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb4eaf000 <0.000075>pread(31, \255\343.\372e\357F\315\357\247\21o{\331\223\336\216\235\367\\#L\312\220W\323\226\303\302\21\35\336..., 1048576, 13631488) = 1048576 <0.010848>writev(34, [{\3261\347S\205\2\347\325\316\325\214LT{\337\256!\351\246\266\342b\204i\347\221:x$\r\5\227..., 999020}], 1) = 49640 <0.000451>gettimeofday({6146, 475882}, NULL)      = 0 <0.000282>gettimeofday({6146, 476842}, NULL)      = 0 <0.000152>poll([{fd=10, events=POLLIN|POLLHUP}, {fd=6, events=POLLIN|POLLHUP}, {fd=8, events=POLLIN|POLLHUP}, {fd=34, events=POLLIN|POLLOUT|POLLHUP}], 4, 57236) = 1 ([{fd=34, revents=POLLOUT}]) <0.000202>This continues until all read bytes are written to cache, after which, new  pread system call follows and so on. (before that mmap2-ed memory is unmaped)What I notice is that later called writev functions return larger and larger bytes number, e.g.mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb4eaf000 <0.000304>pread(31, \343\367\235\227Q;\3717\240<\nl\326ff\0\361 J\37\253T\247\352\207\376\372\273\341\360\370y..., 1048576, 458227712) = 1048576 <0.032897>writev(34, [{\t\21\6\301\366hPq\274\373\353x\332X\377\310\275<J\4z\261\0\227\24\230\256\350\300\16\355\203..., 674900}], 1) = 373760 <0.002618>gettimeofday({6164, 906348}, NULL)      = 0 <0.000149>gettimeofday({6164, 907318}, NULL)      = 0 <0.000149>poll([{fd=10, events=POLLIN|POLLHUP}, {fd=6, events=POLLIN|POLLHUP}, {fd=8, events=POLLIN|POLLHUP}, {fd=34, events=POLLIN|POLLOUT|POLLHUP}], 4, 38805) = 1 ([{fd=34, revents=POLLOUT}]) <0.000199>Why is it happening? Does is depend on I/O scheduler? Used I/O scheduler is ROW.Can I somehow influence on the read and write I/O block sizes? I want to speed up the things, so why not start with large writev block sizes from the very beginning. If block size is the right name for return values for pread and writev functions. It's hard to distinguish terminology, since there is evidently block size for files as well as block size for disks.When I'm using dd for example, am I via bs parameter influencing file block size? Since disk block size is determined on the formatting time and there is no way of changing it on the fly.And lastly, can I somehow prevent gettimeofday function call, since I don't see the need for it, or I'm wrong?Sorry if some of the questions reveal alarming lack of knowledge, but I'm really trying to clear all the terminology along with my baby steps to the Linux realm. 
Samba system calls for reading/writing files from/to NAS issued from Windows desktop client
linux;ubuntu;samba;io