eMMC performance, reads slower than writes

I’m curious as to what people are seeing in terms of I/O performance from the internal eMMC, I’m seeing that reads are significantly slower than writes which is unexpected.

Writes:

purism@pureos:~$ dd if=/dev/zero of=io-test-file bs=4096 count=250000 conv=fdatasync
250000+0 records in
250000+0 records out
1024000000 bytes (1.0 GB, 977 MiB) copied, 16.0372 s, 63.9 MB/s

Reads:

purism@pureos:~$ dd if=io-test-file of=/dev/null bs=4096 count=250000 iflag=direct
250000+0 records in
250000+0 records out
1024000000 bytes (1.0 GB, 977 MiB) copied, 59.1235 s, 17.3 MB/s

These results are consistently repeatable.

The phone in question is running Byzantium luks variant, although bench marking the crypto would suggest that it’s capable of encryption/decryption magnitudes faster than disk I/O so shouldn’t be a factor?

Shouldn’t you use oflag=direct in the first invocation to make both readings actually comparable?

Thanks, looks like that would be the case, I had thought that fdatasync was enough for it to be a direct write.

Running again with oflag=direct (would the conv=fdatasync still be required?) shows more or less equal read/write speeds…

purism@pureos:~$ dd if=/dev/zero of=io-test-file bs=4096 count=250000 conv=fdatasync oflag=direct
250000+0 records in
250000+0 records out
1024000000 bytes (1.0 GB, 977 MiB) copied, 51.3745 s, 19.9 MB/s

I prefer this result:

@Loki, I managed to find my post (I’m tired now to explain everything on how I’ve tested) yet creating test_eMMC_zero_data file of preferable size is important. Please follow this procedure that I made when I had more time, hope that helps:

Afterwards, when ready to use above created file (within that folder) you might like to take a look (proceed) with something as posted inside of my post #40, same thread. All actually based on @amosbatto request, his post #24.

I’d also like to see your Librem 5 eMMC performance results (therefore this post), sure, if you don’t mind.

1 Like

Thanks for the links. I’m trying not to get too caught up in the details these days, this caught my eye as I was taking a baseline to compare with after changing the encryption on the root file system from LUKS1 to LUKS2 and upping the key size, but as dos has pointed out, I needed the oflag=direct in order for the read and write results to be comparable.