Samba Performance


151 posts   Page 1 of 7   1, 2, 3, 4, 5 ... 7
by beatmag » Mon Aug 06, 2012 11:45 am
Hi all,

I know there are some old threads about samba performance but they aren't really what I want to as.
I'm wanting to ask the samba performance over 100mbit network, and over a USB hd.

What sort of MB/s write and read speeds do you all get?
What file system do you use? NTFS? FAT32? ext3? ext4?

Any samba users on the Pi can you list your speeds?

thanks.
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by godFather89 » Mon Aug 06, 2012 11:58 am
USB HD via wireless (150mbps USB stick - close to router) - 3.8MB/s transfer to a windows 7 machine.
Posts: 150
Joined: Fri May 18, 2012 9:40 am
Location: Timisoara, RO
by beatmag » Mon Aug 06, 2012 1:08 pm
godFather89 wrote:USB HD via wireless (150mbps USB stick - close to router) - 3.8MB/s transfer to a windows 7 machine.


thanks godfather89.
3.8mb is not too bad. would that be ext4 or ntfs?

anyone on ethernet? ntfs or ext4.
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by urfankhaliq » Mon Aug 06, 2012 1:18 pm
USB HDD plugged into the Pi with an NTFS partition and I get about the same. The most I have is about 4MB/s
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm
by oakfan52 » Mon Aug 06, 2012 6:28 pm
urfankhaliq wrote:USB HDD plugged into the Pi with an NTFS partition and I get about the same. The most I have is about 4MB/s

Same here which is slow. I should be seing 7-8MB/sec easy over 100Mbps. Can anyone running ext3/ext4 comment on their speed? I am using NTFS right now.
Posts: 13
Joined: Fri Aug 03, 2012 6:19 pm
by gnumengor » Mon Aug 06, 2012 6:51 pm
I'm getting r/w 1,6Mb/s from a Fat32 USB HD connected to the pi via Wifi... I think my performance sucks! hehe :?
Posts: 2
Joined: Mon Aug 06, 2012 6:38 pm
by beatmag » Tue Aug 07, 2012 9:29 am
i guess performance isn't really that great on the pi.
i've read some people getting 7mb+ but........ maybe they were just rumours.....

any more people want to comment?
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by scorpion_tr » Tue Aug 07, 2012 11:13 am
oakfan52 wrote:Same here which is slow. I should be seing 7-8MB/sec easy over 100Mbps. Can anyone running ext3/ext4 comment on their speed? I am using NTFS right now.

I am getting around 5MB/s with ext3.
Posts: 18
Joined: Wed Jul 04, 2012 1:37 pm
by oakfan52 » Tue Aug 07, 2012 4:46 pm
scorpion_tr wrote:
oakfan52 wrote:Same here which is slow. I should be seing 7-8MB/sec easy over 100Mbps. Can anyone running ext3/ext4 comment on their speed? I am using NTFS right now.

I am getting around 5MB/s with ext3.

