View previous topic :: View next topic |
Author |
Message |
UberPinguin Guru
Joined: 20 Nov 2005 Posts: 510 Location: 2416.94 Miles From Home
|
Posted: Thu Sep 27, 2007 2:55 am Post subject: HOWTO: Large File Copies over CIFS |
|
|
I work in a Windows Active Directory environment. Because of that, I deal with CIFS shares on a daily basis, and frequently have to copy very large files over the network (think hard drive backups in excess of 40 GB). If you've ever attempted this from a *nix box to a CIFS volume mounted with Code: | # mount -o domain=somedomain,user=auser //windontserver/share /mnt/remote | you'll know that, partway through the copy, progress will slow to a crawl and eventually stop, with no errors reported. This is frustrating, to say the least. I have lost many hours of work to this situation.
Sifting through the mount(8) and mount.cifs(8) man pages, I came across the following: mount.cifs(8): | directio
Do not do inode data caching on files opened on this mount. This precludes mmaping files on this mount. In
some cases with fast networks and little or no caching benefits on the client (e.g. when the application is
doing large sequential reads bigger than page size without rereading the same data) this can provide better
performance than the default behavior which caches reads (readahead) and writes (writebehind) through the
local Linux client pagecache if oplock (caching token) is granted and held. Note that direct allows write
operations larger than page size to be sent to the server. On some kernels this requires the cifs.ko module
to be built with the CIFS_EXPERIMENTAL configure option. | So, by changing the previous mount command to Code: | # mount -o domain=somedomain,user=auser,directio //windontserver/share /mnt/remote | I gain improved performance for sequential read/writes. A brief test copying a 3.7GB bzipped tar file gave a consistent throughput of about 13-15 MB/s over a full-duplex 100Mb ethernet link from my laptop to the Windows 2003 server. _________________
aidanjt wrote: | You see, instead of arguing from ignorance, and fear, there is only one way to verify a theory. And that's not by clutching a black book and begging the sky fairy for deliverance from the mad scientists and their big machines. |
|
|
Back to top |
|
|
likewhoa l33t
Joined: 04 Oct 2006 Posts: 778 Location: Brooklyn, New York
|
Posted: Thu Sep 27, 2007 2:29 pm Post subject: |
|
|
BOOKMARKED. thanks UberPinguin. |
|
Back to top |
|
|
daschapa Tux's lil' helper
Joined: 01 Sep 2006 Posts: 80
|
Posted: Fri Sep 28, 2007 1:29 am Post subject: |
|
|
You'll be saving many lives with this post. Thanx very much.
(Very much appreciated).your _________________ ====================== |
|
Back to top |
|
|
niceness Tux's lil' helper
Joined: 02 May 2006 Posts: 86 Location: NS, Serbia
|
Posted: Fri Sep 28, 2007 10:09 am Post subject: |
|
|
This is one of the most useful tips I have come across in a long time.
Thanks |
|
Back to top |
|
|
UberPinguin Guru
Joined: 20 Nov 2005 Posts: 510 Location: 2416.94 Miles From Home
|
Posted: Tue Oct 02, 2007 4:09 pm Post subject: |
|
|
No problem, glad I could help _________________
aidanjt wrote: | You see, instead of arguing from ignorance, and fear, there is only one way to verify a theory. And that's not by clutching a black book and begging the sky fairy for deliverance from the mad scientists and their big machines. |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|