LVM RAID0 And SSD Discards/TRIM

Home » CentOS » LVM RAID0 And SSD Discards/TRIM
CentOS 8 Comments

I’m trying to work out the kinks of a proprietary, old, and clunky application that runs on CentOS. One of its main problems is that it writes image sequences extremely non-linearly and in several passes, using many CPUs, so the sequences get very fragmented.

The obvious solution to this seems to be to use SSDs for its output, and some scripts that will pick up and copy our the sequences in proper order once it’s done. I have two 512GB SSDs, and I’ve used LVM to set up a RAID0 between them.

I’ve got that part running, but since I’m on CentOS 5.8 (which is what this application officially supports), I don’t have a kernel with SSD
discard support, and after a few days (I told you, this application is write intensive), things get very slow.

Using hdparm to secure erase the drives and recreating the LVM RAID0
gets things back to speed again, but that’s obviously not ideal.

So, from what I understand, if I can get this thing running on CentOS
6.4, I’ll get kernel discard support, and discard support in LVM when running a RAID0. I’m using ext4.

Is that correct? Will this solve my problem? I want to confirm that discard support works on a RAID0 of SSDs using LVM and ext4 before I
start working on getting this legacy application to run on a newer CentOS.

8 thoughts on - LVM RAID0 And SSD Discards/TRIM

LEAVE A COMMENT