Thursday, November 10, 2011

Windows 7的固态硬盘(SSD)优化

SSD是英文Solid State Drive的缩写,中文译作固态硬盘或电子硬盘,目前越来越多地在计算机和便携电子设备中使用。SSD是基于电子芯片,通常用闪存(Flash)芯片。闪存芯片细分也有很多类,如NAND, NOR, MovieNand, iNand, eMMC。大家常用的SD卡就是Nand闪存芯片封装在塑料壳内。
SSD有众多下显而易见的优点,可以替代传统硬盘,只是价格上还不具优势。其优点是:具有低功耗、无噪音、抗震动、低热量的特点,不仅使得数据能更加安全地得到保存,而且也延长了靠电池供电的便携设备的连续运转时间。例如韩国三星半导体公司(SAMSUNG Semiconductor)于2006年3月推出的容量为32GB的固态硬盘,采用了和常规微硬盘相同的1.8英寸规格。其耗电量只有常规硬盘的5%,写入速度是常规硬盘的1.5倍,读取速度是常规硬盘的3倍,并且没有任何噪音。今天刚看到的: Corsair刚刚宣布配备Marvell公司SATA3性能Pro系列的6Gb / s固态硬盘这些2.5英寸SSD可以达到515 MB/s的读取和440 MB/s的写入速度如果你有兴趣280美元128GB版本,而530美元256GB容量对于玩电脑游戏,或运行大量计算,或经常编译大量程序的用户来说,目前的计算机CPU速度都很快,内存也足够多,显卡的性能也不错,通常瓶颈就在硬盘上。我经常用GNU的compiler编译大量程序,我的Laptop换了SSD后,其编译速度不亚于Core i7的Desktop PC。
目前SSD的最大问题仍然是成本和写入次数。随着SSD逐渐普及,工艺不断改进,芯片的集成度不断提高,其成本正逐步下降。而闪存的写入次数通常在1万到一百万次,对普通用户来说,SSD的寿命足以使用到更新换代的时刻到来。相比之下,其售价的下降还很缓慢。
SSD大部分被制作成与常规硬盘相同的外形,例如常见的1.8英寸、2.5英寸或3.5英寸规格,并采用了相互兼容的接口;但有些固态硬碟也使用 PCI Express 或是 Express Card接口,以提高传输的速度或减小体积。
由于SSD具有与传统硬盘显著不同的特性,所以在Windows操作系统中,有很多设置可更好地发挥SSD的优越性。下文译自 Computing.net by Tom's Guide,原文Solid State Drive (SSD) Tweaks for Windows 7。为了方便理解,我添加了一些术语的解释和一些网页连接。
By: tecmo34
December 19, 2010
这个HOWTO是提供用于优化Windows 7的SSD设置。建议这些调整的前后测试你的SSD的性能,看看它们的performance是否有所改善。我建议使用AS SSD Benchmark检测你的SSD的性能。
警告!读者需要充分了解这些建议的调整可能发生的任何损害。这些只是建议,以提高SSD的性能,如果你的SSD运作正常,你并不需做这些设置。
  1. SATA控制器设置为AHCI(Advanced Host Controller Interface)模式
    在安装过程中,你要确保你的BIOS设置为AHCI,以启用SATA控制器的AHCI(关于AHCI,请参见Intel的介绍)。 启用AHCI才能利用SSD内置的TRIM功能(参见wikipedia的TRIM介绍)。
    如果您已经把SSD安装在IDE模式下的操作系统,而你的BIOS支持AHCI,最好切换为AHCI,可按照微软此文所述步骤:http://support.microsoft.com/kb/922976。
  2. 验证TRIM是否启用,确认TRIM命令正在从Windows发送到SSD。
    如何验证TRIM是启用
    • 在开始菜单的搜索框中,键入“cmd”;
    • 右击CMD程序,并选择以管理员身份运行;
    • 在命令行中输入“fsutil behavior query DisableDeleteNotify”。
    • 如果DisableDeleteNotify = 0, TRIM已启用。
    • 如果DisableDeleteNotify = 1, TRIM未启用。
  3. 禁用系统还原(Disable System Restore)
    随着时间的推移,启用系统会逐渐降低SSD的效率,从而使TRIM很难发挥作用。建议禁用系统还原功能,并可以保留宝贵的SSD存储空间。
    如何禁用:
    • 右键单击我的电脑(My Computer),选择属性(Properties);
    • 选择“系统保护”(System Protection);
    • 选择“配置”(Configure);
    • 选择“关闭系统还原”(Turn Off System Restore)
  4. 禁用驱动器索引(Disable Drive Indexing)
    SSD的访问时间很短(最多为​​0.1毫秒),没有必要像普通的硬盘那样需要启用Drive Indexing来提高响应时间。
    如何禁用:
    • 进入我的电脑(My Computer);
    • 右键点击你的SSD,并选择“属性”(Properties);
    • 取消勾选框标有“允许启用内容索引的文件属性”("Allow files to have contents indexed in addition to file properties")。
    • 一个弹出的画面可能会出现,说明有错误应用属性(an error applying attributes),这是正常的,你应该选择“全部忽略”,并继续。
  5. 禁用驱动器的定时碎片整理(Drive Defragmentation Schedule)
    根据预设,启用TRIM后,Windows 7应该自动禁用碎片整理。如果没有,你需要禁用此功能,因为defraging你的SSD不是一件好事!!
    如何禁用:
    • 进入我的电脑(My Computer);
    • 右键点击你的SSD,并选择“工具”(Tools)选项卡;
    • 选择框立即重组(Defragment Now);
    • 选择框配置计划(Configure Schedule);
    • 取消"按计划运行"(Run on a Schedule)
  6. 禁用页面文件(PageFile)
    这并不提高SSD的性能,但可为你夺回SSD上的3至4 GB的宝贵空间。此外,如果你的内存小于4GB,或你的程序需要大量内存,则不建议你做这一步。
    如何禁用:
    • 右击我的电脑(My Computer);
    • 选择“属性”(Properties);
    • 选择“高级系统设置”(Advanced System Settings);
    • 选择“性能”(Performance)选项卡和“高级”(Advanced)选项卡;
    • 选择改变虚拟内存(Change box for virtural memory);
    • 取消勾选自动管理所有驱动器页面文件大小(Automatically Manage Page File Size For All Drives);
    • 选择无分页文件(No Paging File),并单击该设置框(Set);
    • 选择yes允许并重新启动
  7. 禁用休眠
    禁用休眠状态将为你夺回SSD宝贵的存储空间2 GB。此外,作为固态硬盘,由于它的快速加载时间,休眠没有提供多少好处。
    如何禁用:
    • 在开始菜单的搜索框(start menu search box)中,键入“cmd”;
    • 右击CMD程序,并选择以管理员身份运行(Run as Adminstrator);
    • 在命令行中键入“powercfg -h off”。
    • 一旦完成,将返回命令提示符。
  8. 禁用预取(Prefetch)和超取(Superfetch)的
    如何禁用:
    • 运行Regedit
    • 进入"HKEY_LOCAL_MACHINE\CurrentControlSet\Control\SessionManager\Memory Management\PrefetchParameters"
    • 右键单击EnablePrefetcher和EnableSuperfetch;
    • 选择修改这些值从1(或3)更改为0,
    • 重新启动。
  9. 禁用Windows Write-Cache Buffer Flusing
    这是Intel SSD不建议,因为它可能有负面影响。推荐调整前后检查性能,以确定效果。
    如何禁用:
    • 右击我的电脑(My Computer)并选择属性;
    • 选择“设备管理器”(Device Manager);
    • 选择磁盘驱动器(Disk Drives);
    • 右击SSD和选择“属性”(Properties);
    • 根据政策选项卡,取消选中启用写入缓存在设备上。
  10. 禁用Windows搜索和Superfetch的
    如何禁用:
    • 按Winkey +“R”运行的对话;
    • 输入“services.msc”并回车;
    • 滚动了解SuperFetch,右击并选择“属性”;
    • 在下拉菜单中,选择“禁用”,然后选择确定;
    • 滚动到Windows搜索,右击并选择“属性”;
    • 点击停止框,比使用下拉菜单,选择“禁用”,然后选择确定
  11. 禁用ClearPageFileAtShutdown和LargeSystemCache
    如何禁用:
    • 运行Regedit
    • 选择"HKEY_LOCAL_MACHINE\CurrentControlSet\Control\SessionManager\Memory Management"
    • 右键单击ClearPageFileAtShutdown和LargeSystemCache;
    • 选择修改这些改变的值从1到0,
    • 重新启动
  12. 调整电源设置
    调整电源设置
    • 进入控制面板(Control Panel);
    • 选择“系统和安全”(System and Security)
    • 选择“电源选项”(Power Options),点击下拉Show Additional Plans
    • 选择高性能(High Performance),点击应用(Apply);
    • 高性能(High Performance),单击“更改计划设置(Change Plan Settings);
    • 单击“更改高级电源设置(Change Advanced Power Settings);
    • 点击下拉选项的硬盘(hard disk);
    • 更改为0分钟后关闭硬盘(never)
    • 选择“确定”;
    • 选择保存设置。
Copied from Computing.net by Tom's Guide,原文Solid State Drive (SSD) Tweaks for Windows 7
By: tecmo34
December 19, 2010

This HowTo is to provide the common tweaks used to optimize your new SSD for Windows 7. I would recommend checking the performance of your SSD before and after these tweaks to see how they impact your performance. I recommend using AS SSD Benchmark to check your performance.
Warning! The reader takes full responsibiity for any damage that may occur to their PC or hardware by follwing these recommended tweaks. These are just recommendations to improve the performance of the SSD but are not required if your SSD is functioning correctly.
Step 1. SATA Controller set to AHCI Mode:
  • During the installation process, you want to ensure your BIOS are set to AHCI for the SATA controller to enable AHCI. AHCI is needed for native TRIM support utilized by a SSD.
  • If you have already installed the OS in IDE mode, it is recommened to switch to AHCI after completing the steps listed in this Windows Article: http://support.microsoft.com/kb/922976, if your BIOS support AHCI.
Step 2. Verify TRIM is Enabled
Verifing TRIM will confirm that the TRIM commands are being sent from Windows to the SSD.
How to Verify TRIM is Enabled
    • In the start menu search box, type" cmd";
    • Right click the cmd program and select Run as Adminstrator; and
    • In the command line type "fsutil behavior query DisableDeleteNotify".
      • if DisableDeleteNotify = 0 TRIM is Enabled.
      • If DisableDeleteNotify = 1 TRIM is Disabled.
