Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been using a pair of Intel 320 in RAID 1 on my busy Ubuntu server for about 4 month. While the disk usage never reached 50% of the capacity, but I FEEL that the server has become less responsive, so I'm wondering whether I need to run a trim, an if yes, how to do so? (The Linux kernel is 3.0 after upgrading to Ubuntu 10.10)


share|improve this question
You... feel it... just what unit of measurement is that? – SpacemanSpiff Jan 3 '12 at 1:53
I wrote feel in capital just to indicate that I have no objective measure to support the claim. It is just my feeling :) – alfish Jan 3 '12 at 2:07
Are you using software RAID (mdadm/dmraid) or a hardware RAID controller? – Mark Johnson Jan 3 '12 at 20:55

Intel support for TRIM with RAID is coming via the Rapid Storage Technology driver, though it isn't here yet. That won't do you any good, though, since you're using Ubuntu (it would only work with Intel motherboard anyway).

Ubuntu 10.10 has automagic kernel trim support (at least for ext4), but I don't think that does you any good since you're using a RAID array. The system sees your raid array as a logical volume, not as an SSD that will accept TRIM commands.

Take a look at the script that comes with hdparm. Looks like there is a GUI for it, also (DiskTRIM). Running that from a cron job would be better than nothing.

If you're using mdadm you can use mdtrim. The latest versions of dmraid should have you covered, also. The details are in Possible to get SSD TRIM (discard) working on ext4 + LVM + software RAID in Linux?. The Wikipedia TRIM article cites that question.

As to whether you need any of this at the moment, I'm not sure. A write to a page that isn't empty is going to result in write amplfication, but I don't know how likely that is on a drive that's only half full. I think the amount of data that has been written to the drive matters more than the current utilization. Without TRIM, the SSD has no idea which pages are in use and which aren't. So if data equivalent to 100% of the capacity of the drive has been written to it, I think you'll have some performance issues even if the current utilization is 50% due to some of the written data being deleted.

Even if you don't really have a performance problem now, you'll eventually write enough data to the drive that you will, so you ought to at least research the options and figure out what your strategy should be.

share|improve this answer
What about the first part of the question? Do SSDs slow down even if they don't reach half of the capacity? – alfish Jan 3 '12 at 2:08
@alfish - Maybe. Anytime a write occurs to a page that isn't empty, you're going to get some write amplification. – Mark Johnson Jan 3 '12 at 2:17
@alfish SSDs slow down as soon as the total amount of data that has ever been written to the SSD during its life equals the total amount of data the SSD can hold at once. At that point, most writes will be to pages that have to be erased before they can be written to. – David Schwartz Jan 3 '12 at 4:02
(The above assumes you never TRIM.) – David Schwartz Jan 3 '12 at 7:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.