WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Why does my DomU keep going mad?

To: Lyle <webmaster@xxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Why does my DomU keep going mad?
From: Adi Kriegisch <adi@xxxxxxxxxxxxxxx>
Date: Mon, 26 Jul 2010 17:24:22 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 26 Jul 2010 08:27:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C4D9B1C.10708@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4C4D8D8A.80702@xxxxxxxxxxxxxx> <20100726134410.GF13501@xxxxxxxx> <4C4D9B1C.10708@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
Hi!

> >You could monitor your services for memory consumption?
[SNIP] 
> These are useful thanks, although ps doesn't use - (just to be awkward, 
> everything else does).
man ps:
[SNIP]
  1   UNIX options, which may be grouped and must be preceded by a dash.
  2   BSD options, which may be grouped and must not be used with a dash.
  3   GNU long options, which are preceded by two dashes.
[SNAP]

> I looked at nagios a few years ago, it looked great, but like I'd have 
> to take a week out to set it up. If there anything lightweight I could 
> make? I guess I could write a Perl daemon that runs that ps command 
> every 10 seconds or something and logs the output to a file... Seems 
> like the sort of thing that should all ready be available though...
My suggestion was not about setting up nagios if you're not already using
it. You could start using sar[1] or just write a plain shell script doing
the monitoring for you:
while /bin/true; do
  WHATEVER_PS_COMMAND_YOU_LIKE_BEST > \
           /var/log/mymemlog/$(date +%Y-%m-%d_-_%H.%M.%S)
  sleep 10
done
...and you'll get memstats every 10 seconds saved in a log file for further
analysis.

Another option would be to check your already existing log files for
"oomkiller" messages. They could give hints on the processes eating up all
your memory.

Further this is a general issue with Linux servers running out of memory
and is not related to Xen or a Xen issue. You might as well want to have a
look at sites serverfault[2] or you might want to do it the other way
around and limit memory for the available applications and users. Just have
a look at /etc/security/limits.conf for example. Then sit down and wait for
the first service dying... ;-)
Another option could be to add more swap space (as this is usually cheaper
than ram). That way your problem might "disappear". On the other hand you
should plan your (virtual) machines with expected memory consumption in
mind so that using swap space will not happen at all (or just in case of
emergency preventing the oomkiller to snap in).

-- Adi

[1] http://pagesperso-orange.fr/sebastien.godard/
[2] http://www.serverfault.com

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users