[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [fedora-virt] swap space on virtual machines



On Sun, Jul 26, 2009 at 08:48:23AM -0400, Rich Mahn wrote:
> Okay, my understanding of how RAM is used in Linux is limited.  If a
> system has, say 1G of RAM and runs fine without swapping, doesn't that
> same system usually run better with 2G of RAM?  In other words, doesn't
> the OS sprawl out to use all available RAM, with disk cache, or some
> such other items?  If that's the case, then it's important not to
> allocate more RAM to VMs than is actually available.

Most guests access their own disk exclusively, so there is not a
problem that two guests will try to cache the same bit of disk.  This
would argue in favour of increasing guest size, provided that guest
physical RAM is as fast as host physical RAM (which it nearly is,
provided you don't overcommit memory).

> While I'm asking questions, I know that I can use 'swapon -s' to get the
> current swap situation.  Is there a command I can use to get more
> information on swap usage, such as high watermark, average usage, or
> some such data?

Apart from free(1) which will give you the current overview, maybe try
'vmstat -s' or something like collectd.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]