The Raspberry Pi 4 with 8GB RAM launched a couple of weeks ago together with the beta version of Raspberry Pi OS 64-bit. Note that you should currently use the 32-bit version of Raspberry Pi OS (previously known as Raspbian) as the 64-bit still has bugs and missing features, but I want to find out the current progress, so I installed raspios_arm64-2020-05-28/2020-05-27-raspios-buster-arm64.zip and had no problem to boot the board.
After going through the setup wizard in the desktop environment to configure the language, time, networking, etc…, and make sure the OS is updated, I checkout some information:
pi@raspberrypi:~ $ cat /proc/cpuinfo
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
Hardware : BCM2835
Revision : d03114
Serial : 10000000694c8ae2
Model : Raspberry Pi 4 Model B Rev 1.4
I do have a Raspberry Pi 4 Model B Rev 1.4 with 8GB Memory (revision: d03114), the image comes with a 64-bit Linux kernel:
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.42-v8+ #1319 SMP PREEMPT Wed May 20 14:18:56 BST 2020 aarch64 GNU/Linux
and we do get a 64-bit rootfs.
pi@raspberrypi:~ $ file /bin/busybox
/bin/busybox: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=fdf7b3dd496e8fd678a0bda5540f9fae4d313d8f, stripped
Before starting the review, let’s make ourselves aware of known issues:
1) There is no hardware video acceleration in VLC or Chromium
2) libraspberrypi0, libraspberrypi-dev and libraspberrypi-doc have been moved out of /opt/vc/* and into /usr/* instead (making it more standard). Any code built against these libraries will require changing to refer to a more standard location (/usr/lib/ rather than /opt/vc/lib)
3) Due to 2) Many packages that expect libGLESv2.so libEGL etc will require rebuilding.
4) raspberrypi-bootloader and raspberrypi-kernel contain useless non-64bit binaries and is missing the work done to minimise the delay between files being deleted and installed to /boot
5) There is no Wolfram Mathematica built for AArch64
6) Minecraft shim layer requires rebuilding to cope with 2)
7) VLC needs rebuild (not available)
8) VNC server not rebuilt yet for 64bit
Most benchmarks are not sensitive to RAM capacity (unless swapping is involved), but I still installed sbc-bench to compare with the results I got with Raspberry Pi 4 (1GB RAM) using Raspbian Buster 32-bit:
chmod +x sbc-bench.sh
SBC Bench results:
Installing needed tools. This may take some time... Done.
Checking cpufreq OPP... Done.
Executing tinymembench. This will take a long time... Done.
Executing OpenSSL benchmark. This will take 3 minutes... Done.
Executing 7-zip benchmark. This will take a long time... Done.
Checking cpufreq OPP... Done.
It seems neither throttling nor frequency capping has occured.
memcpy: 2503.6 MB/s (0.2%)
memset: 3359.5 MB/s (0.5%)
7-zip total scores (3 consecutive runs): 5083,5065,5099
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-cbc 38070.54k 40669.85k 41716.22k 42029.40k 42131.46k 42177.88k
aes-128-cbc 38065.38k 40746.26k 41775.96k 42064.21k 42229.76k 42292.57k
aes-192-cbc 32294.31k 34105.22k 35048.28k 35303.42k 35351.21k 35351.21k
aes-192-cbc 32254.74k 34136.98k 35043.33k 35301.38k 35367.59k 35367.59k
aes-256-cbc 27986.06k 29351.96k 29962.33k 30127.79k 30173.87k 30179.33k
aes-256-cbc 27986.74k 29372.25k 29969.24k 30119.25k 30160.21k 30157.48k
Full results uploaded to http://ix.io/2paq. Please check the log for anomalies (e.g. swapping
or throttling happened) and otherwise share this URL.
Note that I’m using KKSB aluminum case so cooling is not an issue. We can see the comparison in the chart and table below (higher is better for all results).
|Raspberry Pi 4 @ 1.5 GHz|
Raspbian 32-bit – 1GB RAM
|Raspberry Pi 4 @ 1.5 GHz|
RPI OS 64-bit beta – 8GB RAM
|OpenSSL AES-256-CBC 16K||64,951.64k||30,157.48k|
* The 7-zip result is for an earlier test with Raspberry Pi 4 + heatsink (not KKSB) since in the KKSB review 7-zip run out of memory and did not complete.
As we can see the 64-bit OS is slower in all four results. The differences are marginal for memset/memcpy, around 6% lower for 7-zip, and a massive 50+% for AES-256 hash. We should not really be surprised by the latter, since last January, somebody compared Debian OS 32-bit and 64-bit on Raspberry Pi with similar results for AES-256-SBC 16KB in sbc-bench script, but somehow SHA1SUM (SHA1 hash function) was much faster with the 64-bit OS.
Now let’s try to run common programs to find out potential bugs or limitations, and see when the total memory usage goes above 4GB RAM which would make the switch to 8GB RAM worthwhile.
I’ve monitored the total memory usage with htop (used + buffers + cache), and first ran Chromium browser with multiple tabs, YouTube, and Facebook game (Candy Crush Saga), loaded VLC, Thunderbird, LibreOffice with .odt file, and GIMP with a photo.
I also ran glxgears -info to confirm graphics acceleration is working (was already obvious from Candy Crush Saga),
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
GL_RENDERER = V3D 4.2
GL_VERSION = 2.1 Mesa 19.3.2
GL_VENDOR = Broadcom
and played 720p and 1080p videos (H.264/H.265) in VLC. You can check all steps in the video below.
To summarize, Raspberry Pi OS 64-bit is already fairly stable. I had no big troubles with Chromium, except YouTube really starts to struggle with 1080p videos due to the lack of hardware video decoding at this stage, and Candy Crush Saga (HTML5) really takes a long time to load, but once it’s loaded the games plays smoothly. I could play 720p and 1080p H.264 videos with VLC, but both 720p and 1080p H.265 videos were really choppy due to lack of hardware video decoding.
So when did I get more than 4GB RAM used? After I opened eight tabs in Chromium, Thunderbird with a Gmail account, one text file with LibreOffice Write, GIMP with one photo, Thunderbird, two terminals, and VLC (no videos playing). The results are a bit more complicated to analyze than one may first think, as used memory (1.92 GB) corresponds to the actual memory taken by the programs and OS, while buffers and cache refer to RAM allocated by the system to speed up the I/O performance. So on a Raspberry Pi 4 with 4GB RAM, we could have 1.92GB used memory and small buffers and cache without swap being involved. Finally, if you leave the system run for a longer period time, the cache will tend to grow to use up all memory, as “memory unused is memory wasted”.
I also tried to build the samples in /usr/src/hello_pi/, but even after correcting for the new path (/opt to /usr/src) the build would not complete with errors such as:
triangle.c: In function ‘init_ogl’:
triangle.c:119:11: error: unknown type name ‘EGL_DISPMANX_WINDOW_T’
static EGL_DISPMANX_WINDOW_T nativewindow;
/usr/bin/ld: cannot find -lbrcmGLESv2
/usr/bin/ld: cannot find -lbrcmEGL
/usr/bin/ld: cannot find -lopenmaxil
The libbrcm* libraries are currently not present in any packages in Raspberry Pi OS 64-bit as checked with aptitude command line. The documentation for the samples is deprecated, so I don’t expect those to work any time soon.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
|Support CNX Software - Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples|