outsider
Posts: 21
Joined: Tue Jul 03, 2012 2:16 pm

Raspberry Pi slowdown with USB bluetooth

Thu Aug 23, 2012 3:28 pm

Hi

I've just noticed that my Pi goes slower if I have a bluetooth dongle plugged in.
Here is a quick benchmark using this script:

Code: Select all

#!/usr/bin/env python

for a in range(1,100):
	for i in range(1, 100000):
		.123/.456
Without the bluetooth dongle plugged in:

Code: Select all

[email protected]:~# time python test.py

real	0m36.252s
user	0m35.940s
sys	0m0.130s
With the bluetooth dongle plugged in:

Code: Select all

[email protected]:~# time python test.py

real	1m11.941s
user	1m10.930s
sys	0m0.320s
I've also tried removing the dongle and leaving the modules loaded, in this scenario it goes back to the original speed. It looks like it only happens if the dongle is plugged in.

It looks like it increases the interrupts. You can clearly see where I plugged it in and removed it on this vmstat:

Code: Select all

[email protected]:~# vmstat 1 100
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0      0  91936   2212  16348    0    0    46     2 13975  103 26  3 69  3
 0  0      0  91908   2212  16348    0    0     0     0 8073   38  0  0 100  0
 0  0      0  91908   2212  16348    0    0     0     0 8104   68  0  0 100  0
 0  0      0  91908   2212  16348    0    0     0     0 8102   66  0  1 99  0
 0  0      0  91908   2212  16348    0    0     0     0 8269  172  0  0 100  0
 0  0      0  91908   2212  16348    0    0     0     0 8099   64  0  1 99  0
 0  0      0  91908   2212  16348    0    0     0     0 8181  113  0  0 100  0
 0  0      0  91908   2212  16348    0    0     0     0 8070   44  1  0 99  0
 0  0      0  91908   2212  16348    0    0     0     0 8907  168  0  2 98  0
 0  0      0  91660   2212  16348    0    0     0     0 42190  206 24 37 39  0
 0  0      0  91660   2212  16348    0    0     0     0 38597  110  0  4 96  0
 0  0      0  91660   2212  16348    0    0     0     0 38696   39  0  0 100  0
 0  0      0  91660   2212  16348    0    0     0     0 38669   93  0  4 96  0
 0  0      0  91660   2212  16348    0    0     0     0 38637   38  0  2 98  0
 0  0      0  91668   2212  16348    0    0     0     0 38615   59  2  2 96  0
 0  0      0  91668   2212  16348    0    0     0     0 38590   39  0  0 100  0
 0  0      0  91760   2212  16348    0    0     0     0 24745  112  1  4 94  0
 0  0      0  91760   2212  16348    0    0     0     0 8080   57  0  0 100  0
 0  0      0  91744   2212  16348    0    0     0     0 8136  105  1  5 94  0
 0  0      0  91760   2212  16348    0    0     0     0 8104   63  1  0 99  0
 0  0      0  91760   2212  16348    0    0     0     0 8278  188  0  0 100  0
Any ideas?

TenderLoins
Posts: 12
Joined: Tue May 29, 2012 11:48 am

Re: Raspberry Pi slowdown with USB bluetooth

Thu Aug 23, 2012 3:52 pm

Apparently the USB drivers are terrible at the moment and were from a previous Broadcom project. By USB drivers, I mean that very low level USB stuff, not the ones for your bluetooth dongle.

It fires more interrupts than needed, and also drops packets in certain situations.

Its a known issue, and there is an open ticket on the github firmware pages.

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

Re: Raspberry Pi slowdown with USB bluetooth

Thu Aug 23, 2012 3:56 pm

try a
sudo apt-get update && sudo apt-get upgrade
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

outsider
Posts: 21
Joined: Tue Jul 03, 2012 2:16 pm

Re: Raspberry Pi slowdown with USB bluetooth

Thu Aug 23, 2012 4:09 pm

TenderLoins wrote:Apparently the USB drivers are terrible at the moment and were from a previous Broadcom project. By USB drivers, I mean that very low level USB stuff, not the ones for your bluetooth dongle.

It fires more interrupts than needed, and also drops packets in certain situations.

Its a known issue, and there is an open ticket on the github firmware pages.
Do you have a link to it?

TenderLoins
Posts: 12
Joined: Tue May 29, 2012 11:48 am

Re: Raspberry Pi slowdown with USB bluetooth

Thu Aug 23, 2012 6:38 pm

https://github.com/raspberrypi/firmware/issues/19

I read the other stuff from a long-lost forum post.

Return to “General discussion”