Optimize SSD Performance
SSDs are known for their high I/O performance and minimal power consumption. In this article, we will show you how to optimize SSD performance.
Optimizing SSD Performance
Activating AHCI
Use the AHCI (Advanced Host Controller Interface) mode (not the IDE mode) when operating (Solid State Drives) .[1] You can use the following technologies only with AHCI.
- NCQ (Native Command Queuing)
- LPM (Link Power Management)
Secure Erase before Partitioning
Execute a Secure Erase before partitioning and formatting an SSD. Doing so will delete all SSD blocks from the controller. This will increase the performance of the SSD.
Increasing the Spare Area
You will increase the performance and life cycle of the SSD by using a larger Spare Area (over-provisioning).
You can only increase the spare area before formatting the SSD. This is possible either through a special ATA command or by simply leaving part of the SSD un-partitioned. You will find additional information regarding this in the Spare Area section of the Solid State Drive article.
Activating ATA TRIM
When the entire capacity of an SSD is used, ATA Trim will increase the performance and the life cycle of the SDD.
Optimizing Power Consumption
Device Initiated Power Management (DIPM) does not really increase performance, but does increase the potential battery duration for SSDs in laptops and also minimizes power consumption for SSDs in servers.
- Activate DIPM [3]
- Windows 7:[4]
- The Intel RST driver will activate DIPM on mobile systems
- The Microsoft MSAHCI driver supports DIPM, however only activates it in power saving mode by default. Powercfg can also activate other modes
- Linux:
- Has supported DIPM since Kernel 2.6.24[5][6]
- Windows 7:[4]
Deactivate Defragmentation
SSDs do not require defragmentation.[7]
File System Alignment
When creating partition, proper alignment of the partitions and file systems offers performance advantages.[8] In pure Linux environments that do not have dual boot requirements, the use of GPT offers simplified alignment of the partitions and file systems.[9] With regard to GPT, there are limitations for Windows.[10]
By the way, the first partition is a special case, since this partition must leave space for the Master Boot Record (MBR) at the very beginning of the hard disk or SSD. You will find detailed information regarding correct alignment in the Hard Disk CHS and LBA Addressing#Alignment and Partition Alignment articles.
Linux File System
In some postings, you will find recommendations for using Ext2 as the file system. These recommendations apply for first generation SSDs, since the file system journal would negatively affect performance. The advantage of a journal (quick file system check after a crash) would be lost thereby.
For modern SSDs with garbage collection and trim, Ext4 can be recommended, since the new features minimize write amplification.[11] You can use Ext4 with its new features, like extents, delayed allocation and RAID stripe alignment and have the advantage of the journal.[12]
Effects on Performance by using Servers with SSDs
Steven Wells and Tahmid Rahman showed the things that affect performance when using SSDs with servers in the Optimizing Solid-State Drive (SSD) Performance for Data Center Applications (SSDS001) session at the Intel Developer Forum 2011 :
- Request Size
- Queue Depth
- Performance vs. Density
- Read/Write Mix
- Random access percentage
- Over-provisioning
- Data Entropy
- Prior State of the Drive
References
- ↑ http://intelstudios.edgesuite.net/idf/2010/sf/aep/SSDS003/SSDS003.html Slide 6
- ↑ Over-provisioning an Intel SSD (Intel)
- ↑ http://intelstudios.edgesuite.net/idf/2010/sf/aep/SSDS003/SSDS003.html Slide 9
- ↑ http://www.microsoft.com/whdc/system/pnppwr/mobile_bat_Win7.mspx
- ↑ http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption#SATA_Link_Power_Management
- ↑ http://kernelnewbies.org/Linux_2_6_24#head-f29764e7ef293be84e2f8aa1b08b8816b15ebfca
- ↑ http://intelstudios.edgesuite.net/idf/2010/sf/aep/SSDS003/SSDS003.html Slide 23
- ↑ http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/
- ↑ http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/#comment-1788
- ↑ http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/#comment-1802
- ↑ http://en.wikipedia.org/wiki/Write_amplification#Factors_affecting_the_value
- ↑ http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/#comment-1786
Additional Information
Author: Werner Fischer Werner Fischer, working in the Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay.
|