Home

Published

- 3 min read

Maximum Memory by Windows Services Configuration (BlackViper Settings)

img of Maximum Memory by Windows Services Configuration (BlackViper Settings)

There are a lot of tips and tricks on how to optimize your system memory. One of the main ways to get the most out of your system is to configure the “Windows Services”, essentially tasks and programs that windows start and stops in the background. These services are needed by other programs, changing this configuration can result in that some programs cannot start or behave in a strange manner. If you mess around with the services, you could disable your access to the internet and its a pain to figure out which service you accidentally stopped that should have been running. There are only two situations in which you should configure the services

  1. You are desperate and want to optimize a very old pc without having to buy new ram
  2. You are a gamer and want the speediest most lightweight computer

Service Configurations

Fortunately, smart people have already played around with various configurations. BlackViper provides on his website a list of “tweaked”, “safe” and “default” settings. However, the table on his website is interesting, but not very useful. If you would want to apply these settings you would have to open up “services.msc” and apply each setting manually.

Thankfully I found a way to convert the table into a powershell script.

  1. Head over to his site  http://www.blackviper.com/service-configurations/
  2. Go to your Version of Windows
  3. Use the websites Copy function and save the tap separated table into a text file
  4. Execute following python code in the same folder
######################################################################################
# Black Viper Table to Script Converter
#
# 1. Go to http://www.blackviper.com/service-configurations/ and select Configuration
# 2. Copy and paste Table into textfile "configuration.txt"
# 3. execute script in same folder
#
######################################################################################


filename = "configuration.txt"
with open(filename) as f:
  lis = [x.split("\t") for x in f]

info = [line for line in zip(*lis)]

for line in info[2:]:
    fileOutName = "%s - %s.ps1" % (filename.split(".")[0], line[0].replace("\n", ""))
    scriptOut = open(fileOutName, "w")
    for regEntry, mode in zip(info[1][1:], line[1:]):
        if mode.startswith("Manual"):
            mode = "Manual"
        if mode.startswith("Not Installed"):
            continue
        if mode.startswith("Automatic"):
            mode = "Automatic"
        if mode.startswith("Disabled"):
            mode = "Disabled"
        if mode.startswith("Uninstalled"):
            continue

        out = 'Set-Service "%s" -StartupType %s \n' % (regEntry, mode)
        scriptOut.write(out)
    scriptOut.close()

Alternatively, you can download the resulting Powershell Scripts for Windows7SP1:  Win7SP1 - BlackViperPowerShell Note: During the execution of the script errors appear for services that are not installed on your system - just ignore them.

Results

To consistently measure the memory usage I did a clean install of Win 7SP1 on a VirtualBox.

  • Default 39 Processes using  600MB Ram
  • “Safe Configuration”:  29 Processes using 500MB.

While the safe configuration ‘saves’ you 100MB of Memory. The amount of effort of testing if all your programs are still running correctly etc. Does not make a lot of sense - especially when typically you anyway have 8GB+ RAM in Computers these days.

Image: