Discussion:
[Samba] smbclient transfer speed on solaris
Karoly VEGH
2008-03-19 20:52:20 UTC
Permalink
Hi,

I am trying to transfer data from a win2003 (OS=[Windows Server 2003
3790 Service Pack 2] Server=[Windows Server 2003 5.2]) to a solaris 10
(sun4v arch). smbclient version is 3.0.25a.

Although this is a switched gigabit network (no firewalls/routers
inbetween), and even jumbo frames are set up on the relevant NICs on
both sides, I cannot transfer more than 35mbyte/s (40 peak) with
smbclient. The command line is:

smbclient //<TARGET_IP>/<sharename> -I <TARGET_IP> -A <auth_file>
-c'prompt; ls ; mget *;'

The diskwrites on the solaris box cannot be the bottleneck, tested it,
can write way more.

I was wondering if anyone had an advice regarding performance tuning?
According to our win-admins they can provide easily 60mbyte/s between
their windows servers.

my smb.conf is pretty basic:

***@asp1dbrac012:~# egrep -v ^'#|;' /etc/sfw/smb.conf
[global]
server string = Samba Server
security = user
log file = /var/samba/log/log.%m
max log size = 50
socket options = TCP_NODELAY
dns proxy = no
***@asp1dbrac012:~#

any help is appreciated,


wbr,

charlie
--
Karoly VEGH - System Engineer Unix
bwin Interactive Entertainment AG
IT Operations Unix
Tel: +43/664/8508069
Volker Lendecke
2008-03-19 21:13:46 UTC
Permalink
Post by Karoly VEGH
I am trying to transfer data from a win2003 (OS=[Windows Server 2003
3790 Service Pack 2] Server=[Windows Server 2003 5.2]) to a solaris 10
(sun4v arch). smbclient version is 3.0.25a.
Although this is a switched gigabit network (no firewalls/routers
inbetween), and even jumbo frames are set up on the relevant NICs on
both sides, I cannot transfer more than 35mbyte/s (40 peak) with
Do you have a chance to try smbclient from the 3-2-test git
branch? I've done some considerable changes to speed up
smbclient mget. You can get a current tar.gz via
http://repo.or.cz/w/Samba.git?a=snapshot;h=refs/heads/v3-2-stable;sf=tgz
or you can check it out via git yourself.
Post by Karoly VEGH
[global]
server string = Samba Server
security = user
log file = /var/samba/log/log.%m
max log size = 50
socket options = TCP_NODELAY
dns proxy = no
Just try removing the socket options completely :-)

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20080319/296aa575/attachment.bin
Karoly VEGH
2008-03-20 13:06:44 UTC
Permalink
Post by Volker Lendecke
Do you have a chance to try smbclient from the 3-2-test git
branch? I've done some considerable changes to speed up
smbclient mget. You can get a current tar.gz via
http://repo.or.cz/w/Samba.git?a=snapshot;h=refs/heads/v3-2-stable;sf=tgz
or you can check it out via git yourself.
got the tgz, but not sure how to compile it - can you give me a hint?
Found no configure file, just some Makefiles, but in the examples dir,
and no smbclient subdir, just libsmbclient:

***@ast3inbld001:/tmp/smbtest/Samba# find . -name configure
***@ast3inbld001:/tmp/smbtest/Samba# find . -name Makefile
./examples/auth/Makefile
./examples/auth/crackcheck/Makefile
./examples/libsmbclient/Makefile
./examples/libsmbclient/smbwrapper/Makefile
./examples/pcap2nbench/Makefile
./examples/pdb/Makefile
./examples/perfcounter/Makefile
***@ast3inbld001:/tmp/smbtest/Samba# ls
COPYING PFIF.txt Read-Manifest-Now examples
MAINTAINERS README Roadmap packaging
Manifest README.Coding WHATSNEW.txt
***@ast3inbld001:/tmp/smbtest/Samba#

or do I only need to compile libsmbclient and replace the original lib?
Or do I need the rest of the samba src too to compile?
Post by Volker Lendecke
Post by Karoly VEGH
[global]
server string = Samba Server
security = user
log file = /var/samba/log/log.%m
max log size = 50
socket options = TCP_NODELAY
dns proxy = no
Just try removing the socket options completely :-)
that got the performance even more worse :)


charlie
--
Karoly VEGH - System Engineer Unix
bwin Interactive Entertainment AG
IT Operations Unix
Volker Lendecke
2008-03-20 13:45:53 UTC
Permalink
Post by Karoly VEGH
Post by Volker Lendecke
Do you have a chance to try smbclient from the 3-2-test git
branch? I've done some considerable changes to speed up
smbclient mget. You can get a current tar.gz via
http://repo.or.cz/w/Samba.git?a=snapshot;h=refs/heads/v3-2-stable;sf=tgz
or you can check it out via git yourself.
got the tgz, but not sure how to compile it - can you give me a hint?
Found no configure file, just some Makefiles, but in the examples dir,
./autogen.sh; ./configure; ./make

If you don't have the autotools around, you might also pull
a version that already has configure and make by

rsync -avzP samba.org::ftp/unpacked/samba_3_2_stable .

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20080320/65f768f6/attachment.bin
Karoly VEGH
2008-03-20 19:11:23 UTC
Permalink
Post by Volker Lendecke
Post by Karoly VEGH
Post by Volker Lendecke
Do you have a chance to try smbclient from the 3-2-test git
branch? I've done some considerable changes to speed up
smbclient mget. You can get a current tar.gz via
http://repo.or.cz/w/Samba.git?a=snapshot;h=refs/heads/v3-2-stable;sf=tgz
or you can check it out via git yourself.
got the tgz, but not sure how to compile it - can you give me a hint?
Found no configure file, just some Makefiles, but in the examples dir,
./autogen.sh; ./configure; ./make
thanks that worked alright.... and how it worked! 60-70mbyte/s! not
bad :)

