CPU Stressing
To bypass the idle compute identification bu oracle we need to have the CPU, Memory and Network cross a certain level of utilization (as of writing this document it was 20%). One of the way to achieve this is using a stress-ng ands supervisor to control its operation.
Install stress-ng and supervisor
The command below will put 15% load on each of the 4 CPUs available, we can tweak the numbers below as we wish to meet our requirements.
Now this command will only work till the command prompt is functional, to make it work consinuously and even after reboots we need to use supervisor
First we need to create a config file for supervisor
Copy and paste the following config to your “stress.conf” this is just and example make sure to tweak it to meet your requirements. The config below will create two programs “cpu_stress” and “memory_stress” the two programs will run the two “strass-ng” commands we ran above simultaneously, it will auto start them on boot and auto-restart them if they get crash or get killed.
First Start the supervisor services using below command
To get supervisor to start the two program we have we first need to reload the configuration file we do that by running the following command. Run the command below anytime you make changes to this config file or create new file!
Next we can go ahead and reload the “supervisorctl” to start the two programs.
You can check the status of the programs by running
You can stop a specific program by executing
This program will restart on a reboot so you need to edit to config file and disable autostart=true
Last updated