Quick Sign In:  

Forum: Old versions

Topic: Windows 7 optimization tips & script

This topic is old and might contain outdated or incorrect information.

Hey there,

Since I was being bothered with some performance issues with VDJ7 in Windows 7 and Windows 7 doesnt have hardware profiles i've made a script that allows me to switch from my regular configuration to the optimal configuration for Virtual DJ.

What is the optimal configuration?

- No aero theme (effects will vary per driver), two reasons:
-> Your graphic driver is overly productive, with the DPC Latency Checker I noticed that the biggest red spikes were due to aero
-> VDJ doesnt deal well with aero especially when using Video Full screen, actually... its unusable since it will crash hard on you

- Disable unneeded services:
-> Various background services take up CPU/RAM and disk io. If you dont need them during your gig, why keep them on
-> Best gain: Your security services. Presuming ofcourse you are not tapping into all sorts of dubious online sources while DJ-ing.

- Disable unneeded hardware devices:
-> Using the DPC Latency Checker (see forum sticky) you can see if your system is performing good enough for real time usage.
-< Some specific devices can cause unwanted peaks (graphic drivers, wireless drivers)
-> Others just add to the height of the average peek
-> Just make sure you stay in the green. I for example still want to use my wireless, which is ok as long as you lower the average peek to keep being in the green.

- Your power profile:
-> All this powersaving is great, but not when you actually NEED it all. Only good profile is "High performance"

So where is that script??

Here it is, my version, we'll go through it to make it yours.

HiPerf.cmd:

@echo off
cd "C:\Program Files\CmdUtils\"
IF "%PERFMODE%"=="" goto INIT
goto %PERFMODE%

:INIT
SET PERFMODE=PERF_OFF
echo Initialized

:PERF_OFF
echo Enabling performance modus

echo Disabling security
net stop MsMpSvc

echo Disabling devices
devcon disable "PCI\VEN_8086&DEV_1049&SUBSYS_30C3103C&REV_03"
devcon disable "tapoas"
devcon disable "HDAUDIO\FUNC_01&VEN_11D4&DEV_1981&SUBSYS_103C30C3&REV_1002"

echo Switching powerprofile high performance
powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

echo Basic theme back
rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Ease of Access Themes\basic.theme"

SET PERFMODE=PERF_ON
GOTO END

:PERF_ON
echo Disabling performance modus

echo Enabling security
net start MsMpSvc

echo Enabling devices
devcon enable "PCI\VEN_8086&DEV_1049&SUBSYS_30C3103C&REV_03"
devcon enable "tapoas"
devcon enable "HDAUDIO\FUNC_01&VEN_11D4&DEV_1981&SUBSYS_103C30C3&REV_1002"

echo Switching powerprofile back
powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e

echo Getting regular theme back
rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Users\jboerlage\AppData\Local\Microsoft\Windows\Themes\current.theme"

SET PERFMODE=PERF_OFF
GOTO END

:END
pause


Woow thats a lot of abracadabra, take me there.. with some patience

Step 1:
Create a directory "CmdUtils" in "C:\Program Files" and yes, you need to be administrator for that.

Step 2:
Download the following file from Microsoft: http://download.microsoft.com/download/1/1/f/11f7dd10-272d-4cd2-896f-9ce67f3e0240/devcon.exe

This executable will unpack itself. For 32bit users, copy I386\DevCon.exe to the just created directory. For 64 bit users, copy Ia64\DevCon.exe to the just created directory

Step 3:
Download the DPC Latency Checker from http://www.thesycon.de/eng/free_download.shtml and also put it in that directory

Step 4:
Open notepad (as administrator for you UAC users) copy paste my script in it and safe it as HiPerf.cmd

The script contains two parts, a part where it turns stuff off and a part where it turns stuff back on. The following steps will deal with filling those

Step 5, Edit the services:
Under echo Disabling security you put all the lines needed for disabling services in the following style
net stop [servicename] for example net stop MsMpSvc.
Consult your virusscanner resources to determine the name of the service.

Under echo Enabling security
you put all the lines needed for disabling services in the following style
net start [servicename] for example net start MsMpSvc.

So just put your lines there and remove mine

Step 6, Edit the devices:
Determine the devices you want to disable by using the methods described in the sticky on using the DPC Latency Checker in this forum. In general, just tweak and play until you are in the green. For each device that you want to disable use the following commands:

Under echo Disabling devices
devcon disable "[device hardwareid]" for example devcon disable "PCI\VEN_8086&DEV_1049&SUBSYS_30C3103C&REV_03".

Under echo Enabling devices
devcon enable "[device hardwareid]" for example devcon enable "PCI\VEN_8086&DEV_1049&SUBSYS_30C3103C&REV_03".

You can find the hardware ids by doing the following. select the device in the device manager, select 'properties', goto tab 'Details' and select property 'Hardware Ids'

So just put your lines there and remove mine

Step 7, Switch from your default schema to high perfomance:
First, open up a cmd window and type: powercfg -list <enter>. That gives you alist of all the power profiles and unique names.

So under echo Switching powerprofile high performance edit the line:
powercfg -setactive [your high performance unique name] for example: powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

And under echo Switching powerprofile back
powercfg -setactive [your regular power profile unique name] for example: powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e

Step 8, Edit your default display profile:
Save your display theme with the name 'current'

Edit the line under echo Getting regular theme back to reflect your saved theme for example:
rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Users\jboerlage\AppData\Local\Microsoft\Windows\Themes\current.theme"where the /file: part is the theme file..

Now.. you are done!

How to use it?

Open a cmd box as administrator (and keep it open during your session), browse to the directory (in the cmd box), and run the file... this will switch to your high performance settings. To switch back, just run it again.

Hope this helps someone!
 

Posted Sat 11 Dec 10 @ 3:11 am
any hope of a video on this buddy???
 

Posted Wed 06 Jul 11 @ 1:51 pm
Would that be more helpfull than the written word? What specifically would you like to see extra in a video?
 

Posted Wed 06 Jul 11 @ 2:22 pm
A video would be handy
 

Posted Wed 07 Sep 11 @ 11:40 pm
msalpenPRO InfinityMember since 2010
+1
 

Posted Thu 08 Sep 11 @ 2:48 pm
 

Posted Sun 11 Sep 11 @ 3:14 am
[youtube]P7awctTsK34&feature=player_embedded[/youtube]

Thnx
 

Posted Mon 12 Sep 11 @ 5:20 pm


(Old topics and forums are automatically closed)