With Virtualmin installed on your server, running fine and updated regularly it is time to optimise.
It is important to keep your system healthy and efficient it is a good practice to check from time to time what is going on with gauge and graph.
Plus your server run one or several different software (Tiki CMS, Wordpress, Laracast, Prestashop, etc) and you may also use different version of those applications that need different requirement to work. In time you will accumulate several version of PHP and find out that you don’t need some functionality you previously set.
Virtualmin staff made very easy to have a quick overview on what is going on with your server as you login.
Those panels are drag’n drop so you can rearrange them.
In this example we can see the virtual memory is 99% used, the server run 4 different PHP versions and a few mails services (this server is not used for mail).
Most of this comes from the "basic" installation and software that were auto-updated or added by me.
Back to our server, already we can work out some things by answering a few questions.
Do I need so many PHP version for the applications running on the servers.
In this case I use only Tiki website generator with 2 versions:
- Tiki 21 require PHP7.2.x
- Tiki 22 require PHP7.4.x
So as a first step I can turn off (clicking on the red ) the unused PHP servers and they will shutdown.
It will take a few second, just wait till the red line under the URL bar stop showing.
The service will stay down for THIS session only meaning that it will stay off until the server restart. So if you see that something is not working as expected you can just restart.
Once you check that everything you need work fine without those PHP servers running you can make the change more permanent so it doesn’t come back on each server restart.
On the top of your Virtualmin Admin menu, click on Webmin.
Click on the menu item "System", "Bootup and Shutdown" there you will find a list of the services you can activated during the server bootup.
I select and check the relevant checkboxes to shutdown the PHP Version I don’t need and scroll at the bottom of the list and click on the "Disable on boot" button.
As we can see there is also an option to shutdown now and disable on boot so you can do it all from here if you are sure of what you do
After the process complete you can go back to the screen you were and you can check that the services you disabled are disable: red "No" on the "Start at boot?" column.
While I’m here I see also some mail servers running.
In my case, not receiving or processing mail I can shutdown a part of the mail services but NOT ALL.
For my Tiki CMS I need to keep alive Postfix as it may be useful for sending email or system notifications.
In my case, I just don’t need to run Dovecot and SpamAssassin so using the same method I turn them off.
Once all done, check and re-check the graphics and statistics, your server should run smother. 😉