Thanks I was curious because while trafering files I see the ntfs-3g driver above 65% cpu in top. I was wondering if the ntfs-3g driver was slowing down transfers. However, it appears that the linux samba server is just slow.
Posts: 13
Joined: Fri Aug 03, 2012 6:19 pm
by scorpion_tr » Tue Aug 07, 2012 5:18 pm
I was using NTFS at the beginnig but because of low transfer speeds, which was around 4MB/s at that time, I converted my drive to ext3. So I can say that speed increased a little but still its well below LAN's capacity. I also think it is related with samba, because it uses %80 of cpu.
Posts: 18
Joined: Wed Jul 04, 2012 1:37 pm
by beatmag » Tue Aug 07, 2012 9:11 pm
Is ext4 going to be much faster? i thought ext3 had some bottlenecks in it........
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by Dark » Tue Aug 07, 2012 9:19 pm
8-9megabyte/s with ext4 external hd (3.5"). Off course when transferring small files the speed drops.
Posts: 21
Joined: Thu May 10, 2012 4:39 pm
by BigEndian » Tue Aug 07, 2012 10:24 pm
Dark wrote:8-9megabyte/s with ext4 external hd (3.5"). Off course when transferring small files the speed drops.


do you get this speed on reading or on writing data to the raspberry?

I got around 4,5megabyte/s on reading and just 3megabyte/s on writing with an ext4 external hd.

I've then added the following line to smb.conf:

Code: Select all
socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535


now I have around 7,5megabyte/s on reading but still just 4megabyte/s on writing.

I measured my pure USB HDD performance on raspian with the following commands:

writing:
Code: Select all
dd if=/dev/zero of=/media/usb0/test.tmp bs=500K count=1024


reading:
Code: Select all
dd if=/media/usb0/test.tmp of=/dev/null bs=500K count=1024


and I get around 9megs on writing and over 30megs on reading, so there must be another bottleneck. top told me about 40% CPU wait time. Is there any possibility to optimize the samba performance further?
Posts: 19
Joined: Tue Jun 19, 2012 6:50 pm
Location: Munich // Germany
by beatmag » Wed Aug 08, 2012 10:26 am
are you all running the latest HW floating point kernel?
the one that came out recently.....
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by Nu7s » Wed Aug 08, 2012 10:50 am
beatmag wrote:are you all running the latest HW floating point kernel?
the one that came out recently.....


I am using the 2012-07-15-wheezy-raspbian.zip from the downloads page. Is this the one you are refering to?
Posts: 57
Joined: Wed Jul 25, 2012 9:14 am
by beatmag » Wed Aug 08, 2012 11:49 am
Nu7s wrote:
beatmag wrote:are you all running the latest HW floating point kernel?
the one that came out recently.....


I am using the 2012-07-15-wheezy-raspbian.zip from the downloads page. Is this the one you are refering to?


yes that one! is a kernel with hard ware floating points.
what speed are you getting on samba? from usb hd?
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by Nu7s » Wed Aug 08, 2012 1:25 pm
beatmag wrote:yes that one! is a kernel with hard ware floating points.
what speed are you getting on samba? from usb hd?


About 2.5MB write speed. Read speed I don't know, but enough to stream a 12GB 1080p file.

Download speed is maxing out on about 1.5MB/s. I'm really curious how some of you manage 5MB+ speeds. :(
Posts: 57
Joined: Wed Jul 25, 2012 9:14 am
by beatmag » Thu Aug 09, 2012 8:56 am
strange that everyone is getting different speeds....

generally i've found that......the bottle neck of samba transfer rates isn't really the USB HD not being faster enough, its always been...... cpu, and the filesystem.

i've got a MIPS router at 264mhz that can host at around 2-3mb/s. i would have thought the pi should reach around 10mb/s

:(
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by geoffreyc » Thu Aug 09, 2012 9:32 pm
Using a 1 TB USB drive (ext4), I average 8 - 9 MB/s using samba from windows (write) :)
Posts: 6
Joined: Tue Jul 24, 2012 10:09 am
by beatmag » Fri Aug 10, 2012 5:45 am
geoffreyc wrote:Using a 1 TB USB drive (ext4), I average 8 - 9 MB/s using samba from windows (write) :)


OMG WOW!
whats the read performance like...
ie win7 reading from the PI.
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by geoffreyc » Fri Aug 10, 2012 7:09 am
beatmag wrote:
geoffreyc wrote:Using a 1 TB USB drive (ext4), I average 8 - 9 MB/s using samba from windows (write) :)


OMG WOW!
whats the read performance like...
ie win7 reading from the PI.


Read doesn't want to go above 7MB/s for some reason :/ Maybe because of translation form windows to ext4. Very weird that I get faster speed on write then on read !
Posts: 6
Joined: Tue Jul 24, 2012 10:09 am
by Wendo » Fri Aug 10, 2012 7:50 am
Since file system shouldn't really affect the speed compared to network, my feeling is the limiting factor here is the poor USB driver which runs both the usb drive (obviously) and the network.

Work is being done on improving the usb driver but since all anyone has to go on is the existing driver that's, a) very badly written, and b) has little, if any useful comments, in it it's proving to be a difficult task

The pi isn't doing some sort of difficult conversion between windows and linux file systems since SMB has nothing to do with file system. You would likely see the close to the same speed trying to upload/download an FTP file to/from the pi. FTP would be slightly better only because SMB is inefficient. Maybe NFS would be a better test
Posts: 142
Joined: Sun Jun 10, 2012 8:27 pm
by beatmag » Fri Aug 10, 2012 8:50 am
is samba stable enough for 24/7 operation?
Posts: 25
Joined: Sun Apr 22, 2012 5:28 am
by Nu7s » Fri Aug 10, 2012 8:55 am
geoffreyc wrote:Using a 1 TB USB drive (ext4), I average 8 - 9 MB/s using samba from windows (write) :)


I wonder if anyone who is reaching these speeds is willing to share their image, so I could test if it's software or hardware related?
Posts: 57
Joined: Wed Jul 25, 2012 9:14 am
by geoffreyc » Fri Aug 10, 2012 9:18 am
Nu7s wrote:
geoffreyc wrote:Using a 1 TB USB drive (ext4), I average 8 - 9 MB/s using samba from windows (write) :)


I wonder if anyone who is reaching these speeds is willing to share their image, so I could test if it's software or hardware related?

I just run a raspbian image (pisces) with a simple apt-get install samba, but I'll share my samba config file as soon as i get home tonight.
Posts: 6
Joined: Tue Jul 24, 2012 10:09 am