D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] VPS Memory Usage

 

On 07/04/11 15:36, Gibbs wrote:
> I don't know a great deal about memory usage but I'm struggling to
> understand this. On my VPS memory usage is typically between 65-95%.
> This is fine as its there to be used but I do get concerned when it
> reaches the 90%+ region for periods.
> 
> Another thing I don't really understand is that none of it is buffered
> or cached. Here's the output of "free -m":
> 
>              total       used       free     shared    buffers     cached
> Mem:           960        807        152          0          0          0
> -/+ buffers/cache:        807        152
> Swap:            0          0          0
> 
> 
> Can anyone explain if this high usage is OK? I have around 20 websites
> on this Ubuntu VPS including mail. Amavis, Clam, Apache and MySQL are
> taking the majority.

VPS implementations vary, I assume your VPS is KVM based.

I have a diddy KVM virtual host which we use as a DNS server. It shows
similar characteristics.

I believe swap for KVM has only recently been sanely implemented, and it
may not make commercial sense (they want to sell you as much memory as
you might need, and they don't want to create a disk I/O issue for
themselves).

Afraid the answer to is the high memory use an issue is "how much do you
need?". If it ever starts killing processes because it is out of RAM,
then you don't have enough (or some process suddenly expanded for some
other reason).

Virtual servers lacking swap support is one of the drawbacks of virtual
servers (well Gordon and his telephones might not care), but for website
and database stuff paging out rarely used pages is nearly always a
performance gain, and a soft landing with paging out is often to be
preferred in low memory situations compared to killing off the next
process that asks for more RAM (always seems to be cron or mysql in my
experience, and losing cron can be painful especially if you use it for
back-ups).

My KVM VPS shows:

# free -m
             total       used       free     shared    buffers     cached
Mem:           200        113         86          0          0          0
-/+ buffers/cache:        113         86
Swap:            0          0          0

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq