文 | Travis
出品 | OSC开源社区(ID:oschina2013)
The Raspberry Pi has released the long-awaited 64-bit Raspberry Pi OS. Theoretically, a 64-bit operating system can better utilize the advantages brought by a 64-bit processor (newer versions of Raspberry Pi have adopted 64-bit processors), support more than 4GB of memory (Raspberry Pi 4B is equipped with a maximum of 8GB of memory), and perform better in multimedia content processing.
While this is the theory, how do 32-bit and 64-bit perform in actual tests? Recently, foreign media Phoronix conducted a detailed test of both, let’s take a look at the test data and performance after switching from Raspberry Pi OS 32-bit to 64-bit.
To ensure fair testing and eliminate differences caused by different processors or memory, this test used the Raspberry Pi 400, with the following hardware configuration:
-
CPU: Broadcom BCM2711 Quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.8GHz
-
Memory: 4GB LPDDR4-3200
-
Storage: SanDisk 16GB
-
Decoding: H.265 (4K@60), H.264 (1080P@60, 1080P@30), OpenGL ES 3.0
The Linux kernel version used in this test is 5.10, and the software package versions used in the tests are the same, with the only difference being the switch from the latest Raspberry Pi OS 32-bit to 64-bit.
In the first WebP image encoding test (the lower the score, the better; this is a test of Google’s libwebp using the cwebp image encoding utility), whether under default encoding settings or at a quality of 100, the encoding speed of the 64-bit system is about 4.5% – 7% faster than the 32-bit system, with only a small gap between the two.
In the subsequent GraphicsMagick test (the higher the score, the better; this tests GraphicsMagick and its OpenMP implementation), there are significant differences between the 32-bit and 64-bit test results, with the largest gap occurring during the HWB color space test, where the 64-bit performance is about 47% faster than the 32-bit, and there is also about a 32% performance gap in the Swirl operation. Additionally, during rotation, sharpening, and Gaussian noise processing, there is also a performance difference of about 17% – 28%.
In the FLAC audio encoding test (the lower the score, the better; this calculates the time required to encode a sample WAV file to FLAC format), the 64-bit system outperformed the 32-bit system by about 17%; in the LAME MP3 encoding test (the lower the score, the better; this calculates the time required to encode a WAV file to MP3 format), the 64-bit system improved by about 43%.
In previous tests, it can also be seen that the 64-bit system has more than a 40% performance improvement over the 32-bit system in certain test scenarios, and in the Stress-NG test (the higher the score, the better; Stress-NG is a Linux stress testing tool that can test CPU, Memory, IO, and Disk), the performance gap between the two is further amplified, with the performance improvement of the 64-bit system reaching about 232% in Vector Math; in the Glibc C String Functions test, it also improved by about 196%.
In addition to multimedia encoding and system stress testing, performance tests were also conducted specifically for Python and PHP. In the PyBench test (the lower the score, the better; PyBench reports the average test time of different functions, providing an estimate of Python’s average performance on the system), the 64-bit system improved by about 13% compared to the 32-bit system; while in the PHPBench test (the higher the score, the better; PHPBench runs a large number of tests to evaluate various aspects of the PHP interpreter), the performance of the 64-bit system improved by about 54%.
Although the test results above have already shown that the performance of the 64-bit operating system has significantly improved compared to the 32-bit system under the same testing environment, this is not the maximum performance difference in all test phases.
In the Sysbench test (the higher the score, the better; Sysbench is a multi-threaded benchmarking tool based on LuaJIT, specifically testing CPU and memory), the advantages of the 64-bit processor + 64-bit operating system are maximized, with a performance improvement of an astonishing 1380% for the 64-bit.
We have only selected some representative tests from dozens of different load tests here, but looking at all the test results, switching the Raspberry Pi OS to the 64-bit version has resulted in an average performance increase of about 48%.
Users who want to see all the test data can visit the Phoronix official website (https://www.phoronix.com/scan.php?page=article&item=raspberrypi-32bit-64bit).
Compared to other Linux distributions, Raspberry Pi OS has only now released a 64-bit system, which is indeed a bit late. However, from the test results, the significant improvement of the 64-bit system makes the wait worthwhile. At this point, you should find no reason to refuse to upgrade to the 64-bit system.
Liang Xu has updated many high-quality video materials on his video account, welcome to follow!