Optimize Windows for using SSD on laptop

    First published on his blog as an answer to this topic . Thanks to the kind habravchanin borisko who gave me the opportunity to move here.

    This material is a compilation (as complete as possible) from several sources (see links at the bottom of the post). I would be grateful for the answers to the questions (they are in the text) that I had in the process of preparing this material.


    Ever since I acquired IBMLenovo ThinkPad X61s (it's such a small and convenient laptop with a diagonal of 12 inches), I always wanted to use it on the bus while I was going to work - well, on the way back, too. However, the bus is shaking so much that it becomes just scary for the hard drive - it will crumble it into fine powder there. In this connection, the Solid State Disk (approximately the same as a regular flash drive, only for an adult) was purchased by OCZ, which (at that time) was incredibly cheap and made it possible to try all the charms of an SSD first hand. A copy of the OCZ Solid Series OCZSSD2-1SLD30G 2.5 "30GB SATA II MLC Internal Solid state disk (SSD) was purchased for $ 220 fantastic at that time (everything else started at 400) and solemnly stuck in the aforementioned laptop. As this was one of the first , the so-called first generation, then the performance on it still leaves much to be desired. But something could be done to improve both the speed of work and prolong the life of the disc.



    Many tweaks for Vista also work fine on Windows 7. By the way, when installing the seven directly on the SSD, many of the settings below immediately appeared in the right positions.

    1. Disable prefetch on Windows XP and both prefetch / superfetch on Windows Vista. Prefetch / superfecth is used by Windows to cache file information for running programs. Read more in the article Russinovich here . Optimization works for a regular disk, but it does not make sense for an SSD, since the speed of access to different parts of the disk is the same, plus prefetching adds work to the system (prefetching overhead itself, which only slows down).

    XP:

    Hkey_local_machine \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \ PrefetchParameters ... right-click on Enableprefetcher ... select modify, change 3 to 0, confirm with OK

    Vista:
    prefetch: Hkey_local_machine \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \ PrefetchParameters ... right-click on Enableprefetcher ... select modify, change 3 to 0, confirm with OK

    superfetch: Hkey_local_machine \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \ PrefetchParameters ... right-click on EnableSuperfetch ... select modify, change 3 to 0, confirm with OK

    2. Change some parameters “a floor higher”, in the Hkey_local_machine \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management ( XP / Vista )

    branch : ClearPageFileAtShutdown - change from 0 to 1 ( it has the opposite effect on my Windows XP, it slows down shutdown, so personally I do not recommend touching this flag )
    As it was found out by a simple Google search, this is bad advice - it slows down the computer’s shutdown process and, in addition, makes an extra pass by overwriting cells occupied by inactive pages of the page file.


    LargeSystemСache - change from 0 to 1 - nothing was found out about this parameter, we continue to work.

    SecondLevelDataCache - change from 0 to the size of the second level cache on your specific computer, make sure that you change the decimal value. What it is and why it is necessary to look at MSDN , for modern systems should not be relevant (unless you use some unknown processor).

    3. HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ FileSystem (XP / Vista):


    NtfsDisable8dot3nameCreation - change from 0 to 1. If there is no such key, you need to create it (DWORD) or you can run the command from the command line: fsutil behavior set disable8dot3 1 - disables the creation of classic 8.3 names for compatibility with FAT16. It makes sense to leave if you still run some ancient DOS-programs.

    NtfsMemoryUsage - change the value to 2. If there is no such key, then you need to create it (DWORD). This setting increases the pool of pages available for caching file read / write operations. Especially helps fans to launch immediately dofiga applications or open dozens of tabs in the browser.

    (XP only): HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Dfrg \ BootOptimizeFunction - change Y to N. This setting forces the system to further optimize the boot area on the disk (drag and drop files to one another), which does not make much sense on SSD.

    3. Disable Indexing on disk through Administrative Tools -> Services. If you already have Live desktop installed (search on the local machine from Microsoft) - my condolences, but I would try to demolish it. Similar to Google Desktop. In general, any programs that hang in memory and write something to disk are recommended to be disabled. Particularly brave people can also disable or not install a resident antivirus.

    4. Enable caching of write to disk through Hardware or Device manager -> Disk Drives -> your SSD -> Properties -> check the boxes Enable write caching on disk and Enable advanced performance (if this field is).

    Since writing is the slowest operation for SSDs and reading is the fastest, it makes sense to enable all possible options for writing caching and disabling read caching. This setting will be set by default if you installed the system directly on the SSD.

    5. Disable swap-file. This can be done through System Properties -> Advanced Tab -> Settings in the Performance frame. In the Performance Options window that opens, select the Advanced tab, at the very bottom in the Virtual Memory frame click Change, select No Paging File, click Set, get out of the maze of windows by clicking Ok and restart the machine.

    This point at first seemed to me the most controversial. However, having tested it on both Windows XP and Windows 7, I can say for sure that on my laptop with 3 gigabytes of memory, the only program that falls from a lack of swap is GIMP. Visual Studio 2010 for Windows 7 swears at a lack of memory, but it still works, albeit slowly.

    For the lazy - in the same section of Performance Options, you can select Optimize for performance in the first tab (Visual Effects). The system itself will try to adjust to your hardware. Personally, I achieve the same (or better) effect by adjusting the same settings manually. But I am "IT", I like it so much :)

    6. Disable hibernation. The main reason for disconnecting is to save the disk resource: since the hibernation file lies on the same physical location, the cells used for its storage generate their resource faster. For prevention, you can delete the file once a month, defragment it (it is still not recommended to do it more often than once every two to three months for SSD disks) and recreate the file. Almost certainly he will appear in a new place, which is what was required.

    7. For owners of Windows XP there is a utility RAMDiskhighly recommended for use. Out of my three gigabytes under RAM disk, one was allocated (at the time when XP was still installed on the laptop), on which I created a swap to 768 MB and redirected the cache of Internet Explorer and Firefox browsers there. Thus, almost all of the temporary files were on the virtual disk and were safely cheer with each restart.

    Unfortunately, at the moment the site with the program is unavailable, so I will be happy for the links to similar (and preferably verified) products in the comments.

    In any case, if you managed to download some utility for creating a virtual disk, you can redirect the browser cache as follows:

    Internet Explorer 7 : Tools -> Frame Browsing Settings -> Settings -> Move Folder.

    Firefox: open a blank tab, type about: config, press Enter, find (if not, create) the browser.cache.disk.parent_directory key, specify the path to the parent folder where ff_cache will be located as a value. Restart the browser. By the way, for Firefox there is another tweak, which simultaneously with the above joys also accelerates the speed of the browser. You need to go to Tools-> Options-> Privacy and disable the rarely used items in this menu. For each of them (for example, keep my history for ..), Firefox creates separate entries for each page that you accessed in several SQLite tables at once. According to information from the eeePC owners forum, disabling these options significantly speeds up the process of surfing the Internet.

    Opera: opera: config # DiskCache | CacheDocs or in the operadef6.ini file in the User Prefs section set Cache Directory4 = X: \ OperaCache

    Similarly, it makes sense to configure the TEMP folder for Windows itself. Right-click on My Computer, select Properties-> Advanced-> Environment Variables - and in the User Variables section, set the path to the virtual disk for the necessary folders.

    8. If you do not use specialized programs for differential backup, you can disable the last access time stamp (special marking that indicates when the file was last opened). This can be done from the command line with the fsutil behavior set disablelastaccess 1 command (you can return it by executing the same command and changing the unit to zero).

    9. Disable logging in NTFS. You decide whether or not to do this, from the command line: fsutil usn deletejournal / d

    10. Use a utility from Microsoft called dskcache. You can read more about what it does and why you need it here: http://support.microsoft.com/kb/Q811392

    11. If you do not use this functionality, disable Windows System Restore.

    12. If you use mail clients (Outlook, Thunderbird) - try to transfer files or folders with mail files to non-SSD drives. If you have only one disk in the system, I recommend doing the same as with the swap, periodically transferring the file to a new location on the disk.

    13. Actual only for Vista - in Windows Vista / Windows 7 defragmentation is enabled by default (from my experience - even when installing on an SSD). In principle, SSD drives can not be defragmented at all (since the read speed from different parts of the drive is the same). However, it is not so simple. Some controllers deliberately fragment files in order to distribute the load on all cells, some do not, so it’s difficult to give unambiguous advice - it depends on the disk manufacturer and the controller manufacturer. “Hospital average”, it is recommended to defragment the disk no more than once every two months, provided that the free space on it is less than 40% and more than 60% of the files are somehow overwritten by the file system (i.e. if you have, for example, 60 % of the occupied volume - log files that are constantly updated).

    14. According to information from various sources (you can see the article on AnandTech, link below), the real defragmentation for SSDs is low-level formatting. The formatting process returns all cells to their original state and allows you to achieve the same level of performance as on a new disk. Information is unverified (not many people are eager to format their disks at a low level), so do at your own risk.
    Links for additional reading on the OCZ forum: one , two , three, and on the eeePC owners forum: one .

    Information overlaps a lot, but there are differences.

    UPD: Additional Information:

    on Anandtech (I immediately wanted to find this article, but I managed to find it just now) - analysis of SSD technology, analysis of OCZ drives and comparison with the Intel X-25 series, including why SSDs are so unusual (compared to regular drives ) behaves. Everything in detail and detail, including the features of the controllers for SSD. The article is March, but the material is still relevant: www.anandtech.com/storage/showdoc.aspx?i=3531&p=1 - if there is interest, I will be happy to translate it into Russian.

    From the comments: May post on the Windows 7 developers blog (there is a small piece of usefulness about SSDs, but currently not true for the pre-release versions): blogs.msdn.com/e7/archive/2009/05/05/support- and-qa-for-solid-state-drives-and.aspx

    UPD 2:Added a description of the settings, thanks to the commentators.

    UPD 3: In the comments there is a serious debate over the transfer of swap-file to RAMdisk. You can look here for opinions from Microsoft Support Engineer (not many, but still). As an option, it was evident from my personal experiments that subjectively (that is, I did not make exact measurements), the performance increased noticeably . That is, according to the sensations, the computer began to run much faster and rustled the disk much less often.

    Original post here: http://www.bukv.net/optimizing-windows-for-using-ssd-in-a-laptop/2009/07/17/

    Also popular now: