Marcus wrote to me a few days ago regarding this VPS offer from XenVZ — a 32MB guaranteed/48MB burstable OpenVZ VPS for 0.99 British Pound. That could very well be the cheapest virtual server available (a time limited promotion though). However, working with merely 32MB of memory could be tricky (especially on an OpenVZ VPS). At the end Marcus wrote:
THANKS IN ADVANCE, I hope with your help, be able to create the world est tiny server ever made :)
Well. Challenge taken :)
Signing Up
VPS provisioning at XenVZ is almost instantaneous. After submitting the form, within minutes the invoice with payment options was received. I paid with PayPal, and again within a minute my tiny VPS was built and activated. Perfect score here.
I am running Debian 5 Lenny 32bit on this VPS (which is quite a lot lighter than 64bit).
VPS Specification
Basically, you get what you pay for.
- 32MB guaranteed/48MB burstable memory
- 1.5GB disk storage
- 10GB/month data transfer
The CPU on the physical box is not too bad either:
# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU L5410 @ 2.33GHz stepping : 10 cpu MHz : 874.999 cache size : 6144 KB ... processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU L5410 @ 2.33GHz stepping : 10 ...
You get access to two Xeon L5410 CPU cores, but both of them has been throttled to 875MHz. However it does feel quite snappy when I navigate around and tried a few commands. Let’s now look at the dreaded user_beancounters
settings on this OpenVZ VPS:
# cat /proc/user_beancounters Version: 2.5 uid resource ... barrier limit 1950: kmemsize ... 3276800 3604480 lockedpages ... 64 64 privvmpages ... 12288 12288 shmpages ... 8192 8192 dummy ... 0 0 numproc ... 64 64 physpages ... 0 9223372036854775807 vmguarpages ... 8192 9223372036854775807 oomguarpages ... 8192 9223372036854775807 numtcpsock ... 96 96 numflock ... 100 100 numpty ... 8 8 numsiginfo ... 500 500 tcpsndbuf ... 167772 335544 tcprcvbuf ... 167772 335544 othersockbuf ... 167772 335544 dgramrcvbuf ... 83886 167772 numothersock ... 96 96 dcachesize ... 524288 539648 numfile ... 1024 1024 dummy ... 0 0 dummy ... 0 0 dummy ... 0 0 numiptent ... 250 250
From what I can tell, the user beancounters parameters severely limits what this VPS can do. Well, you do not expect to serve millions of pages a month from just 32MB of memory, but some of the settings make it not even usable as a private proxy or VPN.
- 3.2MB of kernel memory is not a lot when you start adding some iptable rules.
- 164k of
tcpsndbuf
andtcprcvbuf
means it could be very difficult to stream big chunk of data over TCP connections. I had hit the limit oftcprcvbuf
a couple of times myself. - Maximum 96 TCP sockets and 1024 opened files. I can think of quite a few apps breaking these params.
Anyway. It’s a tiny VPS with limited applications. Shell server? IRC node? Backup NS or MX? Now I have this VPS for 6 months (you have to prepay 6 months). What can I do with it?
I guess I will run it like what most people would use a VPS for — turn it into a web server to host websites!
Lightweight Web Server
When I first got the VPS, it runs almost nothing — not even syslog or cron. Here are the software I removed and then installed to turn it into a small web server.
- Removed:
- DenyHost (memory-heavy as it’s coded in Python. Some iptables rules should be sufficient)
- Removed: rsyslogd (allocates lots of memory — 20+MB!)
- Installed:
- dropbear (to replace openssh)
- nginx (as web server)
- php5-cgi (to serve dynamic content)
- dash (to replace bash as scripting shell)
- pdksh (to replace bash as interactive shell)
- inetutils-syslogd (to replace rsyslogd)
Please see my previous Debian 5 setup guide for more details. I am running a single process of php-cgi talking to Nginx using FastCGI protocol. The plan is to run some kind of CMS using PHP. However I do not wish to run MySQL because of its memory requirement — I am opting for something using flat files instead. At the end, DokuWiki was chosen because it’s quite flexible and uses only flat files to store all its data.
I am also cheating here — I don’t run a MTA. Instead, I use ssmtp to forward email to my other VPS for delivery.
End result?
Yup — the entire wiki site runs on a VPS with only 32MB of memory, and the performance feels okay as well. There is only one PHP backend so there can only be one page-generation request at the same time. Not a big deal I guess judging by how many visitors that wiki might get.
# free total used free shared buffers cached Mem: 49152 17236 31916 0 0 0 -/+ buffers/cache: 17236 31916 Swap: 0 0 0 # df -h Filesystem Size Used Avail Use% Mounted on /dev/simfs 1.5G 339M 1.2G 23% / tmpfs 2.0G 0 2.0G 0% /lib/init/rw tmpfs 2.0G 0 2.0G 0% /dev/shm
I am heading to sleep now. Hopefully it is still alive when I wake up tomorrow morning :)
Updates: I am up! Trying to set up iptables
and found quite a few modules are missing.
- No LOG target
- No state module
That certainly makes implementing a stateful firewall a bit trickier…
- 5 Reasons Why You Want a Low End Box - May 26, 2021
- Dead Pool January 2012 - February 2, 2012
- exit(0); - January 19, 2012
Browsing around the wiki seems pretty responsive. Not bad at all.
Hilarious. Good job. What security do you run on your VPS’s ?
What do you mean by “what security”?
Just some iptables rules to limit access to SSH port that’s all.
just migrated to zenVZ at last weekend
Very impressive! Wiki feels fast indeed.
Hi Guys,
Thank you for the positive review!
We have tried to tune our 32mb Nano VPS quite a bit and will constantly tweak it for even lower memory usage.
We are experimenting with even more measures to cut down memory use and are will tweak user_beancounters as nessesary. Our CPU limits are there by default to protect other customers. We can change these thresholds on request.
We welcome any suggestions users may have – please simply let us know!
Forgot to mention my original point:
Stateful firewall rules are currently disabled due to memory usage problems with them in the past. It just does not seem economical to run iptables rules on such little RAM. We leave stateful firewalls for our Xen packages only.
Hello again!
Input from yourself and Marcus has led to the following:
# 164k of tcpsndbuf and tcprcvbuf means it could be very difficult to stream big chunk of data over TCP connections. I had hit the limit of tcprcvbuf a couple of times myself.
– We changed this a few days ago (doubled). It has now been quadrupled.
# Maximum 96 TCP sockets and 1024 opened files. I can think of quite a few apps breaking these params.
– Doubled these too.
Please click “Update Quotas” within our CP to receive the new values :)
@Sean — thank you very much! That makes this VPS much more useful now — although I have been running the wiki for the last few days taking 10 visitors/day and haven’t run into any issue yet :)
@LowEndAdmin – No problem. Hopefully we have perfected our algorithm to suit most size of VPS with as little overhead as possible. All that is left to do now is fine tune (yet again) many of our OS templates.
Enjoy your Nano VPS :)
I ordered today a Nano VPS..
I’m running lighttpd, php5, vsftpd, sendmail and DokuWiki..
It’s running AWESOME!
And it’s only £5.94 for 6 months :D
Got mine up and running.
Was thinking of logging a query about adding tunnel devices, can’t add ipip gre sit tunnel which is a pain as I was hoping to be able to play around with ipv6 over a v4 tunnel.
Anyone tried the support yet?
Unfortunately we do not have native IPv6 (though we are hoping to very soon) and we do not have tunnels on our host nodes. You may try running your own tunnel within your OpenVZ VPS – we can enable the tun/tap device for you. However, while we cannot guarantee an IPv6 tunnel will work in OpenVZ, we can with our Xen based VPS.
IRC allowed?!
IRC is allowed but we need users to request usage via our web contact page.
This just allows us to keep a record of of usage and to ensure that we know which VPS are using IRC services.
Hi,
Are you able to recommend a tiny SSH BFD script which will work on this VPS?
Thanks,
Ian
Just to report my 99 pence/month VPS at XenVZ now has uptime of 300 days. Very stable indeed.
awesome…. great job LEA
It’s hard for me to setup vps with 32mb ram :D
Hello LEA,
What’s the current uptime?