RPi2 extremely slow on an update with many pauses

Raspberry Pi 2

RPi2 extremely slow on an update with many pauses

Postby mags » Sat Nov 07, 2015 10:21 pm

I have a new RPi2 with an 8GB class 10 microSD. I am finding that on a simple system update, pacman pauses for minutes at a time whilst writing data. Is there something known with the RPi2 and writing data like a firmware bug or something I have misconfigured that would explain it (only 1 partition that is ext4 with relatime mount option per ArchARM defaults)?

My system just the base install with a few packages but nothing major yet.

As a test case, I just updated the system as shown below. I sat here with a stop watch to illustrate:
$this->bbcode_second_pass_code('', '# pacman -Syu
...
resolving dependencies...
looking for conflicting packages...

Packages (8) linux-raspberrypi-4.1.12-2 raspberrypi-firmware-20151107-1 raspberrypi-firmware-bootloader-20151107-1
raspberrypi-firmware-bootloader-x-20151107-1 raspberrypi-firmware-examples-20151107-1
raspberrypi-firmware-tools-20151107-1 sudo-1.8.15-1 texinfo-6.0-1

Total Installed Size: 88.32 MiB
Net Upgrade Size: 0.53 MiB

:: Proceed with installation? [Y/n]
(8/8) checking keys in keyring [############################################] 100%
(8/8) checking package integrity [############################################] 100%
(8/8) loading package files [############################################] 100%
(8/8) checking for file conflicts [############################################] 100%
(8/8) checking available disk space [############################################] 100%
(1/8) upgrading linux-raspberrypi [############################################] 100%
>>> Updating module dependencies. Please wait ...
(2/8) upgrading raspberrypi-firmware-bootloader [############################################] 100%
(3/8) upgrading raspberrypi-firmware-bootloader-x [############################################] 100%
(4/8) upgrading raspberrypi-firmware-tools [############################################] 100%
(5/8) upgrading raspberrypi-firmware-examples [############################################] 100%
(6/8) upgrading raspberrypi-firmware [############################################] 100%
(7/8) upgrading sudo [############################################] 100%
(8/8) upgrading texinfo [############################################] 100%
')

The first pause started on 6/8 where pacman just seemed to freeze for 20 sec.
2nd pause started on 7/8 about 66 % through it where pacman froze for 21 sec.
3rd pause happened on 8/8 just after it hit 100 % through it where pacman froze for 1m14sec.

The total time it took to install these packages was 3m33sec.
mags
 
Posts: 6
Joined: Sat Nov 07, 2015 10:10 pm

Re: RPi2 extremely slow on an update with many pauses

Postby moonman » Sat Nov 07, 2015 10:53 pm

Seems normal on an SD card.
1. Not all class 10 cards are the same. There are slower there are faster ones out there. Try the ones with UHS-I logo.
2. Don't know how fast the RPI sd card reader is, but it could be a bottleneck too.

It freezes because those are large packages. It froze right at the end because pacman is doing 'sync' which flushes all buffers to disk/sd card.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: RPi2 extremely slow on an update with many pauses

Postby graysky » Sun Nov 08, 2015 10:14 am

graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: RPi2 extremely slow on an update with many pauses

Postby graysky » Sun Nov 08, 2015 12:21 pm

I've been reading a bit about this and indeed, there is much ambiguity circulating around the internet about these socalled class 10 cards.

I propose getting some data to confirm. CrystalMark is a common benchmarking util but it is for windows. Iozone on the other hand is linux native and is available in the AUR. I compiled v3.434 for both ARMv6 and ARMV7 which I am hosting on repo-ck.com:

For ARMv6: http://repo-ck.com/ARM/iozone-3_434-1-armv6h.pkg.tar.xz
For ARMv7: http://repo-ck.com/ARM/iozone-3_434-1-armv7h.pkg.tar.xz

I propose having you and anyone else interested running the benchmark. Do it 3 times to get a good sense of reproducible. Here is it on my RPi2 using a generic "Class 10" card that came with the thing as part of a hardware bundle (from amazon).
$this->bbcode_second_pass_code('', '% iozone -e -I -a -s 10M -r 4k -i 0 -i 1 -i 2')
What I believe to be important are the last two columns corresponding to the random reads and random writes. Please post your output along with a detailed description of the memory card (brand, model, capacity, etc.).

$this->bbcode_second_pass_code('', '
Brand: Kingston
Capacity: 8GB
Model: unknown
Class: 10
Other: "31414-012.A00LF"

random random
kB reclen write rewrite read reread read write
10240 4 919 996 6324 6355 5672 168
10240 4 964 996 6311 6327 5648 165
10240 4 883 954 6391 5035 5726 170')
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: RPi2 extremely slow on an update with many pauses

Postby graysky » Sun Nov 08, 2015 10:57 pm

I just bought a SanDisk Ultra (SDSQXNE-016G-GN6MA) and it's about 20x faster in the random writes. Amazing difference for $14.

$this->bbcode_second_pass_code('', '
Brand: SanDisk
Capacity: 16GB
Model: Extreme
Class: UHS-1
Other: SDSQXNE-016G-GN6MA
random random
kB reclen write rewrite read reread read write
10240 4 2979 3441 7325 7336 7388 3371
10240 4 2998 3426 7331 7336 7408 3334
10240 4 3188 3362 7326 7333 7383 3321')

Thanks for the suggestion, Moonman.

EDIT: I added the salient info from this thread to the wiki page. To echo the key benchmarks between the class 10 card that came with the bundle, and the UHS1 SanDsik I recently purchased:

* Synthetic benchmark (Random Writes) were 20x faster on the SanDisk.
* Installing the pre-downloaded base-devel group as 17x faster on the SanDisk.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: RPi2 extremely slow on an update with many pauses

Postby mags » Thu Dec 17, 2015 2:53 pm

You were right about the card, graysky. I bought the SDSQXNE-016G-GN6MA from amazon and I get benchmark numbers like yours and the pi is very fast now. Thank you!
mags
 
Posts: 6
Joined: Sat Nov 07, 2015 10:10 pm

Re: RPi2 extremely slow on an update with many pauses

Postby tpfkanep » Wed Dec 23, 2015 6:57 pm

Brand: SanDisk
Capacity: 8GB
Model: unknown
Class: 10
Other: unknown
$this->bbcode_second_pass_code('', ' random random
KB reclen write rewrite read reread read write
10240 4 1091 1115 5873 5880 5336 920
')

Same SD card as above but /boot/config.txt with: dtoverlay=mmc,overclock_50=63
$this->bbcode_second_pass_code('', '
random random
KB reclen write rewrite read reread read write
10240 4 1656 1906 7985 7993 7240 927
')

Do not have a UHS-1 SD card...

I just uncommented dtoverlay=mmc,overclock_50=63 in /boot/config.txt and have been running fine for a couple of hours. Last time I used it (on a B+) it was a bit unstable... YMMV.
tpfkanep
 
Posts: 26
Joined: Sun Nov 09, 2014 10:03 am

Re: RPi2 extremely slow on an update with many pauses

Postby MST » Tue Dec 29, 2015 12:51 am

Another data point on a Sandisk Ultra 16GB ($7 from China to UK)

Order description said
DSDQUAN-16G-G4A

Retail packaging said microSDHC UHS-1
SDSQUNC-016G-ZN6MA 80MB/533X

$this->bbcode_second_pass_code('', ' kB reclen write rewrite read reread read write
10240 4 2788 3033 7365 7377 7320 1530 ')

Must buy the Extreme SDSQXNE-016G-GN6MA next time
MST
 
Posts: 2
Joined: Fri Dec 04, 2015 10:19 am


Return to Broadcom

Who is online

Users browsing this forum: No registered users and 1 guest