Discussion

Samba speed incredibly slow

16 15524
shadoom  
Edited by shadoom at Wed Dec 31, 2014 09:53

I've recently bought a Banana Pi to replace my RPi as the samba speed was unbearably slow.
I tried Bananian installed a samba server and the speed to a USB Stick and/or drive was 6 to 8 mb/s.
After tweaking the smb.conf with the usual tweaks it went to 3-6 mb/s.
Now I installed OpenMediaVault and the samba speed starts with 20-30 mb/s which is great but then it drops to 3-6 mb/s within a couple of seconds as you can see here

pic

pic
.
I've read the other threads but the filesystem is not the problem. I've tried ntfs, exfat, fat32, ext3, ext4 and all act the same.
My router(connected usb hdd) does 12 mb/s without any drops and other computers in the network have the expected speed.

I've seen a youtube video (here https://www.youtube.com/watch?v=zbH3hEgZ1QE at 8:20) where someone has similiar issues.
Is it possible that my Banana Pi is damaged or a copy?
Use a SATA drive, it should help.

shadoom  
I understand that SATA probably would fix it but I had to order it from someone who sells it out of China so it'll take a while.
I've seen people with great USB2 performance over samba thats why I am wondering how can it differ so much?

Well, FAT over USB2 is very slow on the RPi and BPi (10MB/sec-20MB/sec)

Add SAMBA on top of that, it it will be really slow. You will not see 20MB/sec over SAMBA without a SATA drive, maybe not even then.

You should be able to get about 5MB/sec though, try increasing ethernet frame sizes, and google for "tuning SAMBA"

My speed for SMB on Banana Pi with SATA disk (fat32) is 10.9 - 11.2 MB/s, no more than that.
With Raspberry Pi, just ~2-3 MB/s, with a USB disk formatted with NTFS (yeah ...)

actkk2000 replied at Wed Dec 31, 2014 15:14
My speed for SMB on Banana Pi with SATA disk (fat32) is 10.9 - 11.2 MB/s, no more than that.
With Ra ...

Try ext3 or ext4 on the SATA drive, it should help.

I'm using a Banana Pi as a small server and from my experience, this is not normal. I have a USB hard drive attached that is formatted with ext4. Even without much tweaking, I can get 24 MB/s read performance and even slightly higher write performance. With some tweaking, I got it up to 27-30 MB/s. You might have a look into these threads for further information:
http://forum.lemaker.org/thread-5802-1-1-1.html
http://forum.lemaker.org/thread-9267-3-1-3.html

You should be careful not to blindly trust tips that work on normal desktop computers. I have another Linux server running on x86 hardware and when I apply the same set of tweaks to the samba configuration on Banana Pi, some of these values actually have a negative impact. So you should do some testing before copy and pasting configuration files.

Also from my experience, some (few) flash drives can sometimes perform significantly slower on linux systems than what I see on Windows. So you if you're using a pendrive you should check wheter the disk performance on your Banana Pi actually allows for faster samba speeds at all.

Cheers,

Timo

Edited by actkk2000 at Wed Dec 31, 2014 21:45
mikronauts replied at Wed Dec 31, 2014 20:24
Try ext3 or ext4 on the SATA drive, it should help.


Thank you, I already knew that, but I prefer to keep some compatibility with Windows...
I just mentioned it in case someone else wanted the same... it is just a little speed sacrifice.
If the disk will never gonna be connected to Windows, then ext file systems are better.

shadoom  
silentcreek replied at Wed Dec 31, 2014 18:23
I'm using a Banana Pi as a small server and from my experience, this is not normal. I have a USB har ...

Thank you for your comment

Actually I read both of your threads before, which you posted and I did tweak it with the settings mentioned in there.

I've noticed that the mount.ntfs process has a 100% cpu usage, started using mount.ntfs-3g with the same results, used gparted to format it to ext3 did the tests and then with ext4 on following drives/sticks:
Kingston 16GB USB2 (Stick)
SanDisk Extreme USB3 (Stick)
WesternDigital My_Book Essential 3TB (HDD)

Even with ext3/4 I see high cpu usage this time around not with the mount.ntfs(-3g) but the smbd process uses when transferring files usually over 100%(in top)

The best results I got was with the Sandisk Extreme USB3, 9mb/s write 42mb/s read but only when I used ext4.
NTFS-3G had higher write speeds than ext4 though, somehow I believe the low write performance has something to do with high cpu usage.

Whats your load when you transfer things over samba?

shadoom  
Edited by shadoom at Wed Dec 31, 2014 20:42

I did some testing...
All have heavy speed drop after 10-20 seconds of writing, from ~20MBps to the posted speeds

Kingston DataTraveler DTSE9H 16GB

ext3 (i repeated and reformatted this one 3 times to make sure)
Write: 2.1949760 MBps (Average)
Comments: Freezes every 30 seconds FOR 30 seconds (LAN Speed test & Windows File Transfer), drops from 18 MBps to 4 MBps within first 10-20 seconds - spikes to 20% smdb process then back to ~0-1%
Read: 37.0693770 MBps (Average)
Comments: 120% smbd load

ext4
Write: 5.508716 MBps (Average)
Comments: 20-30% smbd
Read: 41,933621 MBps (Average)
Comments: 120% smbd

ntfs
Write: 5.4574890 MBps (Average)
Comments: mount-ntfs 50-80% load
Read: 22.8699880 MBps (Average)
Comments: mount-ntfs 20-30% load, smbd 70-80% load

ntfs-3g
Write: 5.4839570 MBps (Average)
Comments: 50% mount.ntfs-3g, 20% smbd
Read: 19.7495630 MBps (Average)
Comments: 50% smbd, 20% mount.ntfs-3g


SanDisk Extreme 32GB

ext3
Write: 12.1934710 MBps (Average)
Comments: 70% smbd, 15% ksoftirqd
Read: 37.1547080 MBps (Average)
Comments: 90% smbd

ext4
Write: 21.1169750 MBps (Average)
Comments: 70% smbd, 15% ksoftirqd/0
Read: 42.3369520 MBps (Average)
Comments: 125% smbd

ntfs
Write: 7.4581950 MBps (Average)
Comments: 70% mount.ntfs, 30% smbd
Read: 22.1997310 MBps (Average)
Comments: 60% smbd, 30% mount.ntfs

ntfs-3g
Write: 7.4496340 MBps (Average)
Comments: 70% mount.ntfs-3g, 30% smbd
Read: 20.1320500 MBps (Average)
Comments: 55% smbd, 20% mount.ntfs-3g

You have to log in before you can reply Login | Sign Up

Points Rules