PanelCP Install

What the neighbours notice when one website eats all the memory

, by the developer of PanelCP

Isolation is easy to claim. So I set up two equal machines, put three websites on each, and let one of them behave as if it had been hacked.

The machines

Two virtual machines with 2 processor cores, 3 GB of memory and no swap, both with Ubuntu 24.04 on arm64.

  • HestiaCP 1.10.10, the latest release on the day of the test, installed with the official installer: nginx in front of Apache, PHP-FPM 8.5, MariaDB. Mail, DNS and antivirus were left out, which gives it more free memory.
  • PanelCP 2.1.1, also the latest on that day, with the default settings, nginx and PHP 8.4 for each website and one MariaDB per website. Its mail, DNS and host databases were running.

On each machine account A had the websites a1 and a2, account B had b1. The website a1 was the bad one.

The attack

A PHP script turns off its own memory limit and takes memory until something stops it, eight requests at a time. One second before that, ten requests of six seconds each start on a2 and b1. Think of a report, an import or a payment. The question is how many of them finish.

The result

HestiaCP 1.10.10 PanelCP 2.1.1
Long requests that finished, 3 runs of 10 0 of 30 30 of 30
The same with HestiaCP's account limits on (512 MB, 100% CPU) 0 of 30 not needed
The same without an attack 10 of 10 10 of 10
Server services restarted, 3 runs PHP-FPM, in every run none

Why

On HestiaCP all websites with the same PHP version share one service. When the memory ran out, the kernel stopped a process of that service, the service restarted, and every request in progress on every website was gone. The account limits did not help, because they apply to the user's own slice, while the PHP processes of websites run inside the system's PHP service.

On PanelCP the kernel also stopped PHP processes, but only inside the container of a1. Its memory limit is the container's, so the neighbours never saw it.

What was a draw

  • Short requests. Both panels answered all of them during memory, processor and database attacks, with a median of 2 to 4 milliseconds.
  • Files of the neighbours. Neither panel let the bad website read them.
  • The processor attack did no harm on either.

What this does not show

Two virtual machines on one computer are not a benchmark, and the PHP versions differ. The test shows what is separated from what, not which panel is faster or more reliable. HestiaCP has years of operation behind it, a large community, webmail and antivirus. PanelCP 2.0 came out on the day of this test. A HestiaCP administrator can also harden the PHP template, for example by fixing memory_limit there. I did not test that.

If you can repeat the test and get something else, write to me.

All articles