Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPi -- Performance issues with SMB and WiFi-Networks #2657

Closed
astoeckel opened this issue Oct 1, 2013 · 12 comments
Closed

RPi -- Performance issues with SMB and WiFi-Networks #2657

astoeckel opened this issue Oct 1, 2013 · 12 comments

Comments

@astoeckel
Copy link

What did you do?
Playing videos (HD, various containers (mkv, ts, mp4, mov) all h264 at about 20 MBit/s) from a SMB share on a Raspberry Pi using
a1) the corresponding source option in XBMC.
b1) using the following bash command

mount -t cifs //remote-server/share mountpoint -o user=USER,password=PASS

and a file system source in XBMC.

The box is
a2) connected to the network via a 150 MBit WiFi dongle to a nearby WiFi-router
b2) connected via wired network to a laptop, which acts as a router and forwards all traffic to the network described in a2)

The network traffic is monitored on the SMB server.

What did you expect to happen?
As all videos play fine on the same hardware using a clean raspbian install (setup as in b1) and a2)) and I get a read throughput of 30 MBit/s, I expect the same when using OpenELEC in all the combined cases above.

What happened instead?

Smooth video playback is only possible in the combination b1) b2). The other combinations yield the following results:

a1), a2) 7-10 MBit/s throughput, buffers all 10 seconds, the throughput significantly increases while buffering and resumes to a smaller throughput when the playback resumes.

a1), b2) 11 MBit/s throughput, basically as above.

b1), a2) 17-20 MBit/s throughput, short stutters all 30 seconds, the throughput significantly increases while buffering and resumes to a smaller throughput when the playback resumes.

b1), b2) 25 MBit/s throughput, everything works as expected.

Conclusio

  1. The results clearly show that using a user-space samba library is not a good option and (in my opinion) OpenELEC/XBMC should switch to using the kernel mode CIFS code instead.
  2. The results show that OpenELEC/XBMC is CPU limited while playing back videos (which the simple omxplayer on raspbian isn't) and thus limits the WiFi transmission rate (probably caused by the WPA2 encryption/decryption process) -- this view is supported by the combination b1), b2) in which the very same network is used, with the very same dongle, yet the encryption/decryption is performed by the laptop.

OpenELEC version
Affects both 3.2.0 and 3.2.1

OpenELEC build
OpenELEC Stable - Raspberry Pi ARM Version:3.2.1 2013-09-28 22:29:55

OpenELEC arch
Raspberry PI, ARM v6hf

Additonal hardware setup information
WiFi-Dongle: Edimax EW7711UTn (Ralink RT2870), WPA-2 encrypted network

@jenkins101
Copy link
Contributor

Hi,

Please read the contributing guide lines before posting issues, it is important that you follow the steps there so that we can help you.

@astoeckel
Copy link
Author

Please read the contributing guide lines before posting issue

So I did. I've restructured my bug report "a little bit" to make it clearer to grasp, I hope now it fulfils your understanding of the guide lines.

@jenkins101
Copy link
Contributor

We still need the logfiles zip though...

@astoeckel
Copy link
Author

Here you go, log file for case a1, a2

http://somweyr.de/xbmc_3_2_1_stutter_wifi_smb_log.zip

Though I found the contents rather generic and not containing any information about the actual problem.

Unfortunately I'm uncapable (and unwilling) of creating logfiles for the other cases, as since the 3.2.1 update the RPi firmware/kernel is considerably broken and USB only works reliably approximately every fifth reboot -- but that's another issue.

@stefansaraev
Copy link
Contributor

pi firmware issues should be fixed in 3.2.2, if it is related..

@astoeckel
Copy link
Author

I just saw that you guys released a new version of OpenELEC, and yes, the firmware issues are fixed, yet the problem described above still persists.

Here is the log file for both a1, a2 and a1, b2 (playback once via the SMB option and once with the mount point -- which in my opinion could be automatically generated by OpenELEC -- as you can see in xbmc.log).

While the video was nearly unplayable in the first case (hangs every 5-10 seconds) it played relatively smoothly (after some buffering issues at the beginning) in the second case:

http://somweyr.de/xbmc_3_2_2_stutter_wifi_smb_log.zip

Thank you in advance and I hope that I've now provided all the data you'll need for finding a solution. Please let me know if I should try anything else or provide some more data.

@bluelight21
Copy link

I've got similar problems with Edimax, Edup and Logilink (all with 8188cus chipset). I'm using an complete different dongle now (Atheros ar9271 chipset), there is no performance issue at all.
Hope, that helped and that the issue will be solved soon, i like the small dongles.

@bluelight21
Copy link

seems to be fixed nox with update 3.2.4 (in my case).
Thank you very much

@ruoat
Copy link

ruoat commented Dec 4, 2013

I have had SMB performance problems since september-october. Originally I used raspbmc but after an update SMB started stuttering very much. I tried using OpenELEC 3.2.x but the same problem occurred. I found that OpenELEC 3.0.6 works fine but the xbmc is kind of old.

Yesterday I tried to upgrade to OE 3.2.4 but the same problem is still there. Then I wanted to see what happens if I put the kernel from 3.0.6 to OpenELEC 3.2.4 and that was a success! Now everything works fast and can use newer xbmc! I think kernel 3.10.x is somehow broken in RPI. The 3.6.11 kernel found from OE 3.0.6 works fine.

@bluelight21
Copy link

Sounds awesome. I've also tried to copy "kernel.img" from OE 3.0.6 to 3.2.4 yesterday, but my dongles were dead, when connected.
Second try: update OE with both "system_" files from 3.2.4 and "kernel_" files from 3.0.6 -> dead dongles (all tried out)
How have you done this?! o.O

@sraue sraue closed this as completed May 3, 2014
@Spongman
Copy link

why was this closed. i can confirm this is still an issue.

@stefansaraev
Copy link
Contributor

because it is an expected behaviour if using xbmc's integrated smb client over wifi. nothing we can fix on that hardware. you dont expect ~ 120mbps via wifi with samba shares in "userspace" right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants