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] Memory Allocation

On Tue, Feb 16, 2010 at 1:11 AM, Joseph Coleman
<joe.coleman@xxxxxxxxxxxxxxxxxx> wrote:
> Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz 
> avgqu-sz   await  svctm  %util
> sda               0.00     9.30    0.00   18.27     0.00     0.11    12.22   
>   1.52   83.13   2.84   5.18
> sdb               0.00    19.93    1.33   22.26     0.00     0.19    17.24   
>   0.85   36.68   2.70   6.38

Disk seems OK.

> so here is a few memory snapshots at the moment: As here you can see 
> different commands for memory list different responses. Where did my 147GB go?

First of all you're confusing the commands. "xm list", "xm info", and
"xm top"/xentop shows memory distribution among dom0 and running
domUs.

>
> vmc1n2:~ # free
>             total       used       free     shared    buffers     cached
> Mem:     131402752   19008992  112393760          0     401988   14859640
> -/+ buffers/cache:    3747364  127655388
> Swap:      2618584          0    2618584
>
> vmc1n2:~ # free -o -m
>             total       used       free     shared    buffers     cached
> Mem:        128323      18563     109759          0        392      14511
> Swap:         2557          0       2557
> vmc1n2:~ #

.. while free shows dom0 memory usage. From that output looks  like
you still got about 100G free dom0 memory.
You really should limit dom0's memory usage on grub.conf though.

>
> xentop - 12:10:57   Xen 3.3.1_18546_20-0.1
> 30 domains: 1 running, 28 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown
> Mem: 150984932k total, 148800660k used, 2184272k free    CPUs: 16 @ 2394MHz

That one shows that about 142G is allocated to dom0 and running domUs,
while about 2G is unallocated. Look for the line that says "Domain-0"
in xentop output, and you can see how much memory is allocated to
dom0. Let's say 128G. Due to ballooning, the 128G may or may not be
the same amount shown in total memory of "free" or "top" output.

To reduce the confusion, here's what you should do:
- pick a value for dom0 memory. 4G should give a lot of room even if
you still run stuff on dom0. Limit dom0 memory to that amount. See
http://wiki.xensource.com/xenwiki/XenBestPractices. After you get
everything work out you can reduce this value later (I usually set it
to around 756MB).
- monitor dom0's memory usage with "free", "top", "cat /proc/meminfo",
or whatever tools you like. The main goal is to keep swap usage as low
as possible. Any amount in "memory free", "buffers", or "cached" is
basically free memory that you can take away from dom0 later if you
like.
- monitor memory allocation of dom0 and domUs with "xm list" and "xm
info" or "xm top".

>From your output, it seems memory is not the problem. Not from dom0's
perspective anyway. So your source of problem is probably:
- your Windows domUs are swapping like crazy, or
- your CPU is maxed out (see "xm top"), or
- you haven't use PV drivers for Windows domU.

-- 
Fajar

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