Results 1 to 6 of 6

Thread: [SOLVED] Slow Samba file transfer

  1. #1
    Join Date
    Dec 2007

    [SOLVED] Slow Samba file transfer

    Transferring files to my samba share is about 2.5 times slower than transferring them to a windows share. In both cases destination was to an entire hard drive shared. No RAID on destinations. The WinXP Pro machine had a 320 gb, and the linux has a 700gb.

    This is my topology:
    Linksys Cable Modem->Linksys Router(10/100)->Wired to:
    WinXP pro SP2 machine 1
    WinXp Pro SP2 machine 2
    D-Link 10/100 switch->wired to:
    Ubuntu Desktop
    Ubuntu Server with Samba (was 7.10 upgraded to Hardy Herring/Haron or whatever).

    The network cable between the Router and the D-Link switch is maybe about 15-20ft long. All other cables are just a few feet long. Switch indicates 100mbps connections. I took the switch out and connected the long cable directly to the Samba share box, rebooted it, and did the transfer again with no improvement.

    The Samba machine:
    P3 650 mghz
    900+ mb ram
    OS on 18 gig hd(not sure how fast it is, probably original in the machine)
    Share attached to a new Promise SATA300 TX4 pci controller card with the 700gb hard drive being the only drive connected to it.

    I did not install the drivers for the SATA card because the CD only had windows drivers, and the linux drivers looked like they required making a floppy disk, and I don't have a floppy drive in this computer. So I just installed linux hoping it would have the driver already. The drive was mounted fine, so I assumed so. Just wondering if the manufacturer driver would improve performance. They only offer a SUSE and RedHat versions for linux. Which should I try to use?

    Thanks in advance.
    Last edited by AaronLS; July 7th, 2008 at 12:37 AM. Reason: revised title

  2. #2
    Join Date
    Dec 2007

    Re: Slow Samba file transfer

    Porion of my smb.conf, which I added the aio parameters to with no luck.

    #asynchronous IO
    aio read size = 1
    aio write size = 1
    aio write behind = true
    comment = Public Folder        
    path = media/store
    writable = yes     
    force create mask = 777
    force directory mask = 777
    read only = no

  3. #3
    Join Date
    Dec 2007

    Re: Slow Samba file transfer

    I tried copying the test file within the linux system with something like:
    cp some700mbFile some700mbFile2

    Even though it is both reading and writing on the same drive, it took 2min 20 seconds, which is about the same time it takes to copy it from the windows machine to the linux machine. Versus 1 minute copying from one windows machine to another. So it seems to not be related to samba or the network.

    Either my hardware is to blame, or some part of linux's use of the hardware. Windows normally asks about something like block sizes when formatting a drive, which effects write performance for large files. I don't remember a setting like this when I used gparted LiveCD to format my 700gb drive to NTFS.
    Last edited by AaronLS; July 6th, 2008 at 10:56 PM. Reason: mispelling

  4. #4
    Join Date
    Dec 2007

    Re: Slow Samba file transfer

    It looks like I could make the drive some other file system instead of NTFS. Could this potentially be a problem. I see a lot of people in the past saying that linux can NOT write to a NTFS file system. So perhaps this has been added in the alst couple years and perhaps isn't polished in terms of performance?

    I will be copying files to and from the server quite a bit, some being several gigs and some being large groups of source code files(tons of very small files).

    Am I correct in understanding that I can make the harddrive whatever filesystem I want and samba will still be able to serve it to other windows clients?
    Any suggestions for a file system I should try?

  5. #5
    Join Date
    Dec 2007

    [SOLVED] Re: Slow Samba file transfer

    Reformatted/partitioned (whatever the right term is) with GParted Live CD to ext3 file system instead of ntfs. Changed fstab entry for the hard drive from ntfs to ext3. Rebooted.

    The copy from Windows to Linux is now only about 18% slower than the copy from Windows to Windows. This is much better than the 150% slower it was before!

  6. #6

    Re: [SOLVED] Slow Samba file transfer

    OP request to be moved to Hardware & Laptops.
    Learning is not attained by chance, it must be sought for with ardor and attended to with diligence. Abigail Adams ( 1744 - 1818 ), 1780;

    My blog Poetry and More Free Ubuntu Magazine


Posting Permissions

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