D&C GLug - Home Page

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

Re: [LUG] VPS Memory Usage

 

On Thu, 7 Apr 2011, Dan Dart wrote:

On 7 Apr 2011 18:10, "Gordon Henderson" <gordon+dcglug@xxxxxxxxxx> wrote:

On Thu, 7 Apr 2011, Gibbs wrote:

I don't know a great deal about memory usage but I'm struggling ...
High usage is generally fine - if you've got the RAM for it ;-)

However I'm surprised at the zeros in the buffer/cache, but it might be that
the VPS system, your host is using forces that (and it's accounted for
elsewhere?)

Have you tried looking at top, sorted by memory (hit capital M)? Each
instance of https, while sharing the actual code will have it's own data
space - and the size of that will be goverend by the type of website running
- php, etc. will all eat memory and it might not be released until that
instance of httpd dies - does amavis use a lot of memory each time it doe a
scan? Same for clam - there will be a difference in the system in the middle
of the night vs. through the day when it's busier..

Maybe your server really is busy - especially if you've got few popular
sites on it..

The zeros mean you have no swap. You might want to look into getting some...

mkswap /dev/xxx
swapon /dev/xxx
et al.

(pasting in Gibbs original numbers again)

             total       used       free     shared    buffers     cached
Mem:           960        807        152          0          0          0
-/+ buffers/cache:        807        152
Swap:            0          0          0

I was referring to the zeros under shared, buffers & cached - as I think was Gibbs...

His VPS provider (if it's who I think it is) has a policy of not allowing swap for their virtual servers - and that's quite a reasonable policy.

However, it's perfectly feasible to have no swap and still have buffer/cache memory in-use - as this demonstrates:

# free -m
             total       used       free     shared    buffers     cached
Mem:          2003       1781        221          0        252        733
-/+ buffers/cache:        795       1208
Swap:            0          0          0

Which is my workstation...

I suppose it's possible that there really is no memory left-over for buffers/cache, etc. when you're really tight on resources, but I've never seen it that bad... And a quick check on a couple of servers I have which are using a little bit of swap shows that they still have a good few 100MB allocated to buffers & cache...


Gordon

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