Should I create a file on Dom0 and assign it for a DomU for use as swap space or should I just overcommit my system RAM and have Dom0 handle all of the swap? What happens with swap space during a live move if I use a file per DomU. Does the move script copy the swap file over as well? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matthew Crocker wrote:> > Should I create a file on Dom0 and assign it for a DomU for use as > swap space or should I just overcommit my system RAM and have Dom0 > handle all of the swap? > > What happens with swap space during a live move if I use a file per > DomU. Does the move script copy the swap file over as well?If you do a live migration, it does indeed move the state. I like to use a separate swap partition oon DomU to ease bare metal restorations and off-line operations on DomU''s files. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Dec 28, 2007 at 08:44:11AM -0500, Matthew Crocker wrote:> > Should I create a file on Dom0 and assign it for a DomU for use as swap > space or should I just overcommit my system RAM and have Dom0 handle all of > the swap?There is no memory overcommit in Xen. -- lfr 0/0 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matthew Crocker wrote:> > Should I create a file on Dom0 and assign it for a DomU for use as > swap space or should I just overcommit my system RAM and have Dom0 > handle all of the swap?You can''t overcommit memory in XEN like in VMWare.> What happens with swap space during a live move if I use a file per > DomU. Does the move script copy the swap file over as well?Live move should copy all data disks, which inculdes swap. Jan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Luciano Rocha schreef:> On Fri, Dec 28, 2007 at 08:44:11AM -0500, Matthew Crocker wrote: >> Should I create a file on Dom0 and assign it for a DomU for use as swap >> space or should I just overcommit my system RAM and have Dom0 handle all of >> the swap? > > There is no memory overcommit in Xen.There is in Linux. And if you don''t believe it :) Try to do Bonnie++ in DomU, twice the amount of memory as Dom0, disable Swap on Dom0. And ''host'' the filesystem on NFS. Fun for everyone! Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Dec 28, 2007 at 03:43:37PM +0100, Stefan de Konink wrote:> Luciano Rocha schreef: > > On Fri, Dec 28, 2007 at 08:44:11AM -0500, Matthew Crocker wrote: > >> Should I create a file on Dom0 and assign it for a DomU for use as swap > >> space or should I just overcommit my system RAM and have Dom0 handle all > >> of the swap? > > There is no memory overcommit in Xen. > > There is in Linux.Eh? Linux runs under Xen, not the other way around. There is no sharing of memory between virtual machines under Xen. And no usage of any swap mechanism. How the virtual machines do their memory management, is up to them.> And if you don''t believe it :) Try to do Bonnie++ in > DomU, twice the amount of memory as Dom0, disable Swap on Dom0. And ''host'' > the filesystem on NFS. Fun for everyone!I know Linux has overcommit, but that example seems to be a case of cache thrashing. -- lfr 0/0 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Should I create a file on Dom0 and assign it for a DomU for use as > swap space or should I just overcommit my system RAM and have Dom0 > handle all of the swap?Guests have to do their own swapping, dom0 can''t do it for them. Under Xen you have to carve up the physical memory amongst virtual machines - each of them gets a "hard" allocation of physical memory. If you want them to be able to overcommit memory then you''ll need to configure them each to use swap. The fact that dom0 can''t overcommit domU memory and do swapping is a technical limitation of Xen, partly imposed by its design. However, the guests are arguably better placed to decide what memory is important to them and what memory they want to swap.> What happens with swap space during a live move if I use a file per > DomU. Does the move script copy the swap file over as well?I''ll follow this up in other mails... Cheers, Mrak -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Friday 28 December 2007, Jan Albrecht wrote:> > What happens with swap space during a live move if I use a file per > > DomU. Does the move script copy the swap file over as well? > > Live move should copy all data disks, which inculdes swap. >Nico Kadel-Garcia <nkadel@gmail.com> Wrote:> If you do a live migration, it does indeed move the state. I like to use > a separate swap partition oon DomU to ease bare metal restorations and > off-line operations on DomU''s files.The xm migrate command on its own doesn''t copy virtual disks, so neither swap nor data will automatically get migrated with the machine. I think it''s possible to configure disk migration using the external device migration scripts, but AFAIK it''s not enabled by default - am I wrong here? However, the domain''s configuration data is sent along with its memory state when the migration occurs, so if you configure appropriate network-accessible storage for swap and data VBDs then they can be transparently available at the destination machine without the guest knowing what''s just happened to it. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
but what if the data disk is accessed via AoE mounts (semi equivalent to NFS mounts) and the swap disk is in the host machine itself? since in this case, the data disk is considered as an "in host" disk, is it possible to avoid the migration of data disk, and make the xm live migrate remount the appropriate AoE block in the transferred machine? x Mark Williamson wrote:> On Friday 28 December 2007, Jan Albrecht wrote: > >>> What happens with swap space during a live move if I use a file per >>> DomU. Does the move script copy the swap file over as well? >>> >> Live move should copy all data disks, which inculdes swap. >> >> > > Nico Kadel-Garcia <nkadel@gmail.com> Wrote: > >> If you do a live migration, it does indeed move the state. I like to use >> a separate swap partition oon DomU to ease bare metal restorations and >> off-line operations on DomU''s files. >> > > The xm migrate command on its own doesn''t copy virtual disks, so neither swap > nor data will automatically get migrated with the machine. I think it''s > possible to configure disk migration using the external device migration > scripts, but AFAIK it''s not enabled by default - am I wrong here? > > However, the domain''s configuration data is sent along with its memory state > when the migration occurs, so if you configure appropriate network-accessible > storage for swap and data VBDs then they can be transparently available at > the destination machine without the guest knowing what''s just happened to it. > > Cheers, > Mark > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> but what if the data disk is accessed via AoE mounts (semi equivalent to > NFS mounts) and the swap disk is in the host machine itself? > since in this case, the data disk is considered as an "in host" disk, is > it possible to avoid the migration of data disk, and make the xm live > migrate remount the appropriate AoE block in the transferred machine?If the data disk is available by AoE at both the origin host and the destination host then it should be possible to knock up a script that will automatically plumb the AoE disk through to the guest when it arrives at its destination. But you still need to make sure the same swap volume is available at the other end too - for instance by using AoE. Otherwise if the guest tries to page something *in* from swap after migration it won''t be able to find it! Some folks have also experimented with maintaining a VBD image simultaneously on two hosts and using DRBD to keep them in sync. But right now, whatever you do, you need to make explicit arrangements for *all* VBDs seen by the guest to be available, unchanged after a migration. You can bend this rule in a number of ways but mostly it''s a pretty important guideline. Cheers, mark> > Mark Williamson wrote: > > On Friday 28 December 2007, Jan Albrecht wrote: > >>> What happens with swap space during a live move if I use a file per > >>> DomU. Does the move script copy the swap file over as well? > >> > >> Live move should copy all data disks, which inculdes swap. > > > > Nico Kadel-Garcia <nkadel@gmail.com> Wrote: > >> If you do a live migration, it does indeed move the state. I like to use > >> a separate swap partition oon DomU to ease bare metal restorations and > >> off-line operations on DomU''s files. > > > > The xm migrate command on its own doesn''t copy virtual disks, so neither > > swap nor data will automatically get migrated with the machine. I think > > it''s possible to configure disk migration using the external device > > migration scripts, but AFAIK it''s not enabled by default - am I wrong > > here? > > > > However, the domain''s configuration data is sent along with its memory > > state when the migration occurs, so if you configure appropriate > > network-accessible storage for swap and data VBDs then they can be > > transparently available at the destination machine without the guest > > knowing what''s just happened to it. > > > > Cheers, > > Mark-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users