📜 ⬆️ ⬇️

Optimize Windows to use SSD on a laptop

I published it first in my blog as an answer to this topic . Thanks to the good habravchaninu borisko who presented the opportunity to transfer 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.

Since I acquired IBM Lenovo ThinkPad X61s (it’s such a small and handy laptop with a 12-inch diagonal), I always wanted to use it on the bus while I was going to work - well, on the way back too. However, the bus shakes so that it becomes terrible for a hard drive - it will be crumbled into fine powder there. In this connection, the Solid State Disk (approximately the same as a regular flask, only for an adult) from OCZ, which (at that time) was insanely cheap and made it possible to try all the charms of SSD on its own experience, was acquired. A copy of the OCZ Solid Series OCZSSD2-1SLD30G 2.5 "30GB SATA II MLC Internal Solid state disk (SSD) was bought for a fantastic 220 dollars at that time (everything else started with 400) and was solemnly inserted into the aforementioned laptop. Since this was one of the first the so-called first generation, the performance on it still leaves much to be desired, but something could be done to improve both the speed of work and the prolongation of disk life.
')


Many tweaks for Vista also work fine on Windows 7. By the way, when you installed the seven on the SSD right away, many of the settings below were right in the right position.

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

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 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 “one floor up” in the Hkey_local_machine \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management ( XP / Vista ) branch:

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


LargeSystemache - change from 0 to 1 - it was not possible to figure out anything 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, then it needs to be created (DWORD) or you can run the command from the command line: fsutil behavior set disable8dot3 1 - disables the creation of classic names like 8.3 for compatibility with FAT16. It makes sense to leave if you still have some ancient DOS programs running around.

NtfsMemoryUsage - change the value to 2. If there is no such key, then it must be created (DWORD). This setting increases the pool of pages available for caching file read / write operations. It helps fans to launch applications at once 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 files one to the other), which does not make much sense on the SSD.

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

4. Enable disk write caching via Hardware or Device manager -> Disk Drives -> your SSD -> Properties -> tick the fields Enable write caching on disk and Enable advanced performance (if there is this field).

Since writing is the slowest operation for SSD, and reading is the fastest, it makes sense to include all possible write caching options and disable read caching. This setting will be set by default if you install the system immediately 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, within the Virtual Memory frame, click Change, select No Paging File, press Set, get out of the windows maze by pressing 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 a swap is GIMP. Visual Studio 2010 under Windows 7 swears at the lack of memory, but it still works, albeit slowly.

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

6. Disable hibernation. The main reason for shutting down is to save the disk resource: since the hibernation file is in the same physical place, the cells used for its storage generate their resource faster. For prophylaxis, you can delete a file once a month, defragment it (it is still not recommended to perform it more than once every two to three months for SSD drives) 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 RAMDisk utility that is highly recommended for use. Of my three gigabytes under the RAM disk, one was allocated (at the time when XP was installed on the laptop), on which I created a 768MB swap and redirected the cache of Internet Explorer and Firefox browsers. Thus, almost all temporary files lay on a virtual disk and safely returned to each restart.

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

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

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

Firefox : open an empty tab, type about: config, press Enter, find (if not, create) the key browser.cache.disk.parent_directory, specify the path to the parent folder where ff_cache will be. Restart the browser. By the way, for Firefox there is another tweak, which simultaneously with the above-listed joys also speeds up the speed of the browser. You need to go to Tools-> Options-> Privacy and disable 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 visit at once in several SQLite tables. According to information from the eeePC owners forum, disabling these options speeds up the Internet fermentation process.

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

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

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

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

10. Use a utility from Microsoft called dskcache. Learn 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 email 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 a swap, periodically transferring the file to a new place on the disk.

13. Actual only for Vista - in Windows Vista / Windows 7 defragmentation is enabled by default (from my experience - even when installed on an SSD). In principle, SSD drives can not be defragmented at all (since the speed of reading from different parts of the disk is the same). However, it is not so simple. Some controllers purposely fragment files in order to distribute the load to all cells, some do not, therefore it is difficult to give definite advice - it depends on the disc manufacturer and controller manufacturer. “On average in the hospital” 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 overwritten in one way or another by the file system (i.e. if you have, for example, 60 % of used volume - log files that are constantly updated). This makes it possible to avoid “overworking” in those cells that are constantly busy with changing files.

14. According to information from various sources (see the article on AnandTech, link below), the real defragmentation for SSD is low-level formatting. The formatting process returns all cells to their original state and allows achieving the same level of performance as on the new disk. Information is untested (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, but there are differences.

UPD: Additional Information:

on Anandtech (I immediately wanted to find this particular article, but managed to find it just now) - analysis of SSD technology, analysis of OCZ drives and comparison with the Intel X-25 series, including why SSD is so unusual (compared to regular drives ) behaves. All in details and details, including features of 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 gladly translate it into Russian.

From the comments: May post in the Windows 7 developers blog (there is a small piece of utilities about SSD, but at the moment not true for 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 a serious dispute over the transfer of the swap-file in RAMdisk. You can look here for an opinion from Microsoft Support Engineer (not much, but still). As an option - from my personal experiments, it was clear that subjectively (i.e., I did not make accurate measurements), the productivity increased markedly . That is, it felt like the computer started running much faster and rustled the disc much less frequently.

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

Source: https://habr.com/ru/post/64773/


All Articles