The disk usage from Enhance seems hefty. We have one VM running just a webserver and database role, it's using over 36GB of space and the sites on it are doing very little with combined storage for files less than 200MB.

Maybe the team can answer why it uses so much and means trying to offer this maybe for cloud/VPS customers who have limited space is a no go. cPanel used around 10GB including OS and generally didn't ever bloat to these levels.

    The biggest consumer of disk space is the various PHP container images. We're aware many customers don't use the older versions and it will soon be possible to disable them.

    Base o/s plus Enhance with all PHP versions enabled is around 16GB. We are working to reduce this by optimising the way we deploy docker images and with the aforementioned option to disable PHP versions you are not using. We are also working to reduce the minimum system requirements as we are aware customers want to be able to resell Enhance on VPSs that are smaller than the current minimum requirements.

    36GB sounds excessive if you only have 200MB of website data. Maybe something is logging excessively. Try:

    find /var/lib/docker/containers -size +100M

    Enhance rotates logs for its own services but not for the web server containers and their output can be noisy sometimes.

    Most probably container log files... ... current default with Enhance docker container is
    "LogConfig": {
    "Type": "json-file",
    "Config": {
    "max-file": "999",
    "max-size": "999G"
    }

    You might want to tweak it to some value that suits your setup. Log rotate using --log-opt max-size=15m --log-opt max-file=5 .

      Hello,
      yes, I have also raised this issue with Adam from time to time and really hope that there are optimisations at this point. We also have a server with a VSite with not even 200 MB and I admit 10 GB of mailboxes. But all in all 34 GB are used on the server and I have already manually deleted a couple of php directories in /var/enhance_container_images/.
      I also find that the overhead per server is relatively large and would very much appreciate if there were ways to limit this. Also, the amount of log files under /var/local/enhance/email/data/logs/postfix/, /var/local/enhance/email/data/logs/dovecot/, /var/local/enhance/email/data/logs/rspamd/ is a bit high in my opinion.
      best regards,
      Dirk

      • Adam replied to this.

        blackpoint manually deleted a couple of php directories in /var/enhance_container_images/

        This is risky because they will be re-created when appcd updates and if you're relying on this to maintain free space on your server it could mean that the disk suddenly fills up next time you apply an update.

        There will soon be an official way to disable unused PHP versions.

        Email log retention will be configurable in future too. You are free to delete log files if they're not needed. You could potentially do this with a cron job.

          Adam There will soon be an official way to disable unused PHP versions.

          Hopefully this isn't limited to the application servers as they're also consuming almost all of the disk space on our nameservers.

          • Adam replied to this.

            Dan

            On a DNS server you can disable every PHP version since it's not required. On a mail server you need to retain PHP 8.1 for RoundCube but all other versions can be disabled. On an app server it's at your discretion - the customer will only be offered the versions which are supported on the server their website is assigned to. This can be further limited on a per-package basis.

            • Dan replied to this.

              Yeah this is crazy. I installed 4 WP's and did nothing to them, and it's been about a month, and 48gb is used.....

                When I first installed, about 5% of available space was already used on all my servers but I was told this was normal. Its quite crazy because I have about 200GB being used on a server with 4TB of space that is 'unaccounted' for.

                • Adam replied to this.

                  MediaLabz

                  Does 200GB actually show as being used in the output of df -h? If so this is definitely not normal.

                  If anyone has disk usage they can't explain, please run:

                  du --max-depth=3 --exclude=/var/lib/docker/overlay2 --exclude=/var/local/enhance/containers --exclude=/proc --exclude=/sys -h /

                  and

                  du --max-depth=2 --exclude=/var/local/enhance/containers /var/local/enhance -h

                  Then either post the results here or send a support ticket.

                  Be aware this will consume a lot of disk i/o. If your server has slow disk i/o or is heavily loaded, maybe run it at an off-peak time.

                  briansmith84 We have been running single wp for testing for more than a month with no drastic log accumulation without even tweaking rotation. There must be something wrong with the system for such a large log size. check the logs , tune it.

                  Adam I assume by "you can" you mean "you will be able to"? As currently we only have the DNS role on our nameservers but the images are still downloaded with apparently no way to stop them.

                    9 months later

                    Dan @Adam Has there been any update on this? Looking for a way to disable PHP versions on a Backup only server. The "enhance_container_images" dir is currently consuming 6.1GB.

                      7 days later

                      Adam Thanks Adam! Is this it the one due this week?

                      Will the option to remove the unused containers be available through the UI?

                      Yes it should be this week or early next. Once you update and once all containers have been restarted you will be able to remove /var/enhance_container_images entirely. You'll need to do it through the terminal, it won't be added to the UI.

                        Follow @enhancecp