Monday, April 19, 2021

ksmtuned Is Using High CPU on Oracle Linux 8

 On a server running Oracle Linux 8 I noticed process ksmtuned is using 100% CPU


What is ksmtuned for?

ksmtuned is part of Kernel same-page Merging (KSM) service, it's a Linux feature used by KVM hypervisor, it examines the memory allocated by the running programs, if it finds identical memory pages it will merge them in a single memory page, the thing will reduce the used memory pages and hence the overall memory utilization on the system.
This service will only come to the picture utilizing high CPU when the free memory in the system become limited. As you can see in the above snapshot, free memory is 1.5 GB and Swap space started to be used.
In a nutshell; This service help reduce memory utilization on KVM machine when memory become under pressure.

When to stop ksmtuned & KSM service:

- If the impacted machine is not a KVM hypervisor (which means it's not running guest virtual machines).
- If the impacted machine is a KVM hypervisor running guest VMs, but you think that memory is sufficient, and want to release CPU resources used by KSM.

How to stop KSM service:

Because my machine is not a Hypervisor host, where it's not running any guest VMs, this service has no benefit to the memory utilization and hence I've stopped it to release CPU resources using the following commands:

# systemctl stop ksmtuned
# systemctl stop ksm

In addition, I've disabled KSM services to avoid getting it loaded after system reboot:

# systemctl disable ksmtuned
# systemctl disable ksm


Kernel Same-page Merging (KSM)

Monday, April 12, 2021

DBA BUNDLE 6.3 Is Now Available

 The April's version of DBA Bundle is now available for download:

Once you open the link, click on the Down Arrow at the right top side:

Minor bugs fixed on other scripts.

In case you are new to the DBA Bundle, please visit this link to learn more about its cool features:

Tuesday, April 6, 2021

Major Update to Database Health Check Report Script

 New features was added to the Health Check script including:

- Display the in-active (dormant) DB accounts in the report:

By default, it will show the accounts that don't have any login attempts for more than 45 days, but you still can tweak it in the script under the Thresholds section:


- Audit related data will be shown in the report by default:

Certainly this will increase the script execution time especially if you have a big sys.aud$ table, you still can control this behavior by enabling or disabling audit record settings in the script:



Please note that audit record setting enables/disables the extraction of the following audit data:

- Failed Login Attempts in the last 24Hours.
- Audit records in the last 24Hours.
- Fine Grained Auditing Data.
- Dormant accounts.

You can download the script from this link:

Here you can find the original post which explains the script in details: