Troubleshooting fluctuating speeds on the RPi2

Get help, report and discuss bugs.
Post Reply
jackiass2
Posts: 42
Joined: 19 Nov 2013, 12:07

Troubleshooting fluctuating speeds on the RPi2

Post by jackiass2 » 22 Sep 2015, 08:39

Hello

I'm running OpenELEC on a RPi2 using a USB3 thumb for my system folders and a USB HDD as my storage device.
Nzbget is downloading to the USB thumb and then extracting to the USB HDD.

I am experiencing very fluctuating speeds when downloading. It's a wired connection and should in theory be able to pull around 7 MB/s.
This is a short extract of the speeds I'm getting:

Code: Select all

     CPU: 4 x ARMv7 cores available, using ondemand governor
  Memory: 1008MB (split 688MB ARM, 320MB GPU)
HW Block: |   ARM   |  Core  |  H264  |    SDRAM    |
Min Freq: |  600MHz | 250MHz |   0MHz |    450MHz   |
Max Freq: |  950MHz | 450MHz | 300MHz |    450MHz   |
Voltages: |        +6, 1.2000V        | +1, 1.2250V |

Time         ARM    Core    H264 Core Temp (Max)  IRQ/s     RX B/s     TX B/s
======== ======= ======= ======= =============== ====== ========== ==========
10:28:43  600Mhz  250Mhz    0Mhz 50.84C (50.84C)  2,847  3,345,650     99,058
10:28:46  600Mhz  250Mhz    0Mhz 48.69C (50.84C)  1,939    593,114     16,209
10:28:48  600Mhz  250Mhz    0Mhz 48.69C (50.84C)  1,449         25        126
10:28:50  600Mhz  450Mhz    0Mhz 48.69C (50.84C)  1,528         50        362
10:28:52  950Mhz  450Mhz    0Mhz 49.77C (50.84C)  3,862  2,046,736     62,300
10:28:54  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  5,884  7,589,378    239,303
10:28:56  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  3,836  5,402,297    151,882
10:28:58  600Mhz  250Mhz    0Mhz 50.84C (50.84C)  4,126  5,523,592    178,402
10:29:00  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  3,263  4,237,267    134,912
10:29:02  600Mhz  250Mhz    0Mhz 49.77C (50.84C)  3,805  1,574,529     45,396
10:29:04  950Mhz  450Mhz    0Mhz 49.77C (50.84C)  3,661  2,826,676     89,498
10:29:06  600Mhz  250Mhz    0Mhz 49.77C (50.84C)  3,740  4,845,259    147,301
10:29:08  600Mhz  250Mhz    0Mhz 48.69C (50.84C)  4,651  1,183,580     42,919
10:29:10  950Mhz  450Mhz    0Mhz 50.31C (50.84C)  3,871  4,589,380    141,839
10:29:12  950Mhz  450Mhz    0Mhz 49.77C (50.84C)  4,132  5,386,244    165,872
10:29:14  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  4,076  6,094,109    181,776
10:29:16  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  2,689  2,152,080     78,335
10:29:18  600Mhz  450Mhz    0Mhz 49.23C (50.84C)  3,992  1,055,688     40,363
10:29:21  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  3,997  5,895,662    168,166
10:29:23  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  4,534  4,571,909    141,133
10:29:25  600Mhz  250Mhz    0Mhz 49.23C (50.84C)  4,652  4,645,491    138,098
10:29:27  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  4,986  7,389,271    211,269
10:29:29  600Mhz  250Mhz    0Mhz 49.23C (50.84C)  4,182  2,186,939     65,575
10:29:31  950Mhz  450Mhz    0Mhz 50.31C (50.84C)  3,854  5,505,299    163,574
10:29:33  600Mhz  450Mhz    0Mhz 50.31C (50.84C)  3,657  4,567,781    134,633
10:29:35  600Mhz  249Mhz    0Mhz 49.77C (50.84C)  4,066  1,906,171     64,251
10:29:37  950Mhz  450Mhz    0Mhz 49.77C (50.84C)  4,650  6,741,457    200,849
10:29:39  950Mhz  450Mhz    0Mhz 50.84C (50.84C)  4,836  7,191,857    211,887
10:29:41  600Mhz  250Mhz    0Mhz 50.84C (50.84C)  3,734  5,508,229    160,946
10:29:43  600Mhz  250Mhz    0Mhz 50.84C (50.84C)  4,148  3,296,172     98,009
The drop in speed seems to occur when the CPU is dropping, so I've tried to force turbo the RPi2, leaving it constantly at 950Mhz, but that does not change anything, so I don't think it is the CPU maxing out.

Directwrite is on
cache of 200 MB
Write buffer 1024 kb
4 connections to server

Changing the InterDir to the USB HDD gives:

Code: Select all

Time         ARM    Core    H264 Core Temp (Max)  IRQ/s     RX B/s     TX B/s
======== ======= ======= ======= =============== ====== ========== ==========
10:24:20  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  2,286  1,902,204     53,931
10:24:22  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  6,414  5,309,113    141,216
10:24:24  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  3,932  5,925,509    136,757
10:24:26  600Mhz  250Mhz    0Mhz 49.77C (49.77C)  5,242  5,904,208    148,339
10:24:28  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  4,801  5,617,636    147,230
10:24:30  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  4,139  6,026,196    158,241
10:24:32  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  6,471  5,134,539    135,497
10:24:34  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  2,980  3,941,674    110,950
10:24:36  600Mhz  249Mhz    0Mhz 49.77C (49.77C)  4,752  6,457,880    178,777
10:24:38  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  5,527  5,476,342    142,409
10:24:40  950Mhz  450Mhz    0Mhz 48.69C (49.77C)  3,021  4,397,592    119,602
10:24:43  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  5,187  4,427,786    114,484
10:24:45  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  4,244  4,537,930    116,659
10:24:47  950Mhz  450Mhz    0Mhz 48.69C (49.77C)  4,061  6,217,443    151,705
10:24:49  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  6,233  5,856,567    167,047
10:24:51  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  3,906  5,290,446    149,473
10:24:53  950Mhz  450Mhz    0Mhz 49.77C (49.77C)  4,089  5,711,550    153,494
10:24:55  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  5,800  4,070,618    110,168
10:24:57  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  4,719  6,752,213    184,014
10:24:59  600Mhz  249Mhz    0Mhz 49.23C (49.77C)  6,201  5,599,010    141,750
10:25:01  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  7,114  6,552,636    171,806
10:25:03  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  4,190  5,732,520    173,548
10:25:05  599Mhz  250Mhz    0Mhz 48.69C (49.77C)  4,200  6,139,730    157,905
10:25:07  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  4,123  4,896,826    124,170
10:25:10  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  5,943  6,005,579    162,762
10:25:12  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  2,223  2,162,302     66,072
10:25:14  600Mhz  249Mhz    0Mhz 48.15C (49.77C)  5,776  3,996,205    108,507
10:25:16  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  2,196  2,175,643     73,076
10:25:18  600Mhz  250Mhz    0Mhz 49.23C (49.77C)  3,727  5,033,289    149,549
10:25:20  600Mhz  250Mhz    0Mhz 48.69C (49.77C)  2,729  3,626,127    109,249
So that seems a lot more stable and not so heavy on the CPU but I'm not quite sure why.
I like the idea of having the InterDir on the thumb, so the HDD only spins up during unpacking and it should in theory also help out with unpacking speeds.
I'm not quite sure where to go from here to tweak the settings for optimal performance? Any help is appreciated.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Troubleshooting fluctuating speeds on the RPi2

Post by hugbug » 22 Sep 2015, 09:00

jackiass2 wrote:So that seems a lot more stable and not so heavy on the CPU but I'm not quite sure why.
Because flash-drives usually have terrible performance when it comes to random read/write and IOPS. They can write and read sequntial data fast but that's it. HDDs have a dedicated cache and a (very smart) controller which makes them perform far better than flash-cards. SSDs are built on flash too but they perform so good only because they have cache and controller like HDDs.

Have already read Performance tips? The tip about option "ContinuePartial".

RPi (both 1 and 2) in general have very poor USB performance. It's the limiting factor here, not the HDD. it seems you can't get any speed boost by using two separate drives for InterDir and DestDir.

You may try to use the SDCard for InterDir. Since it is connected via other interface (not USB) it may be faster but again SDCards are poor performers but may be you have a good one.

jackiass2
Posts: 42
Joined: 19 Nov 2013, 12:07

Re: Troubleshooting fluctuating speeds on the RPi2

Post by jackiass2 » 22 Sep 2015, 09:19

Thanks for the fast reply. I was thinking something along the same lines, but have chosen not to use the sd-card, as it tends to corrupt easily on the pi. If that happens, I have to jump through a lot of hopes to get the latest backup up and running. That's the whole reason I have it running from the stick - it never corrupts on me.

