Bug 10660 - Server Side Copy doesn't work with Windows 8.1
Server Side Copy doesn't work with Windows 8.1
Status: CLOSED INVALID
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
4.1.8
x64 All
: P5 normal
: ---
Assigned To: David Disseldorp
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-16 18:16 UTC by Marc Muehlfeld
Modified: 2014-06-19 08:40 UTC (History)
0 users

See Also:


Attachments
Wireshark capture from Samba to Samba server (2.11 MB, application/octet-stream)
2014-06-16 18:18 UTC, Marc Muehlfeld
no flags Details
network capture of Windows 8.1 Enterprise -> Samba ~4.1 (415.87 KB, application/octet-stream)
2014-06-16 19:06 UTC, David Disseldorp
no flags Details
Wireshark Capture of a copy on the same share (33.58 KB, application/octet-stream)
2014-06-16 19:39 UTC, Marc Muehlfeld
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2014-06-16 18:16:59 UTC
When copying a file on a Windows 8.1 machine from a server from one share to an other (same server), server side copy seems not to be used. It took 3 seconds longer to copy the same 700 MB file on Win 8.1 than on Windows 7.


Client: Windows 8.1 (incl. all Updates until Jun. 2014)
Server: Samba 4.1.8

server max protocol = SMB3 (default)
Also tried:
server max protocol = SMB2_10


I already talked to David Disseldorp today on IRC about that. He'll add some notes to this bug report.
Comment 1 Marc Muehlfeld 2014-06-16 18:18:29 UTC
Created attachment 10033 [details]
Wireshark capture from Samba to Samba server

This capture if from a copy process executed on the Win8.1 machine from one share to an other (same server).
Comment 2 David Disseldorp 2014-06-16 18:58:26 UTC
My initial thoughts were that the Windows SMB client behaviour had changed between Windows Server 2012 and 8.1, whereby with 2012 the SMB client first attempts the server-side copy using an initial FSCTL_OFFLOAD_READ and falls back to using FSCTL_SRC_COPYCHUNK failure, and with 8.1 the FSCTL_SRC_COPYCHUNK fall back does not occur.
However, since then I've tested Windows 8.1 (enterprise) manually, and can't for the life of me reproduce the immediate read/write (without copychunk) fallback that Marc is seeing.
Comment 3 David Disseldorp 2014-06-16 19:06:13 UTC
Created attachment 10034 [details]
network capture of Windows 8.1 Enterprise -> Samba ~4.1
Comment 4 David Disseldorp 2014-06-16 19:12:04 UTC
Marc, I just noticed that you don't appear to be coping the files on the same share.
The source file resume key is associated with the open file table for the destination share connection, meaning that both need to be on the same connection.

Please retry, with both the source and destination file on the same share. I'll update the wiki with this requirement.
Comment 5 Marc Muehlfeld 2014-06-16 19:39:59 UTC
Created attachment 10035 [details]
Wireshark Capture of a copy on the same share

Attached a capture of copying a 1MB file on the same share. There it seems to work.


Then I tried copying a 430 MB file (not part of the capture). On Win81 it's copied in 1 second. On Win7 it needs about 20 sec.


So was it just a lack of information? Does server side copy is just working on the same share and not across shares on the same server?

I think we should be more detailed in the documentation what the requirements are for server side copy. And also add a section what the SMB specs would allow, but isn't implemented yet. Then people could better decite if it's worth installing Win8 just to get server side copy. ;-)
Comment 6 David Disseldorp 2014-06-17 08:53:55 UTC
(In reply to comment #5)
> Created attachment 10035 [details]
> Wireshark Capture of a copy on the same share
> 
> Attached a capture of copying a 1MB file on the same share. There it seems to
> work.
> 
> 
> Then I tried copying a 430 MB file (not part of the capture). On Win81 it's
> copied in 1 second. On Win7 it needs about 20 sec.
> 
> 
> So was it just a lack of information? Does server side copy is just working on
> the same share and not across shares on the same server?

FSCTL_SRV_COPYCHUNK server-side copies are only requested by Windows 8+ clients on the same share. Samba also requires that the source and destination file handles are associated with the same connection.

The new FSCTL_OFFLOAD_READ/FSCTL_OFFLOAD_WRITE server-side copy ioctls don't appear to be constrained by the same machine / share requirements. Instead, the server-side copy tokens are generated by the block storage backend, which then cooperates to move the data around. See the ODX section in http://www.snia.org/sites/default/files2/SDC2011/presentations/monday/NealChristiansen_Win8FileSystemPerformance.pdf

> I think we should be more detailed in the documentation what the requirements
> are for server side copy. And also add a section what the SMB specs would
> allow, but isn't implemented yet. Then people could better decite if it's worth
> installing Win8 just to get server side copy. ;-)

I agree. I'll add some extra detail to the wiki today, and then close this bug.
Comment 7 David Disseldorp 2014-06-17 12:29:12 UTC
(In reply to comment #6)
...
> I agree. I'll add some extra detail to the wiki today, and then close this bug.

Done, closing.
@Marc, please review the added text - thanks!
Comment 8 Marc Muehlfeld 2014-06-19 08:40:39 UTC
(In reply to comment #7)
> @Marc, please review the added text - thanks!

Done. Thanks.

I restructured the page a bit and add some more information with less technical words, that may make it easier for endusers to understand what's needed and how it works. :-)

https://wiki.samba.org/index.php/Server-Side_Copy