background preloader

SSD Considerations

Facebook Twitter

Solid State Drives. Solid State Drives (SSDs) are not PnP devices.

Solid State Drives

Special considerations such as partition alignment, choice of file system, TRIM support, etc. are needed to set up SSDs for optimal performance. This article attempts to capture referenced, key learnings to enable users to get the most out of SSDs under Linux. Users are encouraged to read this article in its entirety before acting on recommendations. Note: This article is targeted at users running Linux, but much of the content is also relevant to other operating systems like BSD, Mac OS X or Windows. Overview Advantages over HDDs Fast read speeds - 2-3x faster than modern desktop HDDs (7,200 RPM using SATA2 interface).Sustained read speeds - no decrease in read speed across the entirety of the device. Limitations Per-storage cost (close to a dollar per GB, vs. around a dime or two per GB for rotating media).Capacity of marketed models is lower than that of HDDs.Large cells require different filesystem optimizations than rotating media. Others. Enabling and Testing SSD TRIM Support Under Linux.

With the launch of Windows 7 in the fall of 2009, adopters were treated to many useful new features.

Enabling and Testing SSD TRIM Support Under Linux

But for SSD users, there was one that mattered more than the others: TRIM support. Being a full-time Linux user, I couldn’t help but feel a bit left out. So I had to investigate, and see just what it took to enjoy the benefits of TRIM under my preferred OS. For those unaware, TRIM is an ATA command that solid-state drives can take advantage of in order to prolong its fast performance as time passes on. SSDs that don’t support TRIM have an inherent fault of slowing down over long periods of time (months, or years depending on the level of usage). In the months that followed the Windows 7 launch, it seemed as though exploiting TRIM under Linux was impossible, despite official support being found in the kernel beginning in December 2008. For those wanting to enable TRIM support, it’s recommended that the most up-to-date kernel (at least 2.6.33) is used, and also the ext4 file system.

How to properly activate TRIM for your SSD on Linux: fstrim, lvm and dm-crypt. Unlike hard disk drives (HDDs), NAND flash memory that make SSD cannot overwrite existing data.

How to properly activate TRIM for your SSD on Linux: fstrim, lvm and dm-crypt

This means that you first have to delete the old data before writing new one. Flash memory is divided into blocks, which is further divided in pages. The minimum write unit is a page, but the smallest erase unit is a block. Data can be written directly into an empty page, but only whole blocks can be erased. Therefore, to reclaim the space taken up by invalid data, all the valid data from one block must be first copied and written into the empty pages of a new block. Do you see the problem? Without TRIM the disk is unable to know which blocks are in use by a file or which ones are marked as free space. How to set up SSD raid and TRIM support? CentOS 6.4 SSD RAID-1 /w TRIM support - Hacker's ramblings.

The short version is: it does not work.

CentOS 6.4 SSD RAID-1 /w TRIM support - Hacker's ramblings

Having a SSD is feasible in the long run only if there is possibility of operating system informing the drive that an entire drive block (typically 16 KiB) can be erased. openSUSE wiki has following quote in it: "There are three terms often used to interchangeably describe this same basic functionality: Discard, UNMAP, and TRIM. " This discard is possible only when there are no operating system sectors (typically 512 bytes) in the drive block. Here is what I tried to do: I installed two Intel® Solid-State Drive 520 Series drives into my server and tried to see if RedHat-based CentOS 6.4 has enough backported bits & pieces to support RAID-1 /w TRIM. The drives are fine and kernel TRIM-support is there: hdparm -I /dev/sda | fgrep -i trim * Data Set Management TRIM supported * Deterministic read after TRIM My initial attempt had GPT-partition table with a single RAID-partition on it.

Mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1.