Raspberry Pi 4 on Steroids :)

Java Dec 16, 2020

The RPI4 in the 8GB version is really a nice piece of hardware. It not cheep but with some tuning it is really powerful and even for Java Development on a Apache Tomcat Application Server quite usable.

I decided to tune the slowest part of the RPI4, which has cost me much nerves over the last 10 yeas, the "hard drive" if we can name this so. The micro SD-Card has a max speed of about 20MB/s read/write speed. Let's tune it...

root@rpi4:/home/rpi# hdparm -tT --direct /dev/mmcblk0

/dev/mmcblk0:
 Timing O_DIRECT cached reads:    44 MB in  2.04 seconds =  21.57 MB/sec
 Timing O_DIRECT disk reads:  64 MB in  3.04 seconds =  21.06 MB/sec
 
root@rpi4:/home/rpi# dd if=/dev/zero of=testfile bs=100M count=1 oflag=direct
1+0 records in
1+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 31.0196 s, 3.4 MB/s
SD-Card: Sandisk Extreme 64GB U3

So why not using a NVME drive for the RPI4 since the RPI4 can boot from USB without a sd-card inserted. :)

Western Digital WD Blue SN550

My first try was to buy a USB NVMe M.2 Adapter from FIDECO with the JMS583 chipset and a NVMe drive from Western Digital WD Blue SN550.

FIDECO M.2 NVME Externes SSD Gehäuse, PCIe USB 3.1, 10Gbps, Gen2

So far so good. After installing Debian and some services I noticed that there was 1 minute long hangs on the complete system. After some logfile searching i saw that the USB adapter resets while writing big files. After some googling i decided to test a new USB adapter with a different chipset (ASM2362) on it.

UGREEN SSD M.2 NVMe Gehäuse USB 3.1 Gen 2

The UGREEN adapter works very well and is also a bit faster than the FIDECO adapter. Here are the measurements form UGREEN adapter.

root@rpi4:/home/rpi# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   1516 MB in  2.00 seconds = 767.70 MB/sec
 Timing buffered disk reads: 1074 MB in  3.00 seconds = 357.75 MB/sec
UGREEN: cached disk reads

root@rpi4:/home/rpi# hdparm -tT --direct /dev/sda

/dev/sda:
 Timing O_DIRECT cached reads:   570 MB in  2.01 seconds = 294.52 MB/sec
 Timing O_DIRECT disk reads: 886 MB in  3.00 seconds = 303.42 MB/sec
UGREEN: direct disk reads

root@rpi4:/home/rpi# dd if=/dev/zero of=testfile bs=1G count=1 oflag=direct
1+0 Datensätze ein
1+0 Datensätze aus
1073741824 bytes (1,1 GB, 1,0 GiB) copied, 6,94706 s, 155 MB/s
UGREEN: direct disk writes

Drive SD Card USB-NVMe
read speed 21.57 MB/s 303.42 MB/s
write speed 3.4 MB/s 155 MB/s

I think that was really successful. :D

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.