Viewing your current resource usage
top: your current server load & resource usage.
ps aux: all your processes & which ones are using the most memory/cpu
free -m: allocated memory, usage & free memory
Cpanel Tweak Settings
In WHM under Server Configuration > Tweak Settings:
- Make sure default catch-all mail address is set to FAIL, this will use the least CPU time.
- Untick Mailman, this is a resource hog.
- Change the number of minutes between mail server queues to 180
- Uncheck Analog Stats, I also usually uncheck Webalizer.
- Make sure you tick delete each domains access logs after run, otherwise you’ll start using heaps of Disk Space.
Mysql Optimisation
You can edit your mysql configuration (/etc/my.cnf) by typing vi /etc/my.cnf
In order to add something in vi you need to hit insert, once completed hit esc then :wq to save & quit. If you want to save without quitting type :q!
There’s a few important variables that we’re going to tweak:
- max_connections
- wait_timeout
- thread_cache_size
- table_cache
- key_buffer_size
- query_cache_size
- tmp_table_size