New toy
My friend get an account at VPSLinks so I had to have one.
VPS stand for Virtual Private Server and it mens that you get a "slice" of a computer from somewhere in internet. The advantage over the normal web hosting is that you have full access to install whatever software you wish but you have to configure yourself.
So I had a look and I found something interesting
- HDD: 2GB
- Bandwidth: 100GB
- Ram: 64MB
- Price: $7.95/month
The first thing I had tried was to make a swap file....surprise.... seem that is not possible. So I had to limit to the 64 MB of ram.
So let's heck the memory
myhost:~# free
total used free shared buffers cached
Mem: 3756488 3716804 39684 0 130120 1945208
-/+ buffers/cache: 1641476 2115012
Swap: 8193108 437732 7755376
But this is not the real memory avail so I made a little script to show my memory:
#!/bin/bash
bean=`cat /proc/user_beancounters`
guar=`echo "$bean" | grep vmguar | awk '{ print $4;}'`
priv=`echo "$bean" | grep privvm | awk '{ print $2;}'`
let totl=guar/256
let used=priv/256
let free=$totl-$used
echo "VPS Memory:"
echo " total: $totl mb used: $used mb free: $free mb"
So it looks like this now.
myhost:~# /bin/Free
VPS Memory:
total: 58 mb used: 35 mb free: 23 mb
But for this I had to:
- Replace the OpenSSH daemon with dropbear because OpenSSH use about 20 MB of RAM.
- Use lighttpd instead of apache
- Limit mysql memory to 1MB instead of 16M for buffer.
myhost:~# apt-get install apache
...[snip]...
Setting up apache (1.3.34-4) ...
open2: fork failed: Cannot allocate memory at /usr/share/perl5/Debconf/ConfModule.pm line 58
So I started wondering if this is normal on a computer with 64 MB of RAM. So I fire up VMWare on my computer and I installed the same Debian in a virtual machine exactly as the one from VPSLink... and surprise,surprise it worked just fine with the same software running in the same conditions and same configurations. (also no swap space) So seems that the software the use is not so smart and have some serious problems.
Also something ugly that I had notice is that if I disconnect from the server and I leave the web server running after a few hours the first attempt to connect to the web server to check my page is fails and seems and i have to try at least 3-4 times before it starting working. And also seems that is comporting like is under heavy load but as soon as I start pushing it a bit is getting back to normal. So I guess it go to some kind of standby (lo priority)
So I am really not happy with it and now seems that my friend that mad fun of me that I am a cheap bastard because I get the cheapest one for only one month. But now he is regretting because he get the one with $14.95/mo for six month (total $82.26 because of the discount). So I have deciding to also get an account to SliceHost next month and see how it is. (I can use swap there )