How to limit CPU usage when running nTop

Objective:

Sometimes, you want to use other applications while nTop updates a computationally intensive block or notebook. This article shows you how to use the Windows Task Manager and Affinity in Linux to limit the number of CPUs nTop can access so that the other applications run effectively.  

Applies to:

  • nTop
  • nTop Automate

Procedure:

Windows

1. Open nTop and then open the Windows Task Manager by typing "Task Manager" in the Windows search bar or using the right mouse button to click the Windows Task Bar and selecting Task Manager. 

2. Navigate to the "Details" tab on the Task Manager.

3. Find ntop.exe in the list of processes. If you want to limit the number of CPUs for the nTop Command Line, you want to find the ntopcl.exe process.  

4. Using the right mouse button, click on the process and select "Set affinity" 

5. In the Process Affinity window, all the virtual CPUs will be selected. Unselect a set of these CPUs for the other applications and click "OK" 

6. nTop will then safely release those CPUs. 

All_CPUs_Enabled.JPG 4_CPUs_Enabled.JPG

 

Linux

You can control the affinity with taskset (https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_for_real_time/7/html/reference_guide/chap-affinity#Using_the_task[…]essor_affinity

Below is the snippet from the above link:

The taskset command sets and checks affinity information for a given process. These tasks can also be achieved using the Tuna tool.

Use the taskset command with the -p or --pid option and the PID of the process to be checked. The -c or --cpu-list option displays the information as a numerical list of cores, instead of as a bitmask.

And that’s it! You’ve successfully limited the CPU usage when running nTop.

Are you still having issues? Contact the support team, and we’ll be happy to help!

More on this topic:

Keywords:

 cpu usage process limit running exe processes 
Was this article helpful?