[NCLUG] [Poll] VPS and web mangement hosting

Bob Proulx bob at proulx.com
Sun Feb 19 16:28:14 MST 2012


Sean Reifschneider wrote:
> Unfortunately, most people don't really know the answers to many of these
> questions.  Particularly RAM...  As some of you know, we do VPS and
> dedicated hosting, so I'm somewhat familiar with this in the real world.

You are the expert! :-)

> Most people are shopping entirely based on price.  For example, I've been
> asked "How cheap are your virtuals?".

Especially when people don't know then they don't know where to start
either.  I personally know one business that was spending $650/month
for a 512M virtual server out on the net.  Wow!  I know that we all
would like their business.

> But, I've also found that most people will seriously underestimate
> their RAM requirements.

That that is easy to do.  And I think everyone takes a try it and see
attitude.  If they can change plans relatively easily then they will
want to try the lowest they can potentially use and then only scale up
if they find that they must.

> It's a hard question to answer, I'll admit...  Disc space is easy,
> you login, you do "df -h", done.

Disk.  Yep.  Easy.  Check.

> Bandwidth is usually somewhat easy as well, if you are already
> running the site you just look at your providers control panel and
> off you go.

Bandwidth is where I end up being completely lost at estimating.  I
usually have no idea what will be needed.  I have no other suggestion
than to test drive it for a while and see.  The answer is always one
of "It depends."  I have no idea.

> However, RAM is always in flux.  You login and run "free" and unless your
> system is experiencing it's heaviest use right at that moment, you probably
> only have the *MINIMUM* number, not the maximum...  Unless you have munin
> running, you probably just don't know how much memory you need.

My first thought was "Ha!, I always run Munin."  :-)  But you still
don't know until it has been running for a month and has some history
behind it.  Some tasks don't happen every day.

I know a startup group that started developing a new service.  They
started out with at least six months of development ahead of them.
Initially everything fit into a 512M virtual machine.  But as they
added functionality they outgrew their original machine and needed to
upgrade to a larger ram size.  But that wasn't until six months had
gone by.  They probably really were okay with the smaller size up
until that time.

> The biggest culprit is Apache.

Yes.  Apache is a big consumer of memory.

> You need to do the math: I want to be able to handle X concurrent
> connections and each Apache instance uses YMB of RAM, so X*Y is how
> much memory I need to handle that load.  Simple math, but most
> people don't do it until it's too late.  :-)

Or until they *need* to do it.  :-)

> It's not uncommon for Apache to use 25-50MB per connection, so if you want
> to handle 50 connections (each site user may have multiple connections
> remember, so this isn't a huge number), that's 1.25 to 2.5GB right there...
> 
> The default Ubuntu settings will set you up for, IIRC, 128 connections as
> the limit.  So unless you tune this, you could be talking 3-6GB needed for
> that.

Actually Ubuntu (and Debian too) defaults to 150 connections.  Or at
least that what I was told just last week when another associate did
the math on their machine.  Guess why they needed to do the math? :-)
Let me check, yes, MaxClients is 150 by default.  My friend ended up
with a small denial of service attack from some robot that was hitting
their site.  It used a lot of memory.  I asked if the linux
out-of-memory killer than activated but didn't hear the answer.
Definitely bad when the OOM gets involved.  I asked because he said
that it crashed parts of the machine so I assume the OOM killer
started killing things.  Linux memory overcommit is probably good for
laptops but is definitely bad for servers.  They ended up reducing
MaxClients to 12 down from 150.

> There are many ways to reduce this footprint, but I won't go into that
> here.

And I won't rant that I always disable linux memory overcommit
either.  :-)

> This is part of why our minimum virtual hosting offering is 2GB of RAM.
> :-)

A good thing for piece of mind and lowered frustration levels I am
sure.

Bob



More information about the NCLUG mailing list