Savings
In Server › Savings you see how much RAM the server really uses, and you turn on, one by one or all together with Turn all on, the optimizations that free it without touching the sites. Each item turns off with Turn off and the server goes back to how it was.
How much RAM the server really uses
The three tiles at the top show:
- RAM really in use: the RAM taken by programs. The file cache is not counted, because the system frees it by itself when needed.
- RAM freed by the panel: the sum of what the optimizations freed. The panel measures the processes it stops at the moment it stops them: it's a measured figure, not an estimate.
- Swap: how much is in use and, with compressed RAM on, how much room the compressed pages take in RAM compared with what they took before.
Where the RAM goes splits the memory among sites, PHP, databases, mail, web server, DNS, panel, system and kernel. For each program it counts the memory it really holds: a page shared by several processes is counted once, and program files already read from the disk (libraries, executables) are not counted, because they are cache the system takes back by itself. Kernel and buffers is the rest of the RAM in use, the part no program holds (the kernel, its tables and the temporary files kept in RAM): the groups add up to the RAM in use of the first tile.
RAM of the sites now lists the sites that have processes running right now (PHP, cron, apps). An empty or short list is normal: the PHP processes of a site end 10 seconds after the last request, so a site without visits takes no RAM.
Compressed RAM (zswap)
When the RAM is needed elsewhere, the system moves rarely used pages to the swap. With zswap these pages first stay in RAM, compressed (zstd, usually 2–3 times smaller, at most 20% of the RAM), and reach the disk only when that part is full. It's much faster than the disk, which is also written less.
If the server does not have enough swap, the panel creates the file /var/lib/koapanel-swap: half of the RAM, 1 to 8 GB, never more than a quarter of the free space and always leaving at least 5 GB free. The file goes on ext4 or XFS (on AlmaLinux and Rocky Linux the panel gives it the right SELinux label). If the server already has a swap from the provider, the panel adds only what is missing. Turning the item off removes the file; the swap that was there before stays.
Without swap, when the RAM runs out the kernel kills processes to free it, sometimes the database itself. Not available in containers (LXC, OpenVZ), where the memory is managed by the host server.
PHP stopped for the versions without sites
Every installed PHP version starts its PHP-FPM with a main process and the two spare processes of the system www pool, even if no site uses it: on the panel's test server, three versions without sites took 41 MB. With this item the panel stops the versions that no site, phpMyAdmin, Adminer or webmail needs, and checks again every 5 minutes and after every restart.
When a site moves to a stopped version (or you create it with that version), the panel starts it again by itself before writing the pool of the site: you don't need to do anything. On the Server page the stopped versions show as idle, not as services stopped by an error. Turning the item off starts the stopped versions again.
Unneeded system services
Ubuntu starts some services meant for a computer or for a server with special hardware, not for a web server. The panel blocks (systemctl mask) only the ones it finds, and only when they are not needed:
fwupd(firmware updates), on virtual machines only: a physical server keeps it;ModemManager(modems),udisks2(removable disks),upower(batteries);multipathd(multipath disks), only if the server has no multipath disks.
Turning the item off unblocks the services, and the ones that were running start again.
PHP on demand per account
With the Isolation and limits module every account has its own PHP. On demand, the PHP of an account starts at the first visit and stops after a while without visits (15 minutes by default, changed on the module's page). The first visit after a pause waits a few tenths of a second. It's the same setting as on the Isolation page: turning it on here or there is the same. Without the module the item is not available and not needed, because the pools of the sites are already on demand and end their processes 10 seconds after the last request.
Disk
The Disk section shows the filesystem of the sites, how much space is free and how much the items below recovered.
Compressed mail
Dovecot saves the messages compressed (zstd) and decompresses them when someone opens them. Nothing changes for the people using the mail: mail apps and webmail see the same messages, and the space counted in the mailboxes (the quota) stays the size of the uncompressed messages. Only the space taken on the disk changes. On the panel's test server, 2.8 GB of real mail became 1.9 GB: the messages went from 2,086 to 1,221 MB (−41%), and Dovecot reads them back identical to the originals.
When you turn the item on, the panel also compresses the messages already there, in the background and one folder at a time. Each folder stays locked only while its files are replaced, and the messages keep their name, date and owner. Messages that arrived in the last hour are left for the next run (Compress the existing messages), and so are messages smaller than 4 KB and those that compress by less than 10%.
Turning the item off saves new messages uncompressed again; the ones already compressed stay compressed and read as before. Before you move an account with compressed mail, the destination server must run at least this version of the panel: if it's older, the move is blocked with a message.
Identical files of the sites shared
Many files are identical in many sites: the WordPress core, the most popular plugins and themes, the libraries in vendor/ and node_modules/. On XFS (the default filesystem of AlmaLinux and Rocky Linux) and on Btrfs, the panel asks the kernel to make these files share the same disk blocks. The kernel compares them byte by byte before joining them, so two different files are never joined.
Nothing changes for the sites. Each file stays with its site, with its owner, permissions and dates. If a site changes a shared file (for example by updating WordPress), it gets its own copy of the blocks it changes. The space counted in the accounts stays the same too: the server is what saves.
When on, the item runs every week; Share now starts it right away. It looks at files of 16 KB and up, not modified in the last 10 minutes, outside the tmp and logs folders of the sites. On the test server, 10 WordPress sites (versions 6.6, 6.7 and 7.1, in three languages) took 1.1 GB on XFS and went down to 458 MB; on Btrfs from 1 GB to 382 MB.
On ext4 (the Ubuntu default) blocks can't be shared: the Measure button tells how much XFS or Btrfs would save, useful if you're preparing a new server.
Cleanup
Scan measures what can go without anybody missing it, then you choose what to clean. The content of the sites, the mail and the databases are never touched.
- Packages already installed: the copies apt or dnf downloaded for updates already done.
- System journal: the systemd journal beyond its last 100 MB.
- Leftovers of deleted sites: WordPress copies and backup areas of sites that no longer exist.
- Temporary files of the sites: PHP sessions and uploads left in the site's
tmpfolder for more than 2 days. - Leftovers of WordPress updates: what is in
wp-content/upgradeandwp-content/upgrade-temp-backupolder than a day. - Debug logs: WordPress
wp-content/debug.logand PHPerror_logfiles over 1 MB.
In the folders of the sites the panel removes files as the site user, so it can't remove anything the site itself couldn't, and it never follows symbolic links.