Rodman101
Posts: 16
Joined: Tue Jun 11, 2013 10:55 pm

Deathly Slow Speeds as a Media NAS

Fri Jun 21, 2013 11:27 pm

I have my RPi set up as a NAS using Samba and mapped as a network drive on my laptop. I've been trying to use the RPi as a place to store my movies and T.v shows and stream them anywhere in the house. So far I have run into very slow connection speeds on my devices. Right now I have it set up as 120GB IDE/ATA HDD->USB 2.0 EXT Enclosure(theoretical 480Mb/sec)-> RPi->Ethernet->2Wire Router->WiFi-g->Laptop. With this setup, I'm getting about 70 KB/sec on a good day and it takes forever to load the folders and not to mention the constant freezing when playing media. I've tried .mp4, .mkv, .mov, .avi, .3gp video files and they all have the same problems. When I have my laptop plugged in via Ethernet, the speeds improve to 250KB/sec but that is still horridly slow when compared to the 25MB/sec I get when the HDD is plugged into the laptop directly. If anyone has any possible explanation, or ideas as to why it's so slow, or any ideas as to how to increase the speed, I'd greatly appreciate it.

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Deathly Slow Speeds as a Media NAS

Sat Jun 22, 2013 12:53 am

Filesystem?

EXT4 > NTFS

Rodman101
Posts: 16
Joined: Tue Jun 11, 2013 10:55 pm

Re: Deathly Slow Speeds as a Media NAS

Sat Jun 22, 2013 12:59 am

teeth_03 wrote:Filesystem?

EXT4 > NTFS
Oh, sorry i forgot to mention that. The HDD is formated with NTFS and I have ntfs-3g correctly installed and configured.

RasPiATV
Posts: 6
Joined: Sun Jun 24, 2012 3:40 am

Re: Deathly Slow Speeds as a Media NAS

Sat Jun 22, 2013 1:18 am

1. EXT4 better throughput than NTFS (NTFS-3g, is hacked together reverse engineered, microsoft never gave out ntfs code, my understanding is it will always perform poorly on linux)
2. NFS is faster than Samba
3. The 2Wire ADSL Modem/Router combos are absolutely sinister, I've done IT work for many people who hate them and I once owned one myself. They tend to disconnect and die often and NVRAM goes bad with time. Test your raspberry at a friends house and see if it's not your 2wire holding you up as well
4. WiFi is always slow, Survey your area if oyu have an android phone download WiFi Analyzer, it will tell you if everyone in your neighborhood is on the same WiFi channel. You should change your router to be on the lowest populated frequency to avoid conflicting with other signals. If you have own/owned a DD-WRT Compatible router, you can up the amount of milliwatts going to the antennas and not only get better signal and coverage, but decent throughput. You may also want to change the settings of your WiFi in the laptop ( my computer > manage > devices > network adapters > rightclick wifi chipset > properties) most will have options for aggressive roaming, or disabling power saving mode for the antenna. It may help if you have a low signal strength, sometimes you have a high strength but only because you are close, and there is still noise on the channel from neighbors.
5. Wired networks will always be faster. Try RPi -> ethernet-> Switch/router -> ethernet -> laptop.
6. Check your drive if it's an older one, it may only have 2MB or 8MB cache, which would hinder the drives performance compared to the newer ones. This is something you cannot change unfortunately but it would give you a reason at least.

Goodluck! =)

P.S. CubieBoard2 just came out dualcore Allwinner A20, mali400 gpu, 1GB ram, native sata, and ethernet is not on the usb chip, if I am correct it would way outperform at being a NAS. Very few singleboard computers have onboard sata, cubie seems to be the only one with an onboard power adapter as well. (Marsboard, is basically cubieboard for the same price minus a ton of features, including the onboard power, IR receiver, etc,.)

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Deathly Slow Speeds as a Media NAS

Sat Jun 22, 2013 2:00 am

I get around 11 MB/s with my NAS, I'm not too ashamed by that all.

I'm using Samba with EXT4 drives, rsync to backup to drive 2

