Chapter 11: Speeding Up Windows Explorer


Now that you have optimized the boot startup and your logon, let's speed up the most used application in Windows Vista: Explorer. Windows Explorer is responsible for almost the entire GUI that you normally interact with in Windows Vista. The Start menu, taskbar, and file exploring windows are all part of the Explorer shell. As you can see, Explorer is a very expansive application that is a major part of the operating system.

This chapter shows you how you can use some cool hacks to increase the performance of Explorer. First, you will improve the speed of browsing and accessing files on your computer. Then you will go over how to adjust the visual effects of Windows Vista so that it performs better on your computer hardware and finish off with tweaking Windows Search for optimal performance.

Speeding Up File Browsing and Access

Browsing through lists of files and reading and writing files are the most basic operations that your computer performs. All the other operations that your computer performs build off of these common tasks. If you are launching an application or playing a game, no matter what you are doing, it all breaks down to the simple process of reading a file from a device at some point. Windows Explorer is no exception. The speed of Windows Explorer is greatly influenced by the performance of these basic operations. Therefore, the performance of Windows Explorer, as well as all other applications, can be improved by optimizing these basic operations.

How can you speed up these basic operations? All these basic operations have to do with interactions with your file system. Using various tweaks to the file system settings and using performance utilities, you can improve the performance of your file system, resulting in an increase in performance of the basic file operations.

Before you go any further, be aware that the following speed tips for the file system will work only for the NTFS file system. If you do not know what file system your computer is using, you can go to Computer in the Start menu, right-click your hard drive, and select Properties. This will bring up the Local Disk (C:) Properties window, which will tell you the type of file system your hard drive is running. If your hard drive is running FAT32, these tips will not work for you.

In my opinion, NTFS is the best file system for Windows Vista. It has many advanced security features and also performs better on many machines. If you are still running FAT32, or for some odd reason your computer came preinstalled with FAT32, consider converting your hard disk to NTFS.

Tip 

Converting your drive to NTFS is a snap. Click the Start button, type Command Prompt in the Search box, and then press Enter. Then, right-click on the Command Prompt shortcut that shows up at the top of the Start menu and select Run as Administrator. Command Prompt will now load with the administrator access that is needed to run the convert tool. Next, at a prompt, type convert c: /fs:ntfs and press Enter to start. If you want to convert a different drive letter, just replace the c: with the drive letter that you want. For example, if you want to convert your D drive, then you will have to type convert d: /fs:ntfs. The actual conversion process will take a little while, especially on large drives. Keep in mind that once you convert to NTFS, you cannot convert back to FAT32.

Now that the requirements are cleared up, you are ready to get started.

Disabling legacy filename creation

Legacy filename creation is a feature of the NTFS file system that is included in Windows for backwards compatibility with older applications. Over the years, the file system in Windows has changed dramatically. One of the first things that changed was the limitation of the old MS-DOS 8.3 file naming standard. The old MS-DOS file system limited filenames to a maximum length of 8 characters plus a 3-character extension. As Windows became more advanced, this needed to be changed to allow for greater flexibility. Eventually, this limitation was expanded with the release of Windows 95, which bumped up the maximum filename limit to 255 characters. However, there was a hidden price to pay that affects Windows Vista, too.

Microsoft has always believed that backwards compatibility contributes to the success of Windows because it enables users to easily upgrade to a new version and their older applications will still work. However, that mentality often results in performance reductions caused by code that had to be tweaked to allow for new functionality while preserving existing functionality. The legacy filename creation is a perfect example of this scenario. In order for Windows Vista to be able to support older Windows applications, the NTFS file system has to support both the old MS-DOS file naming standard as well as the new updated standard that allows for longer filenames. How do they do it? It's rather simple. When a file is created, the file system creates two names for it: one name in the MS-DOS 8.3 standard and another in the latest filename standard.

Creating two filenames for every file is not the kind of buy-one-get-one-free situation that is good. Creating the second filename takes more time and slows down the performance of the file system. Although this legacy feature has good intentions, it causes the performance of file creation to decrease by 200 percent. Disabling this legacy feature will help you get that lost performance back.