When typing in the command window, don't include " " when typing.

Step 3. Disable System Restore
System Restore on a SSD can degrade the SSD performance over time and make it very difficult for TRIM to work. It is recommended to disable System Restore to prevent this and to regain valuable SSD storage sapce.
How to Disable:
    • Right click on My Computer and select Properties;
    • Select System Protection;
    • Select Configure; and
    • Select Turn Off System Restore.

Step 4. Disable Drive Indexing
With the access times of a SSD (0.1 ms for most), there is no need to index the drive for quicker response times, like with a standard hard drive.
How to Disable:
    • Go into My Computer;
    • Right click your SSD and select Properties; and
    • Un-check the box marked "Allow files to have contents indexed in addition to file properties".
    • A popup screen may appear, stating there is an error applying attributes, this is normal and you should select "Ignore All" and continue.

Step 5. Disable Drive Defragmentation Schedule
By default, Windows 7 should automatically disable defrag by default as part of the TRIM requirements. In case it doesn't, you'll want to disable this feature, as defraging your SSD is not a good thing!!
How to Disable:
    • Go into My Computer;
    • Right click your SSD and select Tools tab;
    • Select the box Defragment Now;
    • Select the box Configure Schedule; and
    • Un-check the the Run on a Schedule Box.


Step 6. Disable PageFile
This does not improve the performance of the SSD but does get you back 3 to 4 GB of valuable space on your SSD. Also, it is not recommend for users with less than 4GB of Memory or doing without watching your RAM usages prior to implementing.
How to Disable:
    • Right click My Computer;
    • Select Properties;
    • Select Advanced System Settings;
    • Select the Performance tab and Advanced tab;
    • Select the Change box for virtural memory;
    • Un-check Automatically Manage Page File Size For All Drives;
    • Select No Paging File and click the set box; and
    •  Select Yes to allow and restart.

Step 7. Disable Hibernation
Disabling hibernation will return 2 GB of valuable storage space to your SSD. Also, it provides no real benefit to a SSD due to it's quick load times.
How to Disable:
    • In the start menu search box, type" cmd";
    • Right click the cmd program and select Run as Adminstrator; and
    • In the command line type "powercfg -h off".
    • Once completed, the command prompt returns.
When typing in the command window, don't include " " when typing.

Step 8. Disable Prefetch and Superfetch
How to Disable:
    • Type Regedit into the Start Menu;

    • Select the file path; "HKEY_LOCAL_MACHINE\CurrentControlSet\Control\SessionManager\Memory Management\PrefetchParameters"
    • Right click on both EnablePrefetcher and EnableSuperfetch;
    • Select modify on each of these to change the value from 1 (or 3) to 0, and
    • Restart.

Step 9. Disable Windows Write-Cache Buffer Flusing
This is not recommended for Intel SSD, as it has a negative effect on their performance. It is recommend to check performance before and after this tweak to determine if has a negative or postive effect.
How to Disable:
    • Right click My Computer and select Properties;
    • Select Device Manager;
    • Select Disk Drives;
    • Right click the SSD and select Properties; and
    • Under the Polices tab, uncheck the Enable write caching on the device.

Step 10. Disable Windows Search and Superfetch
How to Disable:
    • Press Winkey + 'R' for Run Dialogue;
    • Type "services.msc" and press Enter;
    • Scroll to Superfetch, right click and select Properties;
    • In the drop down menu, select Disabled and select Ok;
    • Scroll to Windows Search, right click and select Properties;
    • Click the Stop box, than use the drop down menu, select Disable and select Ok.

Step 11. Disable ClearPageFileAtShutdown and LargeSystemCache.
How to Disable:
    • Type Regedit into the Start Menu;

    • Select the file path; "HKEY_LOCAL_MACHINE\CurrentControlSet\Control\SessionManager\Memory Management"
    • Right click on both ClearPageFileAtShutdown and LargeSystemCache;
    • Select modify on each of these to change the value from 1 to 0, and
    • Restart.

Step 12. Adjusting the Power Settings
Adjusting the Power Settings
    • Go to Control Panel;
    • Select System and Security'
    • Select Power Options and Click the drop down for Show Additional Plans;
    • Select the High Performance bubble to apply it;
    • Click Change Plan Settings for High Performance;
    • Click Change Advanced Power Settings;
    • Click the hard disk drop down option;
    • Change Turn off hard disk after to 0 minutes (Never)
    • Select OK; and
    • Select Save Settings.


0 Comments:

Post a Comment