I tried turning off ContinuePartial which gave a small performance boost but still an average download speed around 3.6 MB/s.

Code: Select all

Time         ARM    Core    H264 Core Temp (Max)  IRQ/s     RX B/s     TX B/s
======== ======= ======= ======= =============== ====== ========== ==========
11:15:41  600Mhz  250Mhz    0Mhz 49.77C (51.92C)  4,164  1,598,730     38,434
11:15:43  600Mhz  450Mhz    0Mhz 50.84C (51.92C)  3,730  5,470,640    152,354
11:15:46  950Mhz  450Mhz    0Mhz 51.38C (51.92C)  3,738  5,462,038    148,232
11:15:48  949Mhz  450Mhz    0Mhz 50.84C (51.92C)  3,283  2,645,257     79,189
11:15:50  600Mhz  450Mhz    0Mhz 49.77C (51.92C)  3,723  1,000,494     29,482
11:15:52  950Mhz  450Mhz    0Mhz 50.84C (51.92C)  2,974  3,913,926    106,754
11:15:54  600Mhz  450Mhz    0Mhz 50.84C (51.92C)  5,082  4,736,452    127,450
11:15:56  950Mhz  450Mhz    0Mhz 50.84C (51.92C)  3,736  2,762,487     82,155
11:15:58  950Mhz  450Mhz    0Mhz 51.38C (51.92C)  3,465  4,812,805    135,634
11:16:00  950Mhz  450Mhz    0Mhz 51.92C (51.92C)  4,604  6,395,648    181,486
11:16:02  950Mhz  450Mhz    0Mhz 51.92C (51.92C)  4,020  5,438,988    152,919
11:16:04  600Mhz  250Mhz    0Mhz 49.77C (51.92C)  1,596    668,910     18,575
11:16:06  600Mhz  250Mhz    0Mhz 49.77C (51.92C)  3,048         25        215
11:16:08  600Mhz  250Mhz    0Mhz 49.77C (51.92C)  4,120  2,649,061     65,701
11:16:10  950Mhz  450Mhz    0Mhz 49.77C (51.92C)  2,167    405,669     19,763
11:16:12  950Mhz  450Mhz    0Mhz 50.84C (51.92C)  4,232  6,158,090    172,327
11:16:14  950Mhz  450Mhz    0Mhz 51.38C (51.92C)  4,357  6,398,658    178,769
11:16:16  950Mhz  450Mhz    0Mhz 50.84C (51.92C)  2,769  3,495,371     96,620
11:16:18  600Mhz  250Mhz    0Mhz 50.84C (51.92C)  3,255  4,399,948    127,294
11:16:21  600Mhz  250Mhz    0Mhz 50.84C (51.92C)  3,098  1,632,834     45,669
11:16:23  950Mhz  250Mhz    0Mhz 50.84C (51.92C)  3,401  2,412,611     66,369
11:16:25  950Mhz  450Mhz    0Mhz 51.38C (51.92C)  4,645  6,780,181    199,261
11:16:27  600Mhz  250Mhz    0Mhz 51.38C (51.92C)  5,720  5,002,639    140,163
11:16:29  950Mhz  450Mhz    0Mhz 51.38C (51.92C)  3,524  4,207,135    117,779
11:16:31  600Mhz  250Mhz    0Mhz 50.84C (51.92C)  3,841  5,258,733    144,501
11:16:33  600Mhz  250Mhz    0Mhz 50.84C (51.92C)  1,750  1,349,342     45,699
11:16:35  600Mhz  250Mhz    0Mhz 50.31C (51.92C)  4,272  1,265,339     38,329
11:16:37  600Mhz  450Mhz    0Mhz 50.84C (51.92C)  2,228  2,521,161     69,753
11:16:39  950Mhz  450Mhz    0Mhz 51.38C (51.92C)  4,553  5,843,753    156,181
11:16:41  600Mhz  250Mhz    0Mhz 50.84C (51.92C)  4,624  3,263,434    107,240
As the box mostly is downloading stuff during the night or without my interaction, it is not such a big deal for me, but I do like to tinker and perhaps others will find this thread helpful. I will think about using the HDD for both InterDir and DestDir.

jackiass2
Posts: 42
Joined: 19 Nov 2013, 12:07

Re: Troubleshooting fluctuating speeds on the RPi2

Post by jackiass2 » 04 Nov 2015, 08:05

Just an small update. After moving to nzbget 16.3 and using the HDD as temp and final folder, I now get an average speed of 5.86 MB/s. Very nice!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 68 guests