Bob Bob
2013-Jul-01 07:05 UTC
[Samba] Interesting slow Samba read and write problem - GnuCash
Interesting, but now reached the stage where I have to resolve it! Many things have been checked and experimented with but nothing really has provided the right answer. The high points! - Two Samba servers joined with an OpenVPN link over Internet. Worst case bandwidth about 384Kbps. - A WXP client on one of the servers LANs trying to access data on the server at the other end of the link - The data is a compressed GnuCash XML file around 180KB - Reading or writing this data file (from within the app) takes around 3-5 minutes. (There are some extra things that GnuCash does of course) - If instead of a GnuCash data file I try to read or write an Excel data (220KB) file it takes maybe 10 seconds. Large file movements (hundreds of MB even) work fine. - If I mount the remote server share as NFS on the local server (with sync/intr, tcp and udp etc) and access that as as local share, the GnuCash read time is maybe 10 seconds, but the write time is about 30 seconds. (I didn't try to tune this. No doubt that could be a viable workaround, but I only did it to prove GnuCash was "okay". GnuCash speed for r/w data on its the local server is fine) - There does seem to be some kind of "resolution delay" before a file movement starts. I am thinking that GnuCash actually reads and writes in chunks that have some form of resolver time-out between each. And; - Debian GNU/Linux 6.0.5 (squeeze) Samba 3.56 - The Samba servers are separate domains, trusted with each other - WINS is running on the remote end server - Using tdbasm and idmap_tdb on both ends. The Linux UID/GID's are exactly the same, but of course the winbind ones aren't. - Resolved an OpenVPN fragmentation issue - Both sites run bind and master/slave with each other - Relevant bits of nsswitch.conf passwd: compat winbind group: compat winbind shadow: compat winbind hosts: files dns (use to also have wins) networks: files - bind resolution/speed is fine. Tried pretty well all involved IP addresses, and short/fqdn hostnames. - There does seem to be a delay doing idmap/winbind resolution on the affected files, but worst case that's maybe a second. - name resolve order = wins bcast Like I said have tried lots of things. I am hoping someone will have experienced this before and be able to point to the solution quickly. If however anyone would like smb.conf or logs to review please ask! Cheers Bob