RHEL8 - ksmtuned using 100% cpu

Latest response

Bare metal Test system based on RHEL 8.1
After running for months with "zero cpu"
ksmtuned is suddenly using 100% cpu, 2020-07-10

Note that there are two processes running, and only one of them is using high CPU.
After restart of ksmtuned, the CPU has returned to normal
There were some reports about this back in RHEL 6, but I can't find anything for Jul 2020.
There's a config file '/etc/ksmtuned.conf' where you can enable logging, but this (by default) is all commented out.
I have not tested RHEL 8.2 yet

 PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND         
 6688 root      20   0  235932   2972   1588 R  99.7   0.0  23507:15 ksmtuned        

systemctl status ksmtuned.service 
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; enabled; vendor preset:>
   Active: active (running) since Tue 2020-03-24 11:03:38 GMT; 3 months 16 days ago
  Process: 1832 ExecStart=/usr/sbin/ksmtuned (code=exited, status=0/SUCCESS)
 Main PID: 1852 (ksmtuned)
    Tasks: 3 (limit: 26213)
   Memory: 9.2M
   CGroup: /system.slice/ksmtuned.service
           ├─1852 /bin/bash /usr/sbin/ksmtuned
           └─6688 /bin/bash /usr/sbin/ksmtuned

Responses

hello,

I suggest changing the niceness of the job. The niceness of a job determines how much priority it is given. You can give it anything from -20 to 19 with -20 being top priority. As a regular user, you can only increase your niceness, giving your task a lower priority.

To do so, you should go to you terminal and type "top". That will open an interactive shell with a list of processes. From there, find your process (It will most likely be at the top) and it's PID (at the beginning of the row). type "r" and after that type the PID of that process and when it prompt's you for the renice value, enter 15.

It is best to gradually change the niceness value. Also another tip is to never set the niceness value to -20, that would potentially crash your computer.

If this doesn't make any difference, that means that there are no other processes on your computer that require more CPU. Also if there are other processes that need CPU but it still isn't changing, kill the process.

To kill the process, type "k" from the top environment and give the PID. After that, type "15" and enter. If you get an "operation not permitted " error, do this as root.

I hope that helped!