r/linux_programming • u/Jeron_Baffom • Dec 03 '22
Cheap SSD: Slow Speed Issue
In the beginning of the year I've bought a cheap SSD SomnAmbulist 120GB. After a couple of benchmarks, I've noted some strange throughput measurements. Briefly:
Initial Benchmark | image
Just after format, the throughput is according to the advertised specifications at 510MB/s read and 440MB/s write.
It starts to drop at 35% capacity written and stabilizes at 200~300MB/s read and 40MB/s write.
Although this drop is not mentioned by the seller's ads, it is indeed an expected behavior and should return to normal after a couple of minutes in idle (flush the cache into the permanent area).Benchmark after 1 hour in idle | image
Unfortunately, the throughput has not returned to normal (yet?).
315MB/s read and 440MB/s write, and the speed drop started earlier at 10% capacity written.Benchmark after 12 hours in idle | image
The throughput still has not returned to normal.
Questions
Is this the expected behavior for such cheap SSD or indeed there is something strange?
What might be going wrong here?
Any idea how to fix this throughput?
Debug Info
SSD/TRIM Supported
fstrim enabled
SSD APM (Advanced Power Management) not supported
f3 (Fight Flash Fraud) OK
## SSD/TRIM SUPPORTED
root@debian:~# hdparm -I /dev/sda | grep -i "trim\|power"
* Power Management feature set
* Data Set Management TRIM supported (limit 8 blocks)
* Deterministic read data after TRIM
## SSD/TRIM AVAILABLE (DISC-MAX NON ZERO)
root@debian:~# lsblk -D /dev/sda
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sda 0 512B 2G 0
## ADVANCED POWER MANAGEMENT NOT SUPPORTED
root@debian:~# hdparm -B /dev/sda
/dev/sda:
APM_level = not supported
## FSTRIM ENABLE
root@debian:~# systemctl status fstrim.timer
● fstrim.timer - Discard unused blocks once a week
Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Sat 2022-12-03 03:36:10 UTC; 35min ago
Trigger: Mon 2022-12-05 00:51:25 UTC; 1 day 20h left
Triggers: ● fstrim.service
Docs: man:fstrim
Dec 03 03:36:10 debian systemd[1]: Started Discard unused blocks once a week.
root@debian:~# systemctl status fstrim
● fstrim.service - Discard unused blocks on filesystems from /etc/fstab
Loaded: loaded (/lib/systemd/system/fstrim.service; static)
Active: inactive (dead)
TriggeredBy: ● fstrim.timer
Docs: man:fstrim(8)
root@debian:~# fstrim -av