1

I'm running Linux Mint on a Surface 3 with 4GB of RAM. If all the cores get over 90% utilization the device freezes and needs to be restarted. How can I set limits on the cores? I tried using nice and cgroups (with cpu.shares 800) and cpulimit (with -l 290), but some programs (e.g. Jetbrains IntelliJ) still hang and force a restart.

Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
AshkanAbd
  • 13
  • 5

1 Answers1

0

There are programs to manage that like cpulimit & or course it ca also be done with cgroups.

The advantage of control groups over cpulimit is that limits are applied to a set of processes. example :

sudo cgcreate -g cpu:/cpulimited
cgset -r cpu.shares=512 cpulimited

then use a controled command line over the program you use

sudo cgexec -g cpu:cpulimited /path/programthateatressourcesusually 

if it stille hangs like this & you have a multi code CPU you can try to force process to run on specified core with taskset that comes with linux-utils I think.

if there you have still issues with that program you may contact development team.

francois P
  • 1,219
  • 11
  • 27
  • why device freezes? – AshkanAbd Jan 08 '18 at 19:19
  • sorry but, only you can answer that, without exact knowledge of your setup & of the code you use (the one that freezes your device) Or you have to open a new topic with all detailed description of all that – francois P Jan 08 '18 at 19:56