Wednesday, March 3, 2010

Windows background disk writing, Part I

When running Windows with a slower SSD with poor small write access, some things can be cleared up with what I consider a small sacrifice in functionality:

lastalive0.dat
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability
  TimeStampInterval DWORD 0 

Random Explorer Writes
        gpedit.msc
        User Configuration->Administrative Templates->Windows Components->
                Windows Explorer
        - Maximum Number of Recent Documents , Enabled =  0
        - Turn off the caching of thumbnails in hidden thumbs.db files - Enable
        - Turn off caching of thumbnail pictures - Enabled
        - Turn off display of recent search entries in the Windows Explorer
        - Do not track shell shortcuts during roaming


        User Configuration->Administrative Templates->Start Menu and TaskBar
                Turn off User Tracking
                Do not keep history of recently opened documents
                Do not display or track items in jump lists

User Assist
     Disabled in GUI now

IconCache 
     Users\<name>\AppData\Local\iconcache.db
     can be deleted and turned into a directory.  Explorer will not recreate it.


ThumbCache
     Users\<Name>\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db (and others)
     Even with the above policy setting, these are ALWAYS created.   With the policy set, they don't appear to be written to.  thumbcache_256.db seems to always end up being 1MB, the rest are much more reasonable.

One unavoidable nuisance is the WMI/WBEM component -- it will write, and rewrite, data fairly regularly.  It can be mitigated with a ramdisk - although it will make for a slightly slower startup as it recreates certain tables. 

However, I can't find any way of disabling some other explorer tracking features...
1. MUICACHE 
    Despite playing with StringCacheSettings, it  is still actively updated.  The extra SSD writes are worth it to record my viewing history.
2. BagMRU 
    This also stores folder view settings, so its not a complete waste, however it hurts the responsiveness of internet explorer. 

Tuesday, February 2, 2010

Clearing PendingRenames in Windows 7 WinSXS

Running sfc /scannow on Windows7 has the unfortunate side effect of creating a number of entries in the PendingRenames directory.  These should be cleaned up by the TrustedInstaller scavenge process, but they aren't..

The answer is in Windows\Logs\CBS\cbs.log
  Store coherency cookie matches last scavenge cookie, skipping scavenge.

Eg, SFC creates entries but doesn't set the state necessary to clean up after itself. Sloppy.
To remove them, you need to "install" something small, that isn't installed by default:

  dism /online /enable-feature /featurename:TelnetClient

After the installation, TrustedInstaller will continue running waiting for 5-10 minutes to pass and for the machine to be "idle" and then start the scavenge routine. If "TrustedInstaller.exe" isn't running, it can be started with:     net start TrustedInstaller

After scavenge, all the entries under PendingRenames and PendingDeletes should be empty.