pandapi
Posts: 120
Joined: Tue Feb 28, 2012 6:58 am

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 2:41 pm

I"m not overly knowledgeable on this but i"ve done a bit of reading to try and get things straight in my mind, but some of it may be incorrect. Please correct me if it is!

So, i believe the B model of the Pi has 2xUSB and the ethernet running on the USB controller?

Theoretically USB2 has a bandwidth of 480Mbits/s ~= 40MBytes/s.

From experience i know you rarely get that, even when connecting just 1 device (eg, HDD) i can"t get 40MBytes/s even though the drive is capable of more than that.

Assuming you are maxing out the 100Mbit ethernet that is 12.5MBytes gone.

(can the Pi max out the ethernet?)

Theoretically that still leaves 27.5MBytes of bandwidth available. But how much of that will _actually_ be available?

Are there any real-life examples of what USB peripherals can work without blowing the bandwidth?

I think in an ideal world i would use one Pi to do the following:

Stream stuff over ethernet (12.5MB/s)

Receive 1 HD tv stream (6MB/s ???)

Receive up to 2 SD tv streams (2x2MB/s ???)

Write up to 3 streams to disk (10MB/s)

That totals 32.5MB/s which is theoretically possible, but in real-life???

I hope you aren"t all asleep.

Thanks

User avatar
RaTTuS
Posts: 10531
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 2:53 pm

well until we see them in the wild ... GOK
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

pandapi
Posts: 120
Joined: Tue Feb 28, 2012 6:58 am

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 3:05 pm

Well, not exactly. There are alpha boards out there. I assume people like xbmc/fedora/etc have also had dev boards for a while.

People at the foundation must have actually used them, there is a video on the bbc website of eben using one.

While people may not have attached the same peripherals as i listed i assume someone somewhere must have tested the USB controller in some way?

Kernel
Posts: 395
Joined: Sat Mar 03, 2012 12:53 pm

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 4:37 pm

pandapi said:


Well, not exactly. There are alpha boards out there. I assume people like xbmc/fedora/etc have also had dev boards for a while.

People at the foundation must have actually used them, there is a video on the bbc website of eben using one.

While people may not have attached the same peripherals as i listed i assume someone somewhere must have tested the USB controller in some way?



tbh we don't really hear that much from them - all too busy coding whatever projects they will be releasing I guess

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 7:01 pm

Kernel said:


tbh we don't really hear that much from them - all too busy coding whatever projects they will be releasing I guess



It's true, very few (if any?) of the alpha board peps or even the test batch of the beta boards are interested in benchmarking issues like this.  It's more of the hobbyist crowd that cares about benchmarking

That said, it seems a little odd to be in a situation where you are recording 3 TV streams (1 HD/2 SD) writing them to disk *and* streaming something over your ethernet that takes the full ethernet bandwidth!  Also, if the TV tuner is worth it's salt, then it will encode and compress the stream when sending it over USB so it won't take another 10 MB/s to send it to the disk (which technically would be 10 MB/s in the USB and another 10 MB/s out again to the Hard Drive, but that's neither here nor there)

Still, that's just my speculation.  Until it gets more fully in the wild, as RaTTuS says, then we're just not going to know how well the LAN9512 handles ethernet traffic with hard drive read/writes and how that will affect the r-pi in general (USB can create a bit of overhead after all)
Dear forum: Play nice ;-)

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 7:35 pm

I would be willing to make a guess here that if you are recording 3 steams at one time you will have issues other than USB bus bandwidth.  The processor is single core, so it has to split it's time between the 3 tuners, the HDD, and the ethernet.  That right there is going to eat up a lot of processor time just managing the interfaces.  Then you have the raw data going between the 4 devices.  Plus in order to manage to keep the 3 streams fluid there will have to be a buffer allocated in the mere 256MB of ram.  You could in theroy get close to 29 MB/sec of bandwidth but I don't think you will get anywhere close to that when sharing processor time between 5 USB based tasks.

I don't have anything to back it up but I will tell you this I have a NAS running on a Marvel Kirkwood at 800 Mhz (100 Mhz faster than the R-Pi), Plus the Kirkwood is designed from the ground up for specificly this purpose.  It has native PCIe and SATA.  My particular application has 128MB ram (pretty low but it works), and it has 2 USB 3.0 ports provided by the PCIe bus.  With a NTFS formatted drive I'm lucky to get reads of 15 MB/sec and writes of 7 MB/sec (because the Linux NTFS driver is so poor.)  When formatted EXT3 I get on average of 30 to 35 MB/sec reads, and 20 to 30 MB/sec writes.  The performance goes down by almost half when doing both at the same time.  When I unplug this drive and plug it into my quad core desktop it reads at 100 to 110 MB/sec.  This is on a chip that is designed for NAS useage.  Based on that I think you won't get an R-Pi to 29 MB/sec while pushing 5 tasks over the USB even if you over-clock the snot out of it.  The good news is that you can get almost 3 R-Pis for what I paid for my setup.  With two R-Pis and a switch you may be able to get close to the performance you want.

