Disk benchmark with DD questionable?

Compare external and internal m.2 on Ubuntu 21.04 benchmark with dd command give nearly same speed !

internal: SAMSUNG 970 EVO PLUS M.2 2280 500GB
dd if=/dev/zero of=’/home/ubuntu/Desktop/aaa’ bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 16.2921 s, 65.9 MB/s

external: usb 3.1 Orico enclosure with WD Blue SN550 500GB NVMe
sudo dd if=/dev/zero of=’/media/ubuntu/tst/aaa’ bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 16.8463 s, 63.7 MB/s

The internal spec give “Sequential read and write performance levels of up to 3,500 MB/s and 3,200 MB/s”
while the usb 3.1 Orico enclosure cannot run higher than 10 Gbps (top speed for usb 3.1)

Why the internal ssd is so slow ?

This was discussed in this thread
https://forums.sifive.com/t/ssd-performance/4850
We can get 2GB/s internal if we add the iflag=direct option to dd.

Keep in mind that this is not a server class core, and this is our very first board and SoC with PCIe, so it is unlikely to be perfect.

Got an other way to run benchmark: install gnome-disk-utility and select “Benchmark Disk…”

internal: SAMSUNG 970 EVO PLUS M.2 2280 500GB → 964 MB/s
external: usb 3.1 Orico enclosure with WD Blue SN550 500GB NVME → 135 MB/s
USB 3.0 flash disk → 11.0 MB/s