Hi there
I am running my Pi mod B with the latest Raspian and Samba, which exposes my USB drives mounted by usbmount.
The USB drives are exFat formatted, so i can access them from the pi and also from my windows 7 box, and i do not hit the ntfs cpu penalty. Everything works well, even my Mediatomb server so i can watch movies from my WDTV Live.
So problem is a timeout while copying large files(>2g) from my windows 7 box using a samba mount to the attached usb device. It just times out. Smaller files work pretty well. From my point of view, windows tries to allocate the space on the usb device by creating an empty file with the same size, and then it copies the data to the drive. And the problem here is that creating a large empty file on the pi is pretty slow, and while the pi fills the space, windows will timeout.
I've tested writing to the USB device by using dd, here are the results:
pi@raspberrypi ~ $ dd if=/dev/zero of=/media/usb0/test.tmp bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 65.9082 s, 8.0 MB/s
Seems like the "fiil speed" is about 8 MB/s. It the system would use this as the copy speed, everything is ok, but this stupid win* tries to allocate the space first.
Any ideas?
Thanks in advance
Mirko
-
- Posts: 4
- Joined: Mon Nov 25, 2013 11:58 am
Re: Slow samba performance / timeout while copying of large
Can you use a windows version of rsync instead? That would be better than using Samba anyway.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
-
- Posts: 4
- Joined: Mon Nov 25, 2013 11:58 am
Re: Slow samba performance / timeout while copying of large
Hmm, i need a user friendly ui, is there something available? Perhaps OSS?
Re: Slow samba performance / timeout while copying of large
No idea, Google is your friend. Rsync will be much faster than Samba, or you could even use FTP which definitely does have a windows version.mirkosertic wrote:Hmm, i need a user friendly ui, is there something available? Perhaps OSS?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Re: Slow samba performance / timeout while copying of large
Slow samba?
Oh, they must have called it sarabande.
Invented in hell, as Cervantes once said.
In short, don't use it.


In short, don't use it.
-
- Posts: 4
- Joined: Mon Nov 25, 2013 11:58 am
Re: Slow samba performance / timeout while copying of large
Hi there
I tested with SFTP and FTP, and they are not much faster. I will check for a nice rsync ui. Problem is not the performance, it is the timeout!
Regards
Mirko
I tested with SFTP and FTP, and they are not much faster. I will check for a nice rsync ui. Problem is not the performance, it is the timeout!
Regards
Mirko
-
- Posts: 4
- Joined: Mon Nov 25, 2013 11:58 am
Re: Slow samba performance / timeout while copying of large
Hmm, i did some testing.
After formatting the USB drive with EXT4, my problems went magically away. I also tweaked some samba settings and with a large buffer of:
socket options = SO_KEEPALIVE TCP_NODELAY SO_SNDBUF=524288 SO_RCVBUF=524288
I am reaching an average write transfer speed between my windows box and the pi of ~5-5.5MB/s, with a smaller buffer of 8192 bytes i am reaching max. 2MB/s.
This is quite strange. Any ideas? If EXT4 filesystem fixes my problems, i will stay with it. For Windows direct USB access, i will try Paragon ExtFS, but i would really like to know WHAT is the problem for this? Bad fs drivers, or bad configuration? Hopefully not bad hardware
Regards
Mirko
After formatting the USB drive with EXT4, my problems went magically away. I also tweaked some samba settings and with a large buffer of:
socket options = SO_KEEPALIVE TCP_NODELAY SO_SNDBUF=524288 SO_RCVBUF=524288
I am reaching an average write transfer speed between my windows box and the pi of ~5-5.5MB/s, with a smaller buffer of 8192 bytes i am reaching max. 2MB/s.
This is quite strange. Any ideas? If EXT4 filesystem fixes my problems, i will stay with it. For Windows direct USB access, i will try Paragon ExtFS, but i would really like to know WHAT is the problem for this? Bad fs drivers, or bad configuration? Hopefully not bad hardware

Regards
Mirko
Re: Slow samba performance / timeout while copying of large
Buffering makes sense because writing to USB HDD is a slow process. I bet you will see high waiting % in top. Remember, your USB subsystem is stressed twice with the same data, so when receiving it can't write at the same time.