I believed dedicated server / VPS (Virtual Private Server) always requires dedicated IP adress. Until today.
I found (thanks, LowEndBox) interesting option where you can build your VPS totally custom parameters including shared IP address.How can it work? With shared IP? Youre joking! – you may ask. It works.
TOCICI offers “Nginx Accelerated Shared IP” wchich mean:
- Your VPS will be hidden behind NAT like typical workstation
- External Ngnix HTTP server will redirect HTTP traffic to your box based on URL domain
- You can define custom ports to be forwarded to your box (SSH incoming traffic)
Pros:
- Very cheap option (no cost of dedicated IP required, you can start VPS from 1-2 USD)
- Security (by default no ports visible to external world)
Cons:
- Standard ports except 80 (HTTP) unavailable: no DNS services
- No HTTPS available (requires separate IP)
- SSH login requires custom port (your local network may block high ports to prevent P2P)
The service fills gap between shared hosting and classic VPS. The only problem from my point of view is the distance between Europe and Portland, Oregon in the USA. 220 ms from Warsaw.
OpenVZ is operating system-level virtualization technology that allows to run multiple virtual machines (with dedicated IP addresses) on one box (with shared filesystem). It’s like a dedicated server but it’s not the one. You have to overcome many limitations:
- Limits on VSZ memory size (virtual, allocated but no necessary used) memory (dedicated servers and Xen have limits on used memory: RSS)
- Fixed kernel with modules (no custom compilations here)
- Limits on inodes allocated etc.
One of important limitations is limit of size of unswapped memory allocated to kernel. In this area resides tcpsndbuf.It’s summary size of buffers that are used to send data. If the value is low your download speed may be limited and sometimes you are getting error:
105 No buffer space available
You can check your limits by executing the following command:
# grep tcpsndbuf /proc/user_beancounters
tcpsndbuf 174336 1735168 1720320 2703360 2801251
Current buffer usage is 174336 bytes, limit is 1720320 bytes and limit was exceeded 2801251 times (ops!). Why send buffer is the problem here instead of receive buffer? Most of the time HTTP server is sending data – requests are much smaller than HTTP responses.
Solutions for this error:
- Limit concurrent connections server handles
- Check if unused connections are closed as soon as possible
Wybór dostawcy
Jedną z usług które dostarczam moim klientom są serwery wirtualne (VPS) na potrzeby różnych systemów (głównie opartych o protokół HTTP). VPS to jest wirtualna maszyna posiadająca własne IP i dostęp do root-a, ale współdzieląca sprzęt (CPU, pamięć, dysk) z innymi VPS-ami. Podział pozwala ograniczyć cenę usługi przy zachowaniu dość dobrego poziomu izolacji i bezpieczeństwa (lepszego niż przy współdzielonym hostingu).
Zwykle wynajmuję maszyny w USA ze względu na niską cenę za transfer. Jednak ze względu na potrzebę uzyskania niskich czasów dostępu zdecydowałem się na założenie konta u polskiego dostawcy VPS. Nie potrzebuję wyśrubowanych parametrów, więc wycelowałem w segment budżetowy (poniżej 40 PLN brutto za miesiąc).
hitme.net.pl/budgetvps.pl odpadło w przedbiegach ze względu na bardzo słaby poziom supportu. W webh.pl nie miałem wcześniej okazji wcześniej stawiać maszyn wirtualnych, ale znalazłem kilka negatywnych opinii na temat problemów z dostępnością maszyn.
Na początku vpsinn.pl odrzuciłem ze względu na niską gwarantowaną dostępność serwera (tylko 99%). Oznacza to możliwość niedziałania serwera 7 godzin w miesiącu. Uzyskałem jednak od nich linki do rzeczywistych statystyk dostępności serwerów w Polsce i w Niemczech i tam parametry nie wyglądają tak źle (około 99,7 %). Przynajmniej stawiają sprawę uczciwie i nie obiecują gruszek na wierzbie.

(more…)
This article shows techniques used to trim memory usage on OpenVZ system (with 128 MB RAM burstable). Mostly inspired by this article from lowendbox.com.
Minimal Debian Lenny install (33MB used):
# ps xo vsz,rsz,ucmd
VSZ RSZ CMD
1980 692 init
26988 1236 rsyslogd
5272 1024 sshd
2036 792 cron
8016 2916 sshd
4324 1632 bash
3604 804 ps
# free -m
total used free shared buffers cached
Mem: 128 33 95 0 0 0
-/+ buffers/cache: 33 95
Swap: 0 0 0
After setting “ulimit -s 128″ in /etc/init.d/rc (9MB used):
# ps xo vsz,rsz,ucmd
VSZ RSZ CMD
1980 692 init
2744 1188 rsyslogd
5272 1020 sshd
2036 792 cron
8016 2888 sshd
4324 1628 bash
3604 804 ps
# free -m
total used free shared buffers cached
Mem: 128 9 118 0 0 0
-/+ buffers/cache: 9 118
Swap: 0 0 0
(more…)
Inspired by lowendbox.com article I wanted to experiment with custom OS installations on low-end OpenVZ environment (where memory constraints differ when compared to Xen or dedicated server), so purchased lowest plan from Ram Host: Nano:
- OpenVZ
- 80MB RAM
- 10 GB disk space
- 50 GB data transfer
It cost only $2.99/mo, so it’s very easy to start experiments with VPS environment for anyone. I paid using PayPal and have to wait next day to service become visible (manual fraud checking on PayPal notifications maybe?).