Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dom0 memory allocation?



  > The system has 96 GiB RAM and 20 DomU's.  I had assigned 1 GiB for Dom0
  > when this happened, and no swap partition.  I have never seen any
  > recommendations on how to make an informed choice of Dom0 RAM
  > allocation.  Could you help?
  
  It really depends on what you're doing in the dom0, and how much memory
  you allocated to tmpfs. Each guest probably consumes a bit of memory in
  dom0; but I don't know how much. HVM do probably need more than PV because
  of the qemu-dm process and associated services (especially the framebuffer
  and the VNC server - which of course also depends on the framebuffer
  resolution).
  How much is "a few" HVMs ?

Currently 6.  (2 cnfigured with vnc=0 and sdl=0, which I hope means no
frame buffer.)

The corresponding qemu-dm processes take varying amount of memory.  This
is 'top -o size 10':

  PID USERNAME PRI NICE   SIZE   RES STATE      TIME   WCPU    CPU COMMAND
 3816 root      85    0   261M  240M ttyraw     0:08  0.00%  0.00% xentop
 2724 root      43    0   130M   66M parked     0:12  0.00%  0.00% qemu-dm
 1619 root      85    0   109M   26M netio      0:26  0.00%  0.00% qemu-dm
 3909 root      85    0   107M   29M netio      0:25  0.00%  0.00% qemu-dm
  724 root      43    0    93M   30M parked     0:00  0.00%  0.00% named
  450 root      85    0    88M   22M netio      0:17  0.00%  0.00% qemu-dm
 1604 root      85    0    81M   20M kqueue     0:00  0.00%  0.00% dhcpd
 1307 root      85    0    65M   15M netio      0:22  0.00%  0.00% qemu-dm
 1068 root      85    0    59M 9164K netio      0:16  0.15%  0.15% qemu-dm
 1841 postfix   85    0    48M 4008K kqueue     0:00  0.00%  0.00% qmgr

The big hog is xentop.

Oh, wait a minute.  When I now restarted xentop, it disappeared from the
list.  But the xentop from above had not run more than a few hours.
When the system died, I think a xentop had run for two or three days.

Running
  while true; do ps agux | grep xento[p]; sleep 60; done
for a few minutes reveals tell-tale data:

root    3096  0.0  0.3  28044  6452 pts/4  S+    6:32PM 0:00.15 xentop 
root    3096  0.0  0.3  29068  7320 pts/4  S+    6:32PM 0:00.18 xentop 
root    3096  0.0  0.4  30092  8184 pts/4  S+    6:32PM 0:00.21 xentop 
root    3096  0.0  0.4  31116  9048 pts/4  S+    6:32PM 0:00.24 xentop 
root    3096  0.0  0.5  31116  9904 pts/4  S+    6:32PM 0:00.27 xentop 
root    3096  0.0  0.5  32140 10776 pts/4  S+    6:32PM 0:00.30 xentop 
root    3096  0.0  0.6  33164 11640 pts/4  S+    6:32PM 0:00.33 xentop 
root    3096  0.0  0.6  34188 12512 pts/4  S+    6:32PM 0:00.36 xentop 
root    3096  0.0  0.6  35212 13376 pts/4  S+    6:32PM 0:00.39 xentop 
root    3096  0.0  0.7  36236 14248 pts/4  S+    6:32PM 0:00.42 xentop 

I think I'm starting to understand why 1 GiB Dom0 allocation was not
enough.  :-)

It is possible to speed up the leak by passing -d 0.5 to xentop.

(I tried to wrap xentop in a bash script which runs ulimit with -d -s -m
with ridiculously low argument values.  It seem most if these are
actually not setting sysrlimit properly; only -v successfully forced
xentop to die.)


-- 
Torbjörn
Please encrypt, key id 0xC8601622


Home | Main Index | Thread Index | Old Index