Is there a way to determine if TRIM is why my HD is slow?

1

I have a computer with RAID1 SSDs, but the performance I'm getting out of them is really bad (around 20MB/sec sequential read). They don't have TRIM enabled since it's an old Linux kernel, so before I upgrade just to turn on TRIM, I want to ensure that I'm solving the right problem.

Is there a way to definitively prove that TRIM is my problem with my disk performance?

mlissner

Posted 2012-02-17T18:58:49.820

Reputation: 860

Super User is for computer enthusiasts and power users. questions about …computer hardware, computer software, personal and home computer networking.

Your question doesn't fall into any of those catagories. – wizlog – 2012-02-17T19:24:17.933

1While it may be a server, this is computer hardware, so I do not believe it is completely off topic. – music2myear – 2012-02-17T19:37:29.303

1Analyzing hard drive performance seems squarely on topic to me. – mlissner – 2012-02-17T20:00:50.600

Check also for firmware updates. Some SSD devices had serious bugs with early firmware versions. – jap1968 – 2012-02-21T08:42:47.130

Answers

1

If you get a very recent release of e2fsprogs, you can run e2fsck -f -E discard to check the fs and issue discards on all of the free space. Note that it is write performance, not read, that generally degrades on an SSD that isn't trimmed. Doing a trim now or upgrading to a new kernel and enabling auto trim may improve things over time, or at least keep them from getting worse, but your best bet is to backup the whole system, then wipe the entire ssd with hdparm's security erase command, then restore.

psusi

Posted 2012-02-17T18:58:49.820

Reputation: 7 195

Doing a wipe and restore is the LAST option, but good to know about the write vs. read performance. Since both are affected, I'm pretty sure this something bigger. – mlissner – 2012-02-21T06:45:46.310

I'd stay away from the discard support in e2fsck for a while yet as it still seems to be buggy. – psusi – 2012-02-21T14:51:28.330

1

You could try to boot with a live system having a kernel able to apply the TRIM command to the disk.

This way you could improve your disk performance without having to change the kernel of your system.

Unfortunately, I do not know which is the minimum kernel version that you need.

jap1968

Posted 2012-02-17T18:58:49.820

Reputation: 827

According to Wikipedia, it's 2.6.33. Wild that I could run a HD-fixing kernel on a disk without installing that kernel. I'll consider this as a last option, before wiping, but I think it looks like this isn't a TRIM issue at all. – mlissner – 2012-02-21T06:48:07.710

Simply booting from the livecd won't do anything. You would have to delete and recreate all of the files with kernel discard enabled since it only issues the discards when you delete files. – psusi – 2012-02-21T14:54:33.020

0

soft RAID1 does not pass TRIM command, even less RAID controllers....

It could happen your SSD drives are 10MB/S, just that seek time is 0.0000s

ZaB

Posted 2012-02-17T18:58:49.820

Reputation: 2 365

I sure hope not - it's a server. My desktop gets 10X that speed. – mlissner – 2012-02-18T05:22:12.157

Does your desktop use same RAID controller? – ZaB – 2012-02-18T09:58:35.093

Nope. It's software RAID. – mlissner – 2012-02-21T06:46:17.400

Problem lies in RAID controller. you do not control what it does on disk interface. Move to soft raid (also available in JBOD and AHCI modes if RAID controller provides them) and see how well it does. – ZaB – 2012-02-21T21:31:14.203