[Samba] Increase data length for SMB2 write and read requests for Windows 10 clients

Jones Syue 薛懷宗 jonessyue at qnap.com
Mon Aug 21 09:53:11 UTC 2023


Hello Jeremy,

> OH - that's *really* interesting ! I wonder how it is
> changing the SMB3+ redirector to do this ?

It looks like applications could do something and give a hint to SMB3+ 
redirector, so far not quite sure how to make it,
per process monitor (procmon) could show that write I/O size seems 
could be pass from the application layers,
(https://learn.microsoft.com/en-us/sysinternals/downloads/procmon)
this is a example for writing, using applications (Fastcopy.exe, 
explorer.exe, and robocopy.exe) to transfer a file named '1GB.img' from 
local disk 'H:' to remote SMB mount disk 'Z', 
and monitor them with procmon: 

1. FastCopy (FastCopy.exe), 8MB (need to revise FastCopy default setup)
Process Name	Operation	Path	Detail
System	TCP Send	10.19.7.63:64845 -> 10.19.250.98:445	Length: 8388724, startime: 3459115, endtime: 3459149, seqnum: 0, connid: 0
System	TCP Receive	10.19.7.63:64845 -> 10.19.250.98:445	Length: 84, seqnum: 0, connid: 0
FastCopy.exe	WriteFile	\\10.19.250.98\Public\1GB.img	Offset: 92,274,688, Length: 8,388,608, Priority: Normal

2. File Explorer (explorer.exe), 1MB, drag-and-drop files.
Process Name	Operation	Path	Detail
explorer.exe	ReadFile	H:\1GB.img	Offset: 55,574,528, Length: 1,048,576, Priority: Normal
System	ReadFile	H:\1GB.img	Offset: 55,574,528, Length: 1,048,576, I/O Flags: Non-cached, Paging I/O, Priority: Normal
System	WriteFile	\\10.19.250.98\Public\1GB.img	Offset: 55,574,528, Length: 1,048,576, Priority: Normal
System	TCP Send	10.19.7.63:64845 -> 10.19.250.98:445	Length: 1048692, startime: 3545682, endtime: 3545689, seqnum: 0, connid: 0
System	TCP Receive	10.19.7.63:64845 -> 10.19.250.98:445	Length: 84, seqnum: 0, connid: 0

3. robocopy (robocopy.exe), 1MB, command 'robocopy.exe h: z: 1GB.img /NP'
Process Name	Operation	Path	Detail
Robocopy.exe	ReadFile	H:\1GB.img	Offset: 520,093,696, Length: 1,048,576, Priority: Normal
System	WriteFile	\\10.19.250.98\Public\1GB.img	Offset: 520,093,696, Length: 1,048,576, Priority: Normal
System	TCP Send	10.19.7.63:64845 -> 10.19.250.98:445	Length: 1048692, startime: 3618938, endtime: 3618945, seqnum: 0, connid: 0
System	TCP Receive	10.19.7.63:64845 -> 10.19.250.98:445	Length: 84, seqnum: 0, connid: 0

Perhaps i could do 'procmon' with other benchmark tool like iometer,
get back here later :)

Found a video talking about SMB2 redirector and large I/O size,
thouhd it is not up-to-date SMB3+ redirector still good to know about 
related design thoughts in the history:
https://learn.microsoft.com/en-us/events/pdc-pdc08/es23
0:15:46 SMB2 Redirector
0:17:13 CopyFile API, 1MB I/O request
0:22:46 Application Guidelines


--

Regards,
Jones Syue | 薛懷宗
QNAP Systems, Inc.


More information about the samba mailing list