the only issue with this was that it stopped to transfer the large file
(13+ gbyte) after 647Mbytes.

output:

***@asp1dbrac012:/orabin/system# ./smbclient //target_ip/share -s /etc/sfw/smb.conf -I target_ip -A auth_file -c'prompt; ls ; mget *;'
creating lame upcase table
creating lame lowcase table
Domain=[INTNET] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]
. D 0 Fri Mar 7 13:18:16 2008
.. D 0 Fri Mar 7 13:18:16 2008
LARGEFILE.dat A 13563025258 Fri Mar 7 13:37:39 2008

64715 blocks of size 33554432. 16498 blocks available
getting file \LARGEFILE.dat of size 13563025258 as LARGEFILE.dat (59526.3 kb/s) (average 59526.3 kb/s)
***@asp1dbrac012:/orabin/system#
***@asp1dbrac012:/orabin/system# ls -l LARGEFILE.dat
-rw-r--r-- 1 root root 678123370 Mar 20 13:47 LARGEFILE.dat
***@asp1dbrac012:/orabin/system#

I tried truss'ing the process, but it looks like it just thinks it is really the
end of file and stops transferring:


24928: recv(4, "\001\0 9FF S M B .\0\0\0".., 65597, 0) = 65597
24928: write(6, " e\0 d\0 \0 -\0 \0 S\0".., 65534) = 65534
24928: send(4, "\0\0\0 7FF S M B .\0\0\0".., 59, 0) = 59
24928: pollsys(0xFFBFEFA8, 2, 0xFFBFF050, 0x00000000) = 1
24928: ioctl(4, FIONREAD, 0xFFBFF0C4) = 0
24928: recv(4, "\001\0 9FF S M B .\0\0\0".., 65597, 0) = 65597
24928: write(6, " a\0 \0 -\0 \0 H\0 o\0".., 65534) = 65534
24928: send(4, "\0\0\0 7FF S M B .\0\0\0".., 59, 0) = 59
24928: pollsys(0xFFBFEFA8, 2, 0xFFBFF050, 0x00000000) = 1
24928: ioctl(4, FIONREAD, 0xFFBFF0C4) = 0
24928: recv(4, "\001\0 9FF S M B .\0\0\0".., 65597, 0) = 65597
24928: write(6, " 4\0 5\0 3\0 8\0 |\0 T\0".., 65534) = 65534
24928: pollsys(0xFFBFEFA8, 2, 0xFFBFF050, 0x00000000) = 1
24928: ioctl(4, FIONREAD, 0xFFBFF0C4) = 0
24928: recv(4, "\0\0A8 {FF S M B .\0\0\0".., 43135, 0) = 43135
24928: write(6, " 8\0 9\0 9\0 |\0 D\0E4\0".., 43072) = 43072
24928: write(4, "\0\0\0 )FF S M B04\0\0\0".., 45) = 45
24928: pollsys(0xFFBFED40, 1, 0xFFBFEDD0, 0x00000000) = 1
24928: read(4, "\0\0\0 #", 4) = 4
24928: pollsys(0xFFBFEDB8, 1, 0xFFBFEE48, 0x00000000) = 1
24928: read(4, "FF S M B04\0\0\0\08801C8".., 35) = 35
24928: close(6) = 0
getting file \ATUSER.dat of size 13563025258 as ATUSER.dat (36266.7 kb/s) (average 36266.7 kb/s)
24928: write(3, " g e t t i n g f i l e".., 97) = 97
24928: write(4, "\0\0\0 #FF S M B q\0\0\0".., 39) = 39
24928: pollsys(0xFFBFF120, 1, 0xFFBFF1B0, 0x00000000) = 1
24928: read(4, "\0\0\0 #", 4) = 4
24928: pollsys(0xFFBFF198, 1, 0xFFBFF228, 0x00000000) = 1
24928: read(4, "FF S M B q\0\0\0\08801C8".., 35) = 35
24928: close(4) = 0
24928: _exit(0)

any idea?

I have executed the same commandline with "-d 5" to see more, the file got
rather long, so I uploaded it here:

http://web.utanet.at/charlie/sol/smbtest_sol_3.2.txt


charlie
--
Karoly VEGH - System Engineer Unix
bwin Interactive Entertainment AG
IT Operations Unix
Tel: +43/664/8508069
Volker Lendecke
2008-03-20 19:55:51 UTC
Permalink
Post by Karoly VEGH
the only issue with this was that it stopped to transfer the large file
(13+ gbyte) after 647Mbytes.
At this very moment I can't look at it, hopefully over the
weekend. Can you do me a favor and open a bug report at
https://bugzilla.samba.org/ as blocker for 3.2, so that it
does not get lost?

Thanks for testing this!

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20080320/ab758de4/attachment.bin
Karoly VEGH
2008-03-20 20:51:29 UTC
Permalink
Post by Volker Lendecke
Post by Karoly VEGH
the only issue with this was that it stopped to transfer the large file
(13+ gbyte) after 647Mbytes.
At this very moment I can't look at it, hopefully over the
weekend. Can you do me a favor and open a bug report at
https://bugzilla.samba.org/ as blocker for 3.2, so that it
does not get lost?
https://bugzilla.samba.org/show_bug.cgi?id=5341

couldn't add you as CC: entry though.
Post by Volker Lendecke
Thanks for testing this!
heh, thanks for helping me :)


charlie
--
Karoly VEGH - System Engineer Unix
bwin Interactive Entertainment AG
IT Operations Unix
Tel: +43/664/8508069
Loading...