EDIT:  I forgot to mention where I got that 29 MB/sec figure.  That is the highest figure I have seen quoted for the R-Pi.  We won't really know what that port is good for until someone really benchmarks it, but for now I assume that is the actual max of the port.

thomas41546
Posts: 10
Joined: Tue Nov 29, 2011 4:04 pm

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 7:39 pm


Theoretically USB2 has a bandwidth of 480Mbits/s ~= 40MBytes/s.


480mbits = 60MB/s So the max bandwidth theoretically is 20MB/s higher then what you stated. Though realistically i've seen it max out for my usage at about 40MB/s for USB 2.0.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24969
Joined: Sat Jul 30, 2011 7:41 pm

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 8:33 pm

I'm sure I put some transfer figures on the Wiki some time ago - have they disappeared?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

lb
Posts: 263
Joined: Sat Jan 28, 2012 8:07 pm

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 8:41 pm

Hmm, I can't find these numbers now... but I think what's missing from these figures was how Ethernet and a USB HDD or whatever perform if they're used concurrently. Say, if the Pi is used as a NAS, in this case both Ethernet and the USB HDD are used at the same time, obviously.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 8:52 pm

Jessie said:


I would be willing to make a guess here that if you are recording 3 steams at one time you will have issues other than USB bus bandwidth.  The processor is single core, so it has to split it's time between the 3 tuners, the HDD, and the ethernet.  That right there is going to eat up a lot of processor time just managing the interfaces.



To be fair, I was giving the benefit of the doubt that a TV tuner had been chosen that handled the grunt work of the encoding and was basically writing a nice and pretty MPEG2/4 file straight to the Hard Drive (well... you know what I mean)
Dear forum: Play nice ;-)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5398
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: "Real-life" bandwidth available on the USB controller

Mon Mar 12, 2012 9:57 pm

Jessie said:


EDIT:  I forgot to mention where I got that 29 MB/sec figure.  That is the highest figure I have seen quoted for the R-Pi.  We won't really know what that port is good for until someone really benchmarks it, but for now I assume that is the actual max of the port.


Can you link to the 29 MB/s figure?

I've personally never seen a never seen a number that high through sdcard, usb or network on R-Pi.

pandapi
Posts: 120
Joined: Tue Feb 28, 2012 6:58 am

Re: "Real-life" bandwidth available on the USB controller

Tue Mar 13, 2012 9:08 am

Thanks all. I'll try and find james' figures, maybe i missed them!

Jessie - i would hope the CPU would be ok. Recording a stream is a simple job for a CPU.

I have a geode lx (433mhz x86) based machine which is pretty slow and i managed to record 5 streams and broadcast another one over the network. CPU usage was about 60%.

That wasn't using USB for both tuner and disk though.

User avatar
ArborealSeer
Posts: 300
Joined: Tue Jan 24, 2012 9:48 am
Location: South West, UK

Re: "Real-life" bandwidth available on the USB controller

Tue Mar 13, 2012 11:27 am

JamesH said:


I'm sure I put some transfer figures on the Wiki some time ago - have they disappeared?


try the sub pages, someone tidied it all up n moved it around.
Pi Status > Farnell, Arrived 24/5- RS, Arrived 1/6

pandapi
Posts: 120
Joined: Tue Feb 28, 2012 6:58 am

Re: "Real-life" bandwidth available on the USB controller

Tue Mar 13, 2012 12:24 pm

this is as close as i could find:
http://elinux.org/RPi_Performance

Just says about the hypothetical 60MByte/s limit.

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: "Real-life" bandwidth available on the USB controller

Tue Mar 13, 2012 2:51 pm

You are better off thinking of your memory space as 128meg.

The 256meg is divided up between the processor and GPU.

You do have a limited amount of control on how this is divided up. See:

http://zenit.senecac.on.ca/wik...../index.php

/Raspberry_Pi_Fedora_Remix_Administration#Adding_Swap_Space

(one of my favorite link pages)

mfg
Posts: 7
Joined: Fri May 18, 2012 4:54 pm

Re:

Mon May 21, 2012 8:32 am

I was able to pull 4000kbyte/s of an apache and lighttpd server. I don't know if there are faster ways of network transport? But smb is usually slower, have not tested FTP yet.

I have not tested USB speed due to an incredible large 32 gig SD card ;)

Return to “General discussion”