Lxlabs‘ LxAdmin Host-InA-Box is a “feature-complete” server control panel product designed for web hosting. There are already many control panels for web hosting providers. Some are commercial, some are free, and some are open sourced/free software. What then makes LxAdmin HIB unique? Its runtime size, which claims to be only 15MB! The tiny memory footprint includes not just the control panel software itself, but also the mail server, IMAP server, POP3 server, DNS server and web server — everything ready to get you started with web hosting.
Many commercial control panels require at least 128MB to have everything up and running, and it is commonly known that cPanel won’t be happy with less than 256MB of memory. Then how did LxAdmin HIB achieve such low idle memory foot print? I was wondering about the same thing when I first heard about it, so I bought a small VPS plan and found out.
Let us make this clear first — this review is going to be more geared towards Host-InA-Box setup than the actual LxAdmin control panel itself, which I will (hopefully) write about next week.
I am using BuyAVPS to evaluate the LxAdmin HIB. They are cheap (I am using the $9.50/month plan), and they are in Los Angeles so I can get good pings from Sydney. Physical server is on a dual Xeon 5130 2GHz, and my VPS has 128MB guaranteed / 256MB burstable memory running OpenVZ on Linux 2.6.9. VPS can be controlled via HyperVM, which is another Lxlabs product.
VPS performs well most of the time, but bandwidth is a bit patchy sometimes. I will review BuyAVPS later if I have a chance.
LxAdmin runs exclusively on CentOS 4 & 5. I am using CentOS 4 on my test VPS as CentOS 5 wasn’t provided when I signed up. It basically means that LxAdmin can sit on a rock solid and well-tested platform, but it also means the end users have to stick to RedHat/CentOS’s way of doing things. I guess it does not really matter if you are operating from the control panels most the time, or you are an experienced RHE/CentOS sysadmin. Otherwise it can be annoying whenever you need to dig into the console and cannot find things in familiar places.
Personally I found Yum is a pain to work with. Because of messed-up dependencies, the default CentOS base template installs quite a large number of packages that I would never need on an OpenVZ VPS serving web pages (why do I need
usbutils?!). Moreover, yum is quite a memory hog that it might often be the one app hitting memory limit all the time on your small VPS. I have seen hosts selling LxAdmin HIB VPSs with only 64MB guaranteed memory, and I think it is just crazy. Running
yum update on some big packages can chew up the entire 64MB by itself.
Now let us come to the guts of it — how does HIB squeeze the entire web+mail hosting package into 15MB runtime. Here is the output when I run
top - 17:27:41 up 7 min, 1 user, load average: 0.00, 0.01, 0.00 Tasks: 27 total, 1 running, 26 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si Mem: 262144k total, 17352k used, 244792k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 15 0 1628 596 516 S 0 0.2 0:00.00 init 28060 root 16 0 1532 536 448 S 0 0.2 0:00.02 syslogd 28112 root 15 0 8680 4292 2392 S 0 1.6 0:00.08 snmpd 28124 root 16 0 4016 1124 832 S 0 0.4 0:00.10 sshd 28155 root 16 0 2080 824 696 S 0 0.3 0:00.00 xinetd 28193 root 18 0 1560 444 376 S 0 0.2 0:00.00 couriertcpd 28197 root 18 0 1328 284 236 S 0 0.1 0:00.00 courierlogger 28202 root 21 0 1560 444 376 S 0 0.2 0:00.00 couriertcpd 28204 root 18 0 1328 284 236 S 0 0.1 0:00.00 courierlogger 28214 tinydns 16 0 1440 276 232 S 0 0.1 0:00.00 tinydns 28215 dnscache 16 0 2756 1372 320 S 0 0.5 0:00.01 dnscache 28231 apache 16 0 5040 2064 868 S 0 0.8 0:00.00 lighttpd 28242 root 18 0 2156 1104 956 S 0 0.4 0:00.00 sh 28252 root 16 0 3396 1340 1096 S 0 0.5 0:00.00 lxadmin.exe 28317 lxlabs 16 0 3804 868 528 S 0 0.3 0:00.00 lxadmin.httpd 28321 root 17 0 2152 1128 964 S 0 0.4 0:00.00 mysqld_safe 28352 mysql 16 0 11488 4476 3628 S 0 1.7 0:00.01 mysqld 28422 qmails 16 0 1492 372 300 S 0 0.1 0:00.00 qmail-send 28425 qmaill 16 0 1460 432 376 S 0 0.2 0:00.00 splogger 28426 root 16 0 1460 324 268 S 0 0.1 0:00.00 qmail-lspawn 28427 qmailr 16 0 1460 340 284 S 0 0.1 0:00.00 qmail-rspawn 28428 qmailq 15 0 1452 324 268 S 0 0.1 0:00.00 qmail-clean 28444 root 15 0 2480 928 544 S 0 0.4 0:00.00 crond 28453 dbus 16 0 2396 932 788 S 0 0.4 0:00.00 dbus-daemon-1 7569 root 15 0 6896 2428 1984 S 0 0.9 0:00.01 sshd 7626 root 16 0 2288 1316 1052 S 0 0.5 0:00.00 bash 11277 root 15 0 1892 888 716 R 0 0.3 0:00.00 top
Although it shows 17.3MB memory used, it is more like hovering around 24MB, as
privvmpages in user bean counter shows around 6,000 pages allocated. Also note that I am running snmpd on this small VPS (takes around 4MB memory), which is not part of HIB’s standard package lineup.
Also note that the only LxAdmin processes are
lxadmin.httpd, which are tiny (1MB and 0.5MB RSS).
lxadmin.httpd actually runs a trimmed version of lighttpd 1.4.13 I think, and it uses PHP for control panel pages.
Here is the list of software handling various web/mail hosting tasks:
|Web Server||lighttpd 1.4.15|
|Mail Server||qmail 1.03|
|Mailing List||ezmlm 0.53.443|
|Spam Filter||bogofilter 1.1.1|
|IMAP/POP3 Server||courier-imap 3.0.7|
|FTP Server||pure-ftpd 1.0.20|
|Database Server||mysql 5.0.27|
By deploying lighttpd instead of Apache has a huge effect on the amount of memory consumed, without any sacrifice on performance. However what has been sacrificed is the software compatibility, with many web-based software out there assume the existence of Apache. LxAdmin does provide full control on rewriting rules, directory protection, aliases, redirection, etc inside the control panel, however it is not as trivial as
.htaccess which many apps already came with.
PHP is running as suexec CGI from lighttpd, therefore it takes no memory at all during idle. It also means the PHP scripts are running as the user of the site. Each site’s home directory has permission of 750 and belongs to group
apache (where lighttpd is running under), that means it is impossible for PHP or CGI scripts to access other sites’ files, even without any PHP safe-mode running.
However PHP in CGI also means degradation of performance, as each request forks a new PHP process. In reality, those low-end VPSs are probably designed for low traffic/static sites so it actually makes little differences if PHP runs as CGI.
Moreover, you can enable FastCGI for PHP on a per-domain basis from inside the LxAdmin control panel, and how many FastCGI worker processes to be forked. FastCGI improves performance because it not only keeps PHP process in memory after requests have been handled, it also limits the maximum number of PHP processes you can have so the system does not go running out of memory.
There are also quite a few services that don’t take any memory in idle, but are invoked from
xinetd. For example PureFTP and Qmail SMTP. I guess the philosophy is, why take memory when they are not used most of the time? One other suggestion I would give is, instead of running
sshd (which takes 800KB RSS in idle), it would save even more memory by running DropBear from xinetd.
I know it is no where near a comprehensive review on LxAdmin. I for one wasn’t really interested in the control panel as I am mostly an SSH guy, but am just fascinated on how one can pack the entire web + email hosting package + control panel into a tiny 15MB memory foot print. Now I think I understand how it can be done after actually looking into one. It is a good combination of software packages and a very slim control panel. Well done Lxlabs!
Combine the small memory foot print with a few of those $10/month small VPS, everyone can start their own web hosting shop. You don’t just get a big 100 domain reseller account, you also get root access to your very own VPS.
However you still need much more than 15MB to run a decent HIB VPS though. I would definitely recommend getting at least 128MB guaranteed for a OpenVZ VPS. Getting Python-based
yum to run correctly requires a big chunk of memory. Your PHP processes can also grow to 20MB-25MB to serve a page from WordPress or Drupal.
Hopefully next week I will write a bit more on my experience with the actual control panel itself. Stay tuned.