RPi2 i/o blocking and SD card performance
Gergely Imreh
imrehg at gmail.com
Thu Jun 9 09:38:16 UTC 2016
Hi,
I've been testing FreeBSD 11.0-CURRENT on a RaspberryPi2. I'm relatively
new to FreeBSD, and wondering if there's any advice for improving the
performance a bit.
First, it looks like there's a lot of i/o blocking behaviour going on. For
example running MediaWiki on the board, if I compile any ports, the site
itself is pretty much unusable (the PHP scripts time out even with 180s
timeouts). The strangest thing is that the CPU usage is not at 100% all the
way, can be that all 4 cores are ~99% idle, and still everything goes very
slow. Once the ports compilation or any other i/o-related task is finished,
it's snappy again.
Any idea why it could be to have such big latency/lag even though the CPU
is idle? Is there anything I could test?
Second, I've also tried profiling the SD card a bit. The very same card
(SanDisk 32GB), same RPi board once with a fresh install of FreeBSD and
once with a fresh install of ArchLinuxARM, running bonnie++ -s 2000 (the
results below)
The block write perfomance on ArchLinux is ~55% higher (14M/s vs 9M/s),
while rewrite and per char output is 4-5x larger. Block read is also ~70%
larger (25M/s vs 15M/s). This is without any tuning. Any idea why the
FreeBSD performance on the exact same hardware is so different, and whether
it can be improved? I guess these two questions are related.
FreeBSD:
version 1.97 ------Sequential Output------ --Sequential Input-
--Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block--
--Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec
%CP
rpi2 2000M 20 99 8924 14 2275 4 39 99 14873 14 33.9
4
Latency 481ms 4407ms 8319ms 244ms 153ms
226s
Version 1.97 ------Sequential Create------ --------Random
Create--------
rpi2 -Create-- --Read--- -Delete-- -Create-- --Read---
-Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec
%CP
16 660 25 10388 100 3483 99 1532 58 10702 99 3531
99
Latency 2769ms 375us 754us 1967ms 253us
512us
ArchLinux:
Version 1.97 ------Sequential Output------ --Sequential Input-
--Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block--
--Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec
%CP
alarmpi 2000M 102 99 13901 10 8089 7 579 99 25264 8 30.6
1
Latency 115ms 5843ms 6381ms 22745us 54383us
40338ms
Version 1.97 ------Sequential Create------ --------Random
Create--------
alarmpi -Create-- --Read--- -Delete-- -Create-- --Read---
-Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec
%CP
16 4460 38 +++++ +++ 6002 34 4137 34 +++++ +++ 7440
43
Latency 1391us 3885us 3757us 1068us 113us
1261us
Cheers,
Greg
More information about the freebsd-arm
mailing list