Disabling legacy filename creation will kill any application you have that needs the 8.3 filename standard. If you try to run an application that requires 8.3 filenames, you will get various error messages. Even though this technology is more than 15 years old, there are some major software developers, mentioned in the following paragraphs, that still write code that requires the ancient 8.3 standard. Unfortunately, in the software world, some companies don't bother fixing things if they are not broken to simply increase the performance of the user's computer. For the most part, they do not have to worry about it because Microsoft supports the lazy programmers by leaving these old, inefficient features in the operating system.

Even though some applications will fail when this feature is disabled, I highly recommend trying to disable this on your computer. In the worst case scenario, you would have to turn the feature back on again. However, you will discover that almost all your programs will work just fine. For those that don't, try to download a new version from the company's Web site, or perhaps use this as an excuse to buy a version of the product from this century.

One type of program that has the most problems when the 8.3 standard is disabled is the installer application that many software developers use to get their programs up and running on your computer. For some reason, a few installers are still programmed using the old 16-bit technology that depends on the short filename compatibility feature to function.

Users frequently run into this error with Symantec's AntiVirus software. According to Symantec, users may receive a 1639. Invalid command line argument error when they install certain versions of Symantec's software. For users of Symantec software who want to disable the old support for greater performance, the company recommends that they enable the 8.3-standard filename compatibility support when the software is being installed and then disable it after the software is installed. The software should then work fine.

That basic Symantec approach can be applied to any situations that you may run into when applications are being installed and errors received. Just enable the 8.3-standard filename compatibility support during the install, and then disable it after the install is complete.

Now that you are aware of the possible problems that can be caused by disabling the legacy filename standard, and also know what to do if you experience any, you are ready to try to disable the feature. Follow these steps:

  1. Click the Start button, type Command Prompt in the Search box, and then press Enter.

  2. Command Prompt appears at the top of the list in your Start menu. Right-click the shortcut and select Run as Administrator, as shown in Figure 11-1.

    image from book
    Figure 11-1: Running Command Prompt as administrator

  3. After Command Prompt has loaded in the Administrator context, you will be able to access the NTFS configuration utility. At the prompt, type fsutil behavior set disable8dot3 1, as shown in Figure 11-2.

    image from book
    Figure 11-2: Disabling legacy filename creation with the file system utility

  4. Close Command Prompt and restart your computer for the change to be activated.

Enabling the legacy filename feature is also very easy. Just repeat the preceding instructions and run fsutil behavior set disable8dot3 0 instead and restart.

Disabling the file access timestamp

Every time you or an application accesses a file on your computer, the file system records the date and time the file was accessed and stores the timestamp in two locations. Simply accessing a file requires the system to write to the master file table (MFT) and the directory the file is located in, which results in two writes for every file read. Windows Explorer is one of the most read intensive applications on your computer. Nothing requires more reads to your file system than browsing through your files. In Windows Vista, Explorer has a number of new file previews that require even more file reads. All these file reads add up to extra timestamp writes, resulting in slower performance.

The Microsoft NTFS file system engineers were smart enough to realize that all this timestamp logging can get out of control very quickly, resulting in an even greater performance slowdown. Applications usually open only a small chunk of a file at a time and then repeat the small chunk reads until the entire file is open. This can generate hundreds and maybe even thousands of file reads, depending on the file size and application. As you can imagine, that many file reads in a short amount of time can put a lot of extra work on the file system. To handle this problem, Microsoft designed NTFS to update only the last access timestamp about every hour, which breaks down to just one two-step timestamp update, for each file per hour. This solves the preceding problem but it still has to do two writes for every file; it just limits the need to update the same file over and over again.

Disabling the file access timestamp is a great way to speed up Windows Explorer, but it is not without any side effects. Often backup applications utilize the file access timestamp to determine which files to back up when performing a sequential backup operation (a backup operation that copies only the files that have newer timestamps since the last backup date). Check with your backup application's Web site to find out if it will be affected. If it is, consider doing full backups instead of sequential backups. Full backups are not affected by the lack of a last access timestamp.

The process for disabling the file access timestamp is very similar to disabling MS-DOS filename support. Just follow these steps:

  1. Click the Start button, type Command Prompt in the Search box, and then press Enter.

  2. Command Prompt appears at the top of the list in your Start menu. Right-click the shortcut and select Run as Administrator.

  3. After Command Prompt has loaded in the Administrator context, you will be able to access the NTFS configuration utility. At the prompt, type fsutil behavior set disablelastaccess 1.

  4. Close Command Prompt and restart your computer for the change to take effect.

If you run into any problems with this change in your backup application or any other applications, you can easily undo the tweak. Just type fsutil behavior set disablelastaccess 0 at the command prompt instead.

Adjusting NTFS memory allocation

The NTFS file system likes to cache files that are open in physical memory for the fastest possible access to the raw data. This is accomplished by first reading the data from the hard drive and transferring it to physical memory. Depending on the amount of RAM in your computer, portions of the open files may be paged to disk in the paging file because the entire file cannot fit in the available physical memory. This results in slower overall performance because in order for an application to read the entire file, existing data in the physical memory cache has to be paged back to the hard disk to make room and then other unread portions have to be pulled back from the hard drive into physical memory. This carefully orchestrated memory swap requires a lot of CPU, memory, and hard drive processing time. Whenever memory paging occurs, it slows down the overall performance of your computer.

If you use your computer for anything that requires fast reads of hundreds of files, such as indexing your MP3 collection, you might notice that it takes your computer a while to read these files. This is because the file system has only a certain amount of physical and paging file space allocated to it, which results in increased paging activity. Depending on the amount of physical memory in your computer, you might be able to get away with increasing the memory allocated to the NTFS file system on your computer. This will increase the performance of high disk read operations.

Before you get started, you need to analyze the available physical system pool memory on your hardware. Increasing the NTFS memory allocation on a machine without enough of the right type of free memory will result in a decrease in overall system performance because other system components have to use less memory, which can increase paging.

Follow these steps to determine if you can increase the memory allocation:

  1. Click the Start button, type perfmon in the Search box, and then press Enter.

  2. When the Reliability and Performance Monitor loads, click Performance Monitor under Monitoring Tools.

  3. Press Ctrl+I to add performance counters.

  4. Navigate to the Memory section and expand it.

  5. Locate and select Cache Bytes Peak and press Add.

  6. Locate and select System Cache Resident Bytes and press Add.

  7. Press OK when both counters are added.

  8. Switch to the Report View by pressing Ctrl+G until you see the performance counters listed, as shown in Figure 11-3.

    image from book
    Figure 11-3: System pool memory performance counters

  9. Note the values of all three counters on a sheet of paper so that you can reference them even after a reboot.

Now you need to analyze the counters you just gathered. Cache Bytes Peak shows the maximum amount of physical system pool non-page memory in use since your computer was last rebooted. This number is very important because the memory manager in Windows Vista limits you to 256MB (268,435,456 bytes) of physical system pool non-page memory regardless of the amount of RAM in your computer. If your Cache Bytes Peak value is within 20MB of the 256MB limitation, this is a big red flag to not attempt this hack. In that scenario, you might slow down your computer even more by implementing this hack.

Next, let's take a look at your total System Cache Resident Bytes. This is the current size of the file system cache in physical system pool non-page memory. When you implement this hack, this value can increase by up to 50 percent. Take 50 percent of the System Cache Resident Bytes value and add it to the Cache Bytes Peak value. Make sure that it is below the 256MB limit.

If your results of the two tests above are on the borderline for passing, I would still implement this hack. It is easy to undo this setting and it will not harm any of your hardware or have a permanent effect on the performance of your computer.

Follow these steps to increase the memory available to the file system:

  1. Click the Start button, type Command Prompt in the Search box, and then press Enter.

  2. Command Prompt appears at the top of the list in your Start menu. Right-click the shortcut and select Run as Administrator.

  3. After Command Prompt has loaded in the Administrator context, you will be able to access the NTFS configuration utility. At the prompt, type fsutil behavior set memoryusage 2.

  4. Close Command Prompt and restart your computer for the change to be active.

After your computer has restarted and you load up your usual applications, check to make sure that your Cache Bytes Peak value in Perfmon is still well under 256MB. Also find the difference between your new System Cache Resident Bytes value and the value before the change. Add that to the old Cache Bytes Peak value you wrote down earlier to ensure that the sum is also less than 256MB. If it is greater, you might be stealing memory from other system components, resulting in an overall slowdown in performance.

If you notice any decrease in performance or have bad results from the preceding test, undoing the change is very simple. Just type fsutil behavior set memoryusage 1 at the prompt instead and reboot.




Hacking Windows Vista
Hacking Windows Vista: ExtremeTech
ISBN: 0470046872
EAN: 2147483647
Year: 2007
Pages: 105
Authors: Steve Sinchak

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net