drgeoff
Posts: 12421
Joined: Wed Jan 25, 2012 6:39 pm

Re: Deathly Slow Speeds as a Media NAS

Sat Jun 22, 2013 3:47 pm

teeth_03 wrote:I get around 11 MB/s with my NAS, I'm not too ashamed by that all.
If your NAS is a RPi then 11 Mbyte/s through its 12.5 Mbyte/s (gross including overheads) ethernet interface is pretty good. :)
Quis custodiet ipsos custodes?

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Deathly Slow Speeds as a Media NAS

Sat Jun 22, 2013 6:22 pm

Yeah, my Nasberry Pi , I can copy large files over to it at around 11 MB/s from my Windows 8 PC, it averages 9-10, but caps at 11.

External USB 3.0 Seagate 3 TB drives

jnihil
Posts: 37
Joined: Sat Dec 29, 2012 12:29 pm

Re: Deathly Slow Speeds as a Media NAS

Sun Jun 23, 2013 6:06 pm

Don't use 802.11g. It's half-duplex and at best you'll only get around 22Mbps.
802.11n with its aggregation/block-acknowledgement will give you a much higher throughput.
(Though you'll never get 480Mbps as you wish on a RPi as you would get CPU-bound).
The snag is you'll need to replace your AP.

User avatar
yoyojacky
Posts: 31
Joined: Sun Jun 23, 2013 3:42 pm
Location: Shanghai - CN
Contact: Website

Re: Deathly Slow Speeds as a Media NAS

Mon Jun 24, 2013 6:58 am

1. which brand is your SD card ? what type is that card ? my SD card is sandisk Ultra 30MB/s Class10 , the class4 is slow than class 10
2 . what's protocol is available on your router ? I recommend using 802.11n,
it can reach 300MB/s speed..
3. my laptop is based on CentOS6.2, my pi use nfs server sharing stuff with my laptop. it's really good.
4. My pi connect to a wireless card with this brand : EDUP - it can support 802.11n protocol
:D :D :D :D
5. Is that HDD connecting to your pi directly? if so , you'd better use a power supply to your HDD, because the pi just have 5v power , use a 5V--2A AC-adapter supply the HDD .

Drifting by riding a donkey~

I_scoff_cake
Posts: 11
Joined: Mon Jun 24, 2013 7:17 pm

Re: Deathly Slow Speeds as a Media NAS

Mon Jun 24, 2013 8:20 pm

Hi Rodman101. How are you streaming or do you just mean 'streaming' to your laptop?

I'm going to set up a NAS and I'll borrow some advice from this thread thanks, especially re wireless set up.

I'm using a Mac as my laptop though so I'm not sure what the best file format to use on my HDD's is going to be, and I'll use AFP over Netatalk I think not Samba.

Rodman101
Posts: 16
Joined: Tue Jun 11, 2013 10:55 pm

Re: Deathly Slow Speeds as a Media NAS

Tue Jun 25, 2013 1:31 am

yoyojacky wrote:1. which brand is your SD card ? what type is that card ? my SD card is sandisk Ultra 30MB/s Class10 , the class4 is slow than class 10
2 . what's protocol is available on your router ? I recommend using 802.11n,
it can reach 300MB/s speed..
3. my laptop is based on CentOS6.2, my pi use nfs server sharing stuff with my laptop. it's really good.
4. My pi connect to a wireless card with this brand : EDUP - it can support 802.11n protocol
:D :D :D :D
5. Is that HDD connecting to your pi directly? if so , you'd better use a power supply to your HDD, because the pi just have 5v power , use a 5V--2A AC-adapter supply the HDD .
I'm using a class 10 8GB Sandisk card.
I'm using 802.11g, but have also tried 802.11n with similar results.
The HDD has it's own power supply.

Rodman101
Posts: 16
Joined: Tue Jun 11, 2013 10:55 pm

Re: Deathly Slow Speeds as a Media NAS

Tue Jun 25, 2013 1:32 am

I_scoff_cake wrote:Hi Rodman101. How are you streaming or do you just mean 'streaming' to your laptop?

I'm going to set up a NAS and I'll borrow some advice from this thread thanks, especially re wireless set up.

I'm using a Mac as my laptop though so I'm not sure what the best file format to use on my HDD's is going to be, and I'll use AFP over Netatalk I think not Samba.
By streaming, I mean i have a video file that is on the HDD and I'm trying to play it on my computer.

jnihil
Posts: 37
Joined: Sat Dec 29, 2012 12:29 pm

Re: Deathly Slow Speeds as a Media NAS

Mon Jul 01, 2013 4:10 pm

Rodman101 wrote: I'm using 802.11g, but have also tried 802.11n with similar results.
You would, if you're still using an 802.11g AP.

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 437
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website

Re: Deathly Slow Speeds as a Media NAS

Wed Aug 07, 2013 11:44 am

If it's anything like my troubles with RaspBMC, then it's the fact that you're using Samba that is the issue. Some say it is fine, but many experience slow speeds.

I couldn't stream films over Samba without major buffering, rendering it useless. I then started to stream via NFS (HaneWin server) and hey presto everything is perfect now.

Try NFS if you can...

the__cat
Posts: 1
Joined: Sun Sep 01, 2013 10:32 am

Re: Deathly Slow Speeds as a Media NAS

Sun Sep 01, 2013 10:34 am

802.11n is also half-duplex, but offers higher throughput. However, at 11Mbps transfer speeds between client and Pi there's NO advantage to using 802.11n whatsoever.

ChicagoBob123
Posts: 79
Joined: Fri Aug 30, 2013 1:48 pm

Re: Deathly Slow Speeds as a Media NAS

Fri Sep 06, 2013 9:13 pm

I have a Pi setup as a NAS and one as portable WiFi media server.
The Nas/Pi is hooked up via Ethernet and when I stream DVD's it seems to work just fine.
How fast a connection do you need to stream? A DVD movie is around 3MB/sec a blue ray is less.
So how much data are you trying to pull? You know you are also constrained by USB 2.0 which can only
send about 19MB/sec though the port.

kolon
Posts: 13
Joined: Tue Sep 10, 2013 10:34 pm

Re: Deathly Slow Speeds as a Media NAS

Tue Sep 10, 2013 10:38 pm

@ChicagoBob123: bluray is not less than dvd, if it were, it would be lower quality and video would be much longer for the increased disc space!

victagayun
Posts: 129
Joined: Sun Apr 15, 2012 4:01 pm
Contact: Website

Re: Deathly Slow Speeds as a Media NAS

Tue Sep 17, 2013 8:45 am

sav25 wrote:If it's anything like my troubles with RaspBMC, then it's the fact that you're using Samba that is the issue. Some say it is fine, but many experience slow speeds.

I couldn't stream films over Samba without major buffering, rendering it useless. I then started to stream via NFS (HaneWin server) and hey presto everything is perfect now.

Try NFS if you can...
I have win7 pro pc, how to install NFS? I there is an increase of about more than 5gig from win7pro to enterprise to access NFS if Im not mistaken. Any other way to use smaller footprint to access NFS?
I am also having the same problem of transfer speed of 700kb/s (as stated by win7).
From my setup, I have the ff:
1. XBMC from raspbmc.com
2. Deluge from torrent
3. samba to share to win7 pcs and netbooks of my kids (this is the reason i need a smaller footprint, otherwise there will be small space left for them).

ChicagoBob123
Posts: 79
Joined: Fri Aug 30, 2013 1:48 pm

Re: Deathly Slow Speeds as a Media NAS

Tue Sep 17, 2013 7:46 pm

kolon wrote:@ChicagoBob123: bluray is not less than dvd, if it were, it would be lower quality and video would be much longer for the increased disc space!
Sorry was confusing DVD with DV video. DV Video was more than Blu Ray when it came out.
DV Video was about 26Mbs while Blu Ray was about 10-15 Mbps which later went up and is now around 40 Mbps.
The compression of the movies on Blu Ray is radically different than DVD so it actually can have a lower data rate than
DVD. As far as quality goes.. I am no fan of the Blu Ray compression choices but people buy it.
A data rate of about 160Mbs would be lightly compressed HD video which compressed is over1280Mbps.
Blu Rays choice of 4:2:0 YUV is why I dont think a lot of Blu Ray. 4:2:2 is a minimum of good quality but people watch it.

ChicagoBob123
Posts: 79
Joined: Fri Aug 30, 2013 1:48 pm

Re: Deathly Slow Speeds as a Media NAS

Tue Sep 17, 2013 7:58 pm

Oops needed to fix this.
HD video which "uncompressed" is over 1280Mbps.

tractorballet
Posts: 1
Joined: Sun Jan 19, 2014 9:14 am

Re: Deathly Slow Speeds as a Media NAS

Sun Jan 19, 2014 9:25 am

For what it's worth, I was struggling with NAS speeds of < 1 MB/s on rasbian and raspbmc transferring from PI > Ethernet > Router > wifi > Laptop. I tried most of the suggestions online - the biggest two improvements were formatting from NTFS to EXT4 (up to 2.5MB/s) and using a new and shorter Ethernet cable between the Pi and the Router (up to 7 MB/s).

I might have had a faulty Ethernet cable all along, but if you haven't tested with a few different cables you could have the same problem.

indergod
Posts: 8
Joined: Tue Jun 03, 2014 9:32 am

Re: Deathly Slow Speeds as a Media NAS

Tue Jun 03, 2014 3:38 pm

Hi,

It's my first post and just wanted to resurrect this thread in the possibility that there might have been some advances. I've noticed with XBMC v.13 (Gotham) that there is the possibility to modify the video cache for streams played from a NAS. My understanding was that prior to v.13, modifying the cache settings only affected non-local (ie not NAS, and not physically attached HDD video), whereas with v.13 the setting can be applied to NAS streams too.

I'm new to this all, and if I'm reading the below link correctly (which I'm probably not) then even though the RPi Model B has 512MB ram, by using the following example setting, there might be a fix to the low speed problem within XBMC only by increasing the amount of video that is held in cache? It might delay the video starting slightly (as it might take some time to "fill" the cache sufficiently before the video starts playing, but after that there might be enough of a buffer to allow videos to play smoothly. Can anyone confirm if this might work (before I start messing with my system and probably break something):

Code: Select all

<advancedsettings>
  <network>
    <buffermode>1</buffermode>
    <cachemembuffersize>0</cachemembuffersize>
    <readbufferfactor>4.0</readbufferfactor>
  </network>
</advancedsettings>
To confirm, the above is using the following variables:
Buffer mode: 1 (applies to all streams, including NAS)
Buffer size: 0 (allows unlimited use of the HDD to fake the "presence" of additional RAM beyond the onboard 512mb of the PPi)
Buffer factor: 4.0 (I'm least sure of what this does, but it appears that it also acts to increase the buffer size, albeit it adds extra load on your network router, as opposed to the "buffer size" variable which increases buffer size by adding extra load/demands on your HDD).

Link to XBMC wiki explaining how to use the new feature: http://wiki.xbmc.org/index.php?title=HO ... e_settings

For reference, I'm using a RPi Model B with Samba as a NAS, connected to my router via Cat5 cable. I am trying to stream on XBMC running primarily on another RPi Model B (usually connected via Wifi), but from time to time (rarely) I also try to use XBMC on a Windows 7 PC, or a Android device running Jellybean. As per the posts above, I suspect the issue in streaming lies with the RPi NAS, and not necessarily the XBMC client, but this cache size adjustment might act to fix the buffer issues "client side"???

Any comments at all appreciated, and apologies if I've missed anything out, like I said I'm new to all of this but very keen to learn more :)

User avatar
Dark Presh
Posts: 4
Joined: Wed Jun 04, 2014 8:32 am
Location: England

Re: Deathly Slow Speeds as a Media NAS

Wed Jun 04, 2014 8:52 am

Hi all, - new to the forum! :)

I would also like to find a solution and wonder if changing the cache size will help :?

I'm running Raspbian with an externally powered HDD (ext4) as a headless NAS drive. I'm trying to stream video from the Pi to an Android device running 4.4 KitKat using XBMC over a Samba network. Streaming however is painfully slow and after a few seconds the Pi gives up, the HDD crashes and is inaccessible until a reboot.

Unfortunately I'm at work so I can't post a log till later.

Can anyone shed any light on this?

indergod
Posts: 8
Joined: Tue Jun 03, 2014 9:32 am

Re: Deathly Slow Speeds as a Media NAS

Wed Jun 04, 2014 12:08 pm

I made my last post in anticipation of the issues that I might encounter, on the basis of the experience of others on this thread. I only had one RPi at the time, which I'd previously used as a standalone XBMC machine running movies and media off the attached external (independently powered) HDD.

When I posted yesterday I had ordered a second model B but it hadn't arrived yet (the plan was to use one Model B as a headless NAS and the other as a XBMC client streaming from the headless NAS). Because I was impatient and figured I could do without the Pi running XBMC for a couple of days until my order for a second Pi was delivered, I grabbed a spare SD card and changed over my existing Pi to a headless NAS. I kept my SD card from the old XBMC install to one side so that when my second Pi arrived I could just put the card in and get my XBMC client Pi back.

My second Pi arrived yesterday, and as planned I put my old SD card in and got my XBMC pi running again. Since I'd posted on here I did a quick update to Gotham too so that I would be ready to act on anything you guys could suggest.

The weird thing is....running the two Pi's together yesterday I had no issues with streaming! I'm not sure what transfer rate etc I'm getting, but I ran a 1080p movie last night for a good 15-20 minutes and it had no issues in terms of stutter or slow transfer issues? I'm wondering whether the advancedsettings.xml tweak is applied as standard in the latest RaspBMC distribution, as that's the only thing I can put down to everyone else having issues to date and me not seeing any last night??? I also wonder this as it does now take a fair bit longer for the video to start once I hit play than it used to with the old attached HDD, so I wonder this is the time in which the Pi is filling its cache which has been artificially extended through the advancedsettings.xml tweak?

Hopefully it wasn't just a one-off and I'll continue to have no issues, but I thought I would share the above with you all anyway, in case an update to Gotham might help?

I guess my question above still stands however for others that might be on older versions of XBMC (v.12 or older) and could fix the issues by tweaking advancedsettings.xml rather than doing a full update to Gotham v.13. The question might stand for me also if my Pi setup decided to behave for one night only last night and wants to throw it's toys out of the pram when I test it again tonight and start with the dreaded stutter!

Dark Presh - as I say I'm no expert on the matter (rather I'm here to benefit from the experience of the experts), but before my second Pi had arrived but while my NAS Pi was setup, I did try installing XBMC on my Samsung Galaxy S3, and I WAS getting stutter and transfer issues with the same movie I was playing last night (to the point it was unwatchable). This surprised me as I thought the CPU in the S3 was more powerful than the Pi, but maybe it has something to do with the diffference in GPU? I'm just wondering whether you having issues has anything to do with you using an android based XBMC client. I must say though that my S3 was running v.12 when it was having issues and I never tried it with a Gotham build for Android which might have worked (I'm not sure if one even exists).

Just my tuppence :)

User avatar
Dark Presh
Posts: 4
Joined: Wed Jun 04, 2014 8:32 am
Location: England

Re: Deathly Slow Speeds as a Media NAS

Wed Jun 04, 2014 12:39 pm

Hi indergod, thanks for the reply.

I'm also using the Gotham v.13 of XBMC and I've also tested the video stream on my Windows machine with the same awful results ):

I'm thinking it could be a problem with my external HDD connected to the Pi as it crashes after a few seconds and becomes inaccessible (by XMBC or through SSH), I'm going to try using the fastest removable storage I have lying around and see if the stream is improved or not.

Return to “Media centres”