Overview
This paper describes how to enable TRIM in Microsoft Windows 7 using the Microsoft AHCI driver.
The Microsoft AHCI driver v6.1.7600 Rev.16385 currently shipping with Windows 7 does not support the DSMcap (maximum supported TRIM sectors) provided by an SSD; the Windows AHCI driver uses a default value of eight sectors and the SandForce SF-1000 SSD Processor family only supports a maximum of one TRIM sector. The result is TRIM does not function on SandForce Driven SSDs in the above configuration. Without making the change in this document, the SSD may not operate at peak efficiency.
Solution
A Windows 7 registry change will correct the issue. Detailed below are instructions for users to modify the registry and add the maximum supported TRIM sectors to support TRIM on SandForce drives using the Microsoft AHCI driver.
Note: These instructions are only valid if you are running Windows 7 under AHCI mode, and are using the Microsoft AHCI driver.
IMPORTANT: This section contains steps that tell you how to modify the registry. Serious problems might occur if this is done incorrectly. Therefore, make sure you are comfortable making changes to the registry and follow these steps carefully. For added protection, back up the registry before you modify it. You can later restore it if a problem occurs. For more information about how to back up and restore the registry, follow this link to the Microsoft Knowledge Base: http://support.microsoft.com/kb/322756/
Instructions
1. Exit all Windows-based programs.
2. Click Start, type regedit in the Start Search box, and press Enter to open Registry Editor.
3. If you receive the User Account Control dialog box, click Continue.
4. Locate and then click on the following registry sub-key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\I DE\<diskname>\<instance>\ DeviceParameters\ATAport
The <diskname> will be seen as ?Disk???? where ??? matches the model name of the SSD being modified, like ?DiskFM-25S2S-120GBP2?(Please refer to your Device Manager.).
The <instance> will be seen as ?5&???? where ??? stands for a registry sub-folder created when a drive is connected to the machine, like ?5&183cef87&0&3.0.0?. Note that if the same drive is connected to different ports over time, multiple instances will show up under the <diskname>. If the user is unaware of which <instance> is currently active, the registry modification needs to be applied to every <instance>.
Please refer to the left pane of the figure below for clarification:
5. In the right pane, right-click on the blank area.
6. Under the New submenu, select DWORD (32-bit) Value.
7. Under the Name column type DSMDataSizeCapInBlocks.
8. Right click on the newly created DSMDataSizeCapInBlocks and click Modify.
9. In the Value Data box, type 1, and then click OK.
10. On the File menu, click Exit to close Registry Editor.
11. Reboot the system.
The system will now support TRIM on the SandForce-based SSD with the Microsoft AHCI driver.
This paper describes how to enable TRIM in Microsoft Windows 7 using the Microsoft AHCI driver.
The Microsoft AHCI driver v6.1.7600 Rev.16385 currently shipping with Windows 7 does not support the DSMcap (maximum supported TRIM sectors) provided by an SSD; the Windows AHCI driver uses a default value of eight sectors and the SandForce SF-1000 SSD Processor family only supports a maximum of one TRIM sector. The result is TRIM does not function on SandForce Driven SSDs in the above configuration. Without making the change in this document, the SSD may not operate at peak efficiency.
Solution
A Windows 7 registry change will correct the issue. Detailed below are instructions for users to modify the registry and add the maximum supported TRIM sectors to support TRIM on SandForce drives using the Microsoft AHCI driver.
Note: These instructions are only valid if you are running Windows 7 under AHCI mode, and are using the Microsoft AHCI driver.
IMPORTANT: This section contains steps that tell you how to modify the registry. Serious problems might occur if this is done incorrectly. Therefore, make sure you are comfortable making changes to the registry and follow these steps carefully. For added protection, back up the registry before you modify it. You can later restore it if a problem occurs. For more information about how to back up and restore the registry, follow this link to the Microsoft Knowledge Base: http://support.microsoft.com/kb/322756/
Instructions
1. Exit all Windows-based programs.
2. Click Start, type regedit in the Start Search box, and press Enter to open Registry Editor.
3. If you receive the User Account Control dialog box, click Continue.
4. Locate and then click on the following registry sub-key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\I DE\<diskname>\<instance>\ DeviceParameters\ATAport
The <diskname> will be seen as ?Disk???? where ??? matches the model name of the SSD being modified, like ?DiskFM-25S2S-120GBP2?(Please refer to your Device Manager.).
The <instance> will be seen as ?5&???? where ??? stands for a registry sub-folder created when a drive is connected to the machine, like ?5&183cef87&0&3.0.0?. Note that if the same drive is connected to different ports over time, multiple instances will show up under the <diskname>. If the user is unaware of which <instance> is currently active, the registry modification needs to be applied to every <instance>.
Please refer to the left pane of the figure below for clarification:
5. In the right pane, right-click on the blank area.
6. Under the New submenu, select DWORD (32-bit) Value.
7. Under the Name column type DSMDataSizeCapInBlocks.
8. Right click on the newly created DSMDataSizeCapInBlocks and click Modify.
9. In the Value Data box, type 1, and then click OK.
10. On the File menu, click Exit to close Registry Editor.
11. Reboot the system.
The system will now support TRIM on the SandForce-based SSD with the Microsoft AHCI driver.
Comment