RPI3 swap experiments
Trev
freebsd-arm at sentry.org
Tue Jul 3 05:19:11 UTC 2018
For my final swap experiment, and bearing mind that there is no swap
issue with 11-STABLE on the RPi2B running at 900 MHz using USB2 memory
keys for swap and /usr, I underclocked the RPi3B+ from 1.4 GHz to 600
MHz with 'powerd -M 600' and double-checked while the make -j4 build was
running:
trev at rpi3:~ % sysctl -a | grep dev.cpu.0.
dev.cpu.0.temperature: 57.9C
dev.cpu.0.freq_levels: 1400/-1 600/-1
dev.cpu.0.freq: 600
Alas:
Jul 3 12:06:12 rpi3 kernel: pid 60768 (c++), uid 0, was killed: out of
swap space
Stats with a lucky capture at 12:06:12 below:
last pid: 61107; load averages: 3.73, 4.16, 4.07 up 0+02:07:00
12:06:00
49 processes: 1 running, 47 sleeping, 1 waiting
CPU: 82.6% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 578M Active, 196K Inact, 128M Laundry, 188M Wired, 97M Buf, 11M Free
Swap: 2G Total, 144M Used, 2G Free, 7% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
9 0 0 0 0.0 0 0 0.0 0.0 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61111; load averages: 3.73, 4.16, 4.07 up 0+02:07:01
12:06:01
49 processes: 1 running, 47 sleeping, 1 waiting
CPU: 82.6% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 578M Active, 128K Inact, 128M Laundry, 188M Wired, 97M Buf, 11M Free
Swap: 2G Total, 144M Used, 2G Free, 7% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
9 397 0 0 0.0 397 5479 23.1 229.5 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61115; load averages: 3.73, 4.16, 4.07 up 0+02:07:03
12:06:03
49 processes: 1 running, 47 sleeping, 1 waiting
CPU: 82.6% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 580M Active, 236K Inact, 121M Laundry, 188M Wired, 97M Buf, 16M Free
Swap: 2G Total, 149M Used, 2G Free, 7% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
6 435 38 280 470.3 398 4998 8.2 88.8 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61119; load averages: 3.73, 4.16, 4.07 up 0+02:07:04
12:06:04
49 processes: 3 running, 46 sleeping
CPU: 82.6% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 586M Active, 668K Inact, 114M Laundry, 188M Wired, 97M Buf, 16M Free
Swap: 2G Total, 155M Used, 2G Free, 7% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
6 473 20 211 49.7 453 5273 7.9 95.2 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61123; load averages: 3.59, 4.13, 4.06 up 0+02:07:05
12:06:05
49 processes: 2 running, 47 sleeping
CPU: 82.6% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 598M Active, 656K Inact, 107M Laundry, 187M Wired, 97M Buf, 11M Free
Swap: 2G Total, 160M Used, 2G Free, 7% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
7 16 0 0 0.0 16 414 12.5 4.9 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61127; load averages: 3.59, 4.13, 4.06 up 0+02:07:06
12:06:06
49 processes: 2 running, 47 sleeping
CPU: 82.5% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 593M Active, 5M Inact, 109M Laundry, 187M Wired, 97M Buf, 11M Free
Swap: 2G Total, 161M Used, 2G Free, 7% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
5 140 4 28 1710 136 2013 56.1 200.7 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61131; load averages: 3.59, 4.13, 4.06 up 0+02:07:07
12:06:07
49 processes: 4 running, 45 sleeping
CPU: 82.5% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 587M Active, 5M Inact, 116M Laundry, 187M Wired, 97M Buf, 10M Free
Swap: 2G Total, 163M Used, 2G Free, 7% Inuse
2 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
7 500 1 4 1.3 499 6302 7.9 99.5 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61135; load averages: 3.59, 4.13, 4.06 up 0+02:07:08
12:06:08
49 processes: 2 running, 47 sleeping
CPU: 82.5% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 594M Active, 3M Inact, 110M Laundry, 187M Wired, 97M Buf, 11M Free
Swap: 2G Total, 170M Used, 2G Free, 8% Inuse
0 2 0 0 0.0 2 64 157.3 16.0 mmcsd0s2a
6 475 17 92 228.8 458 4500 7.2 89.7 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61139; load averages: 3.38, 4.08, 4.04 up 0+02:07:09
12:06:09
49 processes: 2 running, 47 sleeping
CPU: 82.5% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 585M Active, 556K Inact, 120M Laundry, 187M Wired, 97M Buf, 12M Free
Swap: 2G Total, 175M Used, 2G Free, 8% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
6 337 25 220 137.6 312 4575 8.3 70.1 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61143; load averages: 3.38, 4.08, 4.04 up 0+02:07:10
12:06:10
49 processes: 3 running, 46 sleeping
CPU: 82.5% user, 0.0% nice, 7.3% system, 0.3% interrupt, 9.9% idle
Mem: 591M Active, 192K Inact, 114M Laundry, 188M Wired, 97M Buf, 12M Free
Swap: 2G Total, 179M Used, 2G Free, 8% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
1 374 9 64 774.7 365 5552 26.1 239.9 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
[OUT OF SWAP at 12:06:12 below]
last pid: 61151; load averages: 3.38, 4.08, 4.04 up 0+02:07:12
12:06:12
49 processes: 4 running, 45 sleeping
CPU: 82.5% user, 0.0% nice, 7.3% system, 0.3% interrupt, 10.0% idle
Mem: 492M Active, 216K Inact, 82M Laundry, 187M Wired, 97M Buf, 144M Free
Swap: 2G Total, 147M Used, 2G Free, 7% Inuse
0 2 2 64 3.0 0 0 0.0 0.6 mmcsd0s2a
1 270 226 2374 3.7 44 1199 11.3 54.7 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
last pid: 61156; load averages: 3.38, 4.08, 4.04 up 0+02:07:13
12:06:13
49 processes: 4 running, 45 sleeping
CPU: 82.5% user, 0.0% nice, 7.3% system, 0.3% interrupt, 10.0% idle
Mem: 464M Active, 3M Inact, 65M Laundry, 188M Wired, 97M Buf, 186M Free
Swap: 2G Total, 103M Used, 2G Free, 5% Inuse
0 0 0 0 0.0 0 0 0.0 0.0 mmcsd0s2a
0 217 217 1817 1.7 0 0 0.0 36.9 da0p1
0 0 0 0 0.0 0 0 0.0 0.0 da0p2
There are no extraordinarily high ms/w stats. The sdcard records a 157.3
ms/w peak whereas the USB2 memory key's peak is 56.1 ms/w. So I'm not
convinced that the USB2 memory key is "too slow".
On the other hand, using a USB2 attached hard disk does work...
More information about the freebsd-arm
mailing list