Disable MySQL and MariaDB binary logs
The MySQL and MariaDB server binary logs can become very large, consuming CPU power while also generating I/O for the hard drive, as each modification/removal request is registered in the log file. You can thus save a large amount of resources by disabling these logs.
Free up the memory of variables that are no longer needed
Free up the RAM as soon as possible. In particular, delete tables that quickly fill up with large amounts of information.