Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: SAMBA server speed.

  1. #1
    live_fx is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    73

    Exclamation SAMBA server speed.

    Hi all.

    I have the problems with transfer speed between samba and Windows XP clients.

    1. samba server configuration:
    Quad Core 6600 CPU.
    4 Gb RAM

    OpenSUSE 11.2 with kernel "2.6.31.12-0.1-desktop"
    Samba - samba-3.5.1-1.1.i586

    - - - -


    Test: 4 GB File copying. One file.

    transfer speed from Samba Server to Windows 7 and XP clients:

    (Windows clients copy file from Server share -> to local drive)
    From Server to Windows 7 client 1:
    85-90 Mb/sec
    From Server to Windows 7 client 2:
    90-100 Mb/sec
    From Server to XP1 client 3
    75-100 Mb/sec

    transfer speed from Windows 7 and XP clients TO Samba Server:
    (client copy file from local drive -> to server Share)
    From Server to Windows 7 client 1:
    12-20 Mb/sec
    From Server to Windows 7 client 2:
    30-35 Mb/sec
    From Server to Windows XP client 1
    20-27 Mb/sec

    (copying file from Windows local drive to Windows remote share)
    From Window 7 client 1 TO Windows XP client 1
    40-50 Mb/sec
    From Window 7 client 2 TO Windows XP client 1
    50-60 Mb/sec

    Copying file from Windows 7 client 2 share -> TO Windows XP client 1 show me 100-120 Mb/sec speed permanent.

    = = =

    Copying file from Linux hosts to NFS server is stable 50-90
    Mb/sec bidirectional.

    This part of my smb.conf file

    Code:
    # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
    # samba-doc package is installed.
    # Date: 2009-10-27
    [global]
    log level = 1
    debug level = 0
    max log size = 50
    
    #read prediction = true
    #read size = 65536
    
    #strict locking = No
    #strict sync = No
    
    #sync always = No
    
    wide links = yes
    
    read raw = yes
    write raw = yes
    
    #max protocol = smb2
    realm = some.com
    # client ntlmv2 auth = yes
    
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=65535 SO_RCVBUF=65535
    
    winbind enum groups = Yes
    winbind enum users = Yes
    idmap uid = 10000-20000
    idmap gid = 10000-20000
    auth methods = winbind
    winbind use default domain = No
    case sensitive = No
    
    #client use spnego = Yes
    #client signing = Yes
    
    
            workgroup = ???????
            server string = ""
            passdb backend = tdbsam
            printing = cups
            printcap name = cups
            printcap cache time = 750
            cups options = raw
            map to guest = Bad User
            logon path = \\%L\profiles\.msprofile
            logon home = \\%L\%U\.9xprofile
            logon drive = P:
            usershare allow guests = Yes
            security = domain
            add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
            domain logons = No
            domain master = No
            netbios name = Server
            wins support = No
    #[homes]
    #       comment = Home Directories
    #       valid users = %S, %D%w%S
    #       browseable = No
    #       read only = No
    #       inherit acls = Yes

    Another words: I have very slow WRITE speed when copying file FROM Windows clients TO Samba Share. This is the most problem. Of course i hear many many questions from Windows users.

    All possible help is very very appreciated.

    p.s. my books now:
    SAMBA Documentation

    Samba speed is slower than Windows native clients connections ?
    The mouse click's skills is not a most important skills in our short life

  2. #2
    ken_yap is offline Flux Capacitor Penguin
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,955
    Blog Entries
    4

    Default Re: SAMBA server speed.

    I wonder if you have enabled noatime in your mount options for that filesystem.

    Also have you tried copying into /dev/null to take the disk write out of the test to see what the baseline speed you can expect from Samba is?

  3. #3
    live_fx is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    73

    Default Re: SAMBA server speed.

    Quote Originally Posted by ken_yap View Post
    I wonder if you have enabled noatime in your mount options for that filesystem.

    Also have you tried copying into /dev/null to take the disk write out of the test to see what the baseline speed you can expect from Samba is?

    Thanks for answer, ken_yap. My mount options is:
    /dev/sdb1 /mnt/RAID ext4 acl,user_xattr 1 2

    must be replaced with:
    /dev/sdb1 /mnt/RAID ext4 noatime,acl,user_xattr 1 2

    Right ?
    The mouse click's skills is not a most important skills in our short life

  4. #4
    ken_yap is offline Flux Capacitor Penguin
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,955
    Blog Entries
    4

    Default Re: SAMBA server speed.

    Right........

  5. #5
    live_fx is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    73

    Default Re: SAMBA server speed.

    Quote Originally Posted by ken_yap View Post
    I wonder if you have enabled noatime in your mount options for that filesystem.

    Also have you tried copying into /dev/null to take the disk write out of the test to see what the baseline speed you can expect from Samba is?
    tests.

    1. "dd" to Raid 5 (Samba share)

    Code:
     time dd if=/dev/zero of=/mnt/RAID/Projects/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 17.7783 s, 153 MB/s
    
    real	0m17.881s
    user	0m0.111s
    sys	0m9.822s
    2. "dd" to "/" Server directory:

    Code:
    time dd if=/dev/zero of=/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 49.9899 s, 54.3 MB/s
    Last result is strange, because same test on my computer and on the others linux computers looks different:

    My OpenSUSE 11.2 workstation

    Code:
    time dd if=/dev/zero of=/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 19.6755 s, 138 MB/s
    
    real	0m19.696s
    user	0m0.043s
    sys	0m2.810s
    Another linux node:
    Code:
    time dd if=/dev/zero of=/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 29.5517 s, 91.9 MB/s
    
    real	0m29.559s
    user	0m0.080s
    sys	0m6.772s
    ===
    ===
    ===

    p.s.

    Server Share filesystem - is "EXT4" -
    My linux desktop "/" filesystem is "XFS"
    Last edited by live_fx; 12-Mar-2010 at 07:12. Reason: Additional information about filesystems
    The mouse click's skills is not a most important skills in our short life

  6. #6
    live_fx is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    73

    Default Re: SAMBA server speed.

    ken_yap,

    1. i do live remount /dev/sdb RAID

    mount -o noatime,remount,rw,acl,user_xattr /dev/sdb1

    2. i do some tests 3 times again:
    Code:
    time dd if=/dev/zero of=/mnt/RAID/Projects/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 13.681 s, 199 MB/s
    
    real	0m14.334s
    user	0m0.095s
    sys	0m10.180s
    Code:
    time dd if=/dev/zero of=/mnt/RAID/Projects/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 12.7281 s, 213 MB/s
    
    real	0m13.306s
    user	0m0.121s
    sys	0m9.649s
    Code:
    time dd if=/dev/zero of=/mnt/RAID/Projects/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 13.3636 s, 203 MB/s
    
    real	0m13.939s
    user	0m0.110s
    sys	0m9.703s
    Disk I/O looks much faster now.

    old test values: 153 Mb/sec

    new values is: 213 MB/s, 203 MB/s, 199 MB/s

    i need do some tests with samba again.
    The mouse click's skills is not a most important skills in our short life

  7. #7
    live_fx is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    73

    Default Re: SAMBA server speed.

    No good results.

    But i see strange performance difference between protocols.

    Look to test results. This is the file transfer test. From Linux Desktop - to server trough SMB, NFS, and FTP protocols:

    1. Linux Desktop -> Server (SMB)
    upload to Server:
    14 MB/s , 19 Mb/s, 20 Mb/s
    download from Server:
    28 MB/s, 34 MB/s


    2. Linux Desktop -> Server (NFS)
    upload to Server:
    10 Mb/s, 12 MB/s, 14 MB/s
    download from Server:
    40 MB/s, 35 MB/s, 60 MB/s

    3. Linux Desktop -> Server (FTP)
    upload:
    94 MB/s, 100 MB/s, 105 MB/s
    download:
    103 MB/s, 105 MB/s, 107 MB/s

    wow. :/

    = = = =

    FTP connection is pretty fast in both directions instead of NFS and SMB..

    something is really wrong with Server preferences.
    any possible opinions ?

    -------------
    some test for server disks:

    1. Shared disk test (raid 5):
    time dd if=/dev/zero of=/mnt/RAID/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 13.8833 s, 196 MB/s

    real 0m13.900s
    user 0m0.064s
    sys 0m8.336s

    2. Root partition test ( /dev/sda1 on / type ext4 (rw,noatime,acl,user_xattr,acl,user_xattr) ):

    time dd if=/dev/zero of=/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 47.9228 s, 56.7 MB/s

    real 0m47.926s
    user 0m0.092s
    sys 0m8.498s

    System work on disk with slow I\O performance. Can this affect SAMBA ?
    Last edited by live_fx; 13-Mar-2010 at 01:08. Reason: Additional TESTS
    The mouse click's skills is not a most important skills in our short life

  8. #8
    ken_yap is offline Flux Capacitor Penguin
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,955
    Blog Entries
    4

    Default Re: SAMBA server speed.

    Maybe because when you treat the share as a disk, Samba makes sure the data is synced to disk before returning from the write. whereas FTP gives no such guarantees? Have you tried increasing the write size? Why 8kB only? Samba can handle much larger writes.

  9. #9
    live_fx is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    73

    Default Re: SAMBA server speed.

    1.ken_yap what you think about this ?

    -------------
    some test for server disks:

    1. Shared disk test (raid 5):
    time dd if=/dev/zero of=/mnt/RAID/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 13.8833 s, 196 MB/s

    real 0m13.900s
    user 0m0.064s
    sys 0m8.336s

    2. Root partition test ( /dev/sda1 on / type ext4 (rw,noatime,acl,user_xattr,acl,user_xattr) ):

    time dd if=/dev/zero of=/test_file bs=8192 count=331541
    331541+0 records in
    331541+0 records out
    2715983872 bytes (2.7 GB) copied, 47.9228 s, 56.7 MB/s

    real 0m47.926s
    user 0m0.092s
    sys 0m8.498s

    System work on disk with slow I\O performance. Can this affect SAMBA ?
    The mouse click's skills is not a most important skills in our short life

  10. #10
    live_fx is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    73

    Default Re: SAMBA server speed.

    Quote Originally Posted by ken_yap View Post
    Maybe because when you treat the share as a disk, Samba makes sure the data is synced to disk before returning from the write. whereas FTP gives no such guarantees? Have you tried increasing the write size? Why 8kB only? Samba can handle much larger writes.
    i edit smb.conf and set SO_SNDBUF=65535 SO_RCVBUF=65535, but after tests, i don`t see any major differences.

    I`m sure, samba MUST work with speed 100 MB/s, like FTP. And NFS - too. I think - something is really wrong with server. Difference between 100-107 MB/s (FTP) and 17-20 MB/s (SMB) - is really huge.

    May be because my system disk is slow, and samba try to make some operations with slow system disk ( caching may be)..

    I try now setup SAMBA server on another machine - and compare speeds.
    The mouse click's skills is not a most important skills in our short life

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO 3.5.2