nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

XEN Linux VPS reclaim or recover memory when a guest domain 0 is shutdown

This is a discussion on XEN Linux VPS reclaim or recover memory when a guest domain 0 is shutdown within the XEN forums, part of the Linux virtualization category; When a domain shuts down, Domain 0 doesn't actually reclaim the memory since it is expecting to start another guest ...


Go Back   nixCraft Linux Forum > Linux virtualization > XEN

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-15-2007, 09:50 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 564
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default XEN Linux VPS reclaim or recover memory when a guest domain 0 is shutdown

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. However you can free that memory too using virsh or xm command.

The xm program is the main interface for managing Xen guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains, enable or pin VCPUs, and attach or detach virtual block devices.

The virsh program is the main interface for managing virsh guest domains. The program can be used to create, suspend, resume, save, and shutdown domains.

So if guest is using 128M use following command to reclaim memory:
Code:
xm mem-set 0 <memory-size>
For 128M, enter command:
Code:
xm mem-set 0 128
Above command force domain 0 to reclaim all of memory. Above will set the domain's used memory using the balloon driver. Because this operation requires cooperation from the domain operating system, there is no guarantee that it will succeed. Warning: there is no good way to know in advance how small of a mem-set will make a domain unstable and cause it to crash. Be very careful when using this command on running domains.
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Track last reboot / shutdown time on linux server sweta Linux software 1 07-16-2007 06:20 AM
Add or attach new virtual usb block device for Linux XEN guest VPS rockdalinux XEN 0 06-15-2007 09:31 PM
Linux shutdown computer specific time chiku Linux software 1 04-27-2007 04:53 PM
Howto: Linux recover lost partitions? chimu Linux software 2 07-11-2006 12:49 AM
Linux my laptop computer unable to power off when I shutdown cityblogger Linux software 1 07-05-2006 12:24 PM


All times are GMT +5.5. The time now is 01:15 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36