Skip to main content

CPU throttling

Sometime we come across situation where we need to throttle or degrade CPU performance.
Suppose there is a situation you deploy your application in low performance system but development is done on high performance system
To simulate lower performance system you need to do CPU throttling. 

Here I am discussing how we can do this using Windows 11 OS. Similar feature should be available in Linux or other operating systems as well. 

Assuming we are using Windows 11 OS as super user, open Performance Monitor application tool. In Windows you can open this by invoking perfmon.exe /res from search or run option. Using this tool open CPU performance monitor to monitor current CPU(s). In the GUI there are two panes. From left pane, tree view choose Performance -> Monitoring Tools -> Performance Monitor view. 
In the right pane, you should see two sub-view one graph view on the top and one selected counters view on the bottom. Right click on the the bottom view and choose Add Counters. 
In the pop up window choose Computer and Counters (Processor Information in our example) and target processor instances (you may choose All instances of processor or a specific instance). Right side of the pop up Window the selected counter are shown. An illustration is shown below.
Now press OK to complete the Counter and Computer selection. 

In the Performance Monitor view now you should see the values of the selected counters and the current counter values in Time (X-axis) vs Counter value (Y-axis) graph. There are quite a few Processor Performance related counter. We can choose only Processor Frequency of one of CPU instance to have a simple and easy to understand graph view. An illustration added.
Now we will perform CPU throttling using power option and see the impact via the graph view. Open Control Panel > Hardware and Sound > Power Options. Click on the advanced power settings. An illustration added.
Now in the advanced power settings window, choose processor power management. Choose maximum and minimum power state. Note down your current settings before modifying the values. An illustration added.
Now change maximum processor state and apply and check in the Performance Monitor Window, the CPU the %Maximum of Frequency values getting reflected. 

You can write simple script to do some computation and run the application with before and and after changing maximum processor state and to see the impact. 

When done, revert your settings using noted down values.

Comments

Popular posts from this blog

Changing the system from within the system.

Do we need an emergency situation to awake? Yes we do need one most of the time. We only get awake when a Parliament attack, Mumbai attack, Samjhouta express attack, Mumbai local Train attack etc do occur. The problem is not that we get awake when the crisis occurs. But the problem is we fall back to sleep when the crisis is over . Let’s stop doing falling back to sleep. Whenever a crisis occurs the first thing we think is that we need change the system. We essentially first point our finger to the corrupt politics system, intelligence system, police system etc. The more we can name the more points we score as if we are in a mission only to find who the culprits are. I have a problem with this notion of only fault finding and essentially taking no action based on the finding. Who comprises the system? None but us. The collective individuals comprise the system. It’s we who give birth to a corrupted system and continue to feed the system with corruption in everyday. How? Let m

An encounter with destiny - beyond patterned life

An encounter with destiny It was Friday evening 27th Nov 2009. Next day is Eid. People were in mood for returning home for weekend as well as for Eid festival. I was one of the people intending to rejoin my family on Eid occasion. I reached Sealdah around 5.45 pm.Sealdah rail station complex was not as crowded as I expected. I was walking lazily along with my friend Bashir to catch Bhagirathi Express scheduled for 6.25 pm departure. We still had more than half an hour in our hand. Suddenly few people rushed from behind and from right side and somehow I get pushed down to ground. Usually I can take reflex action whenever I fall or about to fall. But this time it was so sharp that I could not take any action. I even fall unconscious for few moment. Bashir and People around helped me to recover from ground. When I again got my crutches in place and ready to move forward I felt acute pain in my right leg. I thought of waiting few moments before proceeding again. But the pain was showing