Tips and tricks: When I shut down a guest domain under Xen, Domain 0 does not reclaim the memory. Why is this?
by the editorial team
Contributed by Chris Lalancette and Eduardo Damato
Release Found: Red Hat Enterprise Linux 5
The idea with Domain 0 is that it is a minimal system that doesn’t have a lot of services on it. The main thing it is supposed to do is start, stop, and otherwise manage domains that do the real work on the system. When a domain shuts down, Domain 0 doesn’t actually reclaim the memory since it is expecting to start another guest domain in that memory. Therefore, it doesn’t waste time reclaiming memory which would be required next time. If a user wants to force Domain 0 to reclaim all of memory, use the command:
# virsh setmem 0 <memory-size>
or :
# xm mem-set 0 <memory-size>
where <memory-size> is the total amount of memory in the host system.






