Memory Optimization for ISPConfig 3

Discussion in 'General' started by onastvar, Aug 30, 2019.

  1. onastvar

    onastvar Member

    I have single The Perfect Server - Debian 9 (Stretch) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.1 installation on Upcloud's VM that has CPU: 4 cores & RAM: 8GB. I have about 30+ standard WordPress sites which are not high-traffic. Out of 7.8G RAM 7.8GB is used and 149MB free (see attached images).

    Is this normal?
    What would happen if I add more Wordpress sites?
    Are there any How-To guides anyone used to optimize memory on ISPConfig server?
     

    Attached Files:

  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    how big are the databases? what php are you using? are you using php-fpm? if so static, dynamic, or on demand?
    static and dynamic can use more ram, on demand will use the least, but can make loading a site take longer if it's not visited often.
    you have .5Gb+ taken by buffer/cache that would be free'd up if required by any other process.
    that's a lot of mysqld processes running, and using up ram, certainly more than I would expect to see if sites aren't really active.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, and that's the case for all Linux systems and not ISPConfig related. To achieve a good performance, many programs use RAM to speed up processing.

    See also: https://www.linuxatemyram.com/

    Not much, about the same amount of RAM will be used. At least for the next dozens of sites you add.

    As mentioned above, this is all not related to ISPConfig. You can even uninstall ISPConfig and the same amount of RAM will be used. If you want to see more 'free' memory, then you can change the config of services like mysql of course, this will heavily decrease the performance of your server, you will get very long load times, so this makes no sense to do it. But of course, you can take actions to slow down your system.
     
  4. onastvar

    onastvar Member

    DBs are not big just normal size. I use default PHP that's included with Debian 9, I'm not sure if this is static or dynamic.
     
  5. onastvar

    onastvar Member

    Thank you Till!
    I don't want to slow down anything.
    According to your answers, I think I'm good.
    Do you recommend any other configuration changes or i should leave as is?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Just ensure to use PHP mode which does not use much memory, I recommend using php-fom and use ondemand FPM mode (see options tab of the sites, there you can set which mode is used).
     
    onastvar likes this.
  7. onastvar

    onastvar Member

    Thanks for your recommendations. I made sure all my websites are PHP-FPM (on Domain tab) and PHP-FPM Process Manager is OnDemand (on Options tab). Now when I run free -m, it looks much better.

    total used free shared buff/cache available
    7987 1478 3218 196 3290 6013
     
  8. Steini86

    Steini86 Active Member

    It is often confusing, that Linux "names" ram differently, than new users would expect: https://www.linuxatemyram.com/
    "Unused" Ram is completely useless and the hardware could/should be removed. Linux is trying to use all of your ram in a useful manner. You have the ram and you pay for it, so lets use it! Therefore, linux uses your ram for disk caching. That is a good thing, as it speeds up your effective disk speed. However, the memory is available to programs. If they need it, they get it. That is the "available" memory. So now you are more than good (6GB of 8GB is available). FPM "ondemand" is memory friendly, but slow. If you have websites which you want to start faster, use static. You have the ram available!
     
    onastvar likes this.

Share This Page