windows 7 tweaks for better performance and security

Discussion in 'Windows 7' started by pierrejaquet, Jun 17, 2011.

  1. pierrejaquet

    pierrejaquet MDL Member

    Jan 14, 2010
    124
    31
    10
    #1 pierrejaquet, Jun 17, 2011
    Last edited: Jun 18, 2011
  2. burfadel

    burfadel MDL EXE>MSP/CAB

    Aug 19, 2009
    2,628
    3,839
    90
    #3 burfadel, Jun 17, 2011
    Last edited: Jun 17, 2011
    I would suggest using no antivirus on a closed system only. A system where you have external input from USB drives used in other computers, LAN connection, internet access etc all should have a decent antivirus. It only takes one infection! The is a good analogue to this, but it is offensive to some so I won't use it!

    Now to tweaks:
    Access command prompt in administrator mode and type:
    fsutil behavior set memoryusage 2

    It increases NTFS caching size, kind of like increasing the name and directory cache in the old days!

    A topic which will always get arguments for and against is the pagefile. Leaving it alone is not always the best solution, as it is not a static file. I don't just simply mean its size expands when needed and shrinks back, the file itself is deleted and recreated. This can lead to serious fragmentation especially with those who run a low freespace (less than 15GB) system drive. Even this isn't a good example because of freespace fragmentation (you have random datablocks over the place due to not defragmenting).

    Setting a permanent pagefile size is really only beneficial when the pagefile would otherwise expand beyond the default size, Having a fixed size though means that it cannot expand any further.

    Regardless of any comments on this following suggestion, it is best to place the pagefile on an alternative drive. This drive should NOT be a USB based drive, and if your main system drive is an SSD then leave it where it is.

    Talking about pagefile and SSD, all those writes aren't the best to an SSD so having a good amount of system RAM is advantageous. Absolute bare minimum for SSD is realistically 6gb, of course you can run them with 1gb if you wanted to but you greatly increase the pagefile write stress on the drive.

    One idea that does work, but receives an extreme amount of criticism is the concept of a pagefile partition, regardless of whether you have it on you main drive or a secondary drive. This pagefile partition should be at the beginning of the drive (we're talking normal mechanical drives here, not SSD), and be around 8gb. Yes, its wasted space but its only 8gb. People usually have a lot more space wasted on their drives with temporary files, old restore points, bloated outdated usn journal info etc. The pagefile can then be set to be controlled by Windows without the worry that it will get fragmented.

    There are a few key points with this logic. The drive should not be formatted in NTFS, nor FAT. NTFS is great for data integrity but lacks in space utilisation and performance. FAT would limit file size to 4GB which is pointless. The drive should either be FAT32, or exFAT. I haven't tried exFAT for this purpose, but it is faster than FAT32 (which is faster than NTFS) so it could be beneficial. The drive needs to be formatted from the command prompt, Windows won't show exFAT as an option. The key trick is to not have the standard allocation size set for this drive. The purpose behind 4KB is so you don't have massive amounts of wasted space as even if a file is one byte it uses the whole allocation unit. Also, if a file has data that doesn't fill a complete allocation unit at its end, then a whole unit is used anyway. This adds up over tens of thousands of files!

    Since the pagefile partition is purely for the purpose of the pagefile, one huge file! and thats all that is on there, a larger allocation unit size is beneficial. exFAT allows up to a whopping 32MB allocation unit size! vs the 'standard' 4kb, but thats probably excessive. A 4MB allocation unit size would be fine :) Thats still a 1000 times less referenced allocation units!.

    Results:
    - On a perfectly clean fully defragmented and boot defragmented system, a little but maybe not discernible
    - On a system where fragmentation starts to occur, a little difference depending on pagefile fragmentation
    - On a drive with lower amounts of disk space and not defragmented all the time, it does actually noticeably show (turn it off on the pagefile drive and set it normally on the system drive you can tell!)
    - One thing is for certain, you won't have slowdowns caused by pagefile management
    - Pagefile is always at its peak!

    The pagefile at the beginning of the drive means it has the fastest read/write, as this is where mechanical drives are their fastest. Their is some fair disagreement to this, in that the pagefile should be in the middle of the system drive, but having it in the middle also causes the most issues with fragmentation etc.

    The pagefile partition can actually be on the system drive. What not to do is have multiple pagefiles set across partitions on the same drive.

    If people use the argument to leave it as the Windows default, then they should do the same with every other tweak imagineable. Afterall, you can't claim Windows knows best for one thing then say but this, but that, disable this service, disable that service. All the default services and settings is akin to leaving the pagefile settings alone. It is the best cross system consistency solution, not the best solution in terms of system tweakiness!
     
  3. burfadel

    burfadel MDL EXE>MSP/CAB

    Aug 19, 2009
    2,628
    3,839
    90
    A little, I think it depends on the situation.

    The issue relating to peformance is to do with the pagedpoolsize (apparently?). If you set pagedpoolsize and systempages to ffffffff (thats 8 f's) under Memory Management (the parent key to where you set superfetch to 2), Windows sets the largest maximum value for these settings (which isn't excessive either). Of course there is no documentation on these, but Windows 8 most likely (this is purely an assumption) uses larger default valuess for these settings, and the default usage of the memoryusage function.
     
  4. Weedy

    Weedy MDL Member

    Mar 9, 2011
    205
    69
    10
    I've put this hosts file (600Kb ish) on loads of computers and I have never noticed a performance impact. Infact, quite the opposite. Because the web pages aren't loading Ads and other crap, websites load faster. I think some thorough testing is in order... anyone fancy a go?
     
  5. bogol

    bogol MDL Novice

    Dec 30, 2009
    11
    2
    0
    I just found this on softpedia:
    Optimize Windows 7 SP1 Poor Boot and Shutdown Performance
    ht*p://news.softpedia.com/news/Optimize-Windows-7-SP1-Poor-Boot-and-Shutdown-Performance-206496.shtml
    article which links to h*tp://msdn.microsoft.com/en-us/windows/hardware/gg463386