On my Ubuntu 16.04, I am running a program that is relatively expensive in terms of CPU usage. It takes quite much time to finish, and other tasks (like browsing the web) get slower as a consequence. I was looking for a way to improve the computing power, if possible and at the same time to know better what is happening in my laptop.
By this, I found that, if I ask top
, the program I am running shows a CPU usage of 100%, while when I open the System monitor
the CPU usage is only at ~25% in the Processes
tab. In addition, the Resources
tab in System monitor shows 4 CPUs, whose usage changes from ~5 to ~100% for each one:
The outcome of lscpu
is:
@C:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 142
Model name: Intel(R) Core(TM) i5-7200U CPU @2.50GHz
Stepping: 9
CPU MHz: 3099.937
CPU max MHz: 3100,0000
CPU min MHz: 400,0000
BogoMIPS: 5423.81
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
Is there anything I can do to improve the situation, such as dilute the work among the 4 CPUs? Usinge nice
does not seem a solution to my situation.
I know this may be a general question that depends on the type of program I am running (let's say it is a Python
script), but I am trying here to get general knowledge.