I was hoping someone could help me understand how the memory is allocated in XEN. I have 147GB of ram in each server but doing the math of what we should be able to achieve for VM''s and what we actually get is a different story. All of our VM''S are Windows based and assigned 512 MB with the ability to go up to 1024 MB. I do have memory ballooning turned but not allocating a fixed amount of ram to the DOMU on the bootloader. I seem to be maxing out at 39 to 40 machines and then performance is horrible and it appears I may be out of ram. So I was hoping someone could explain how memory works and where it is allocated out so I can better understand where it is going and fix my math or at least point me to document that explains memory allocation. Thanks in advance Joe _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Feb 15, 2010 at 11:42 PM, Joseph Coleman <joe.coleman@infinitecampus.com> wrote:> All of our VM’S are Windows based and assigned 512 MB with the ability to > go up to 1024 MB.Can HVM domUs balloon up memory? Not the last time I check. Have you tried it?> I seem to be maxing out > at 39 to 40 machines and then performance is horrible and it appears I may > be out of ram.And how did you determine they are out of ram? I''m more inclined to think that disk I/O is your problem. Try "iostat -mx 3" on dom0. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I have a windows 7 vm running under xen and I installed the gplpv drivers installed. Gplpv_vista2008x64_0.10.0.142 is what I installed because I was getting an error when I tried to install the .188 version. How do I know if Windows is actually using the gplpv drivers? The documentation mentioned something about modifying the boot.ini file but W7 doesn''t have a boot.ini file. TIA _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Here is the disk stats avg-cpu: %user %nice %system %iowait %steal %idle 1.13 0.00 0.21 0.06 0.04 98.58 Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdb 0.00 38.33 0.00 25.33 0.00 0.23 18.53 0.12 4.16 0.58 1.47 sdb1 0.00 38.33 0.00 25.33 0.00 0.23 18.53 0.12 4.16 0.58 1.47 avg-cpu: %user %nice %system %iowait %steal %idle 1.15 0.00 0.18 0.60 0.04 98.02 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 sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda2 0.00 9.30 0.00 18.27 0.00 0.11 12.22 1.52 83.13 2.84 5.18 sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdb 0.00 19.93 1.33 22.26 0.00 0.19 17.24 0.85 36.68 2.70 6.38 sdb1 0.00 19.93 1.00 22.26 0.00 0.19 17.49 0.85 37.20 2.74 6.38 sdb1 is the iSCSI volume. I used the free -o -m command to show that memory was consumed at the point. Now it is possible the vm''s could have started paging and that causes the performance problem I saw. But either way I really just need to understand how the memory assignment /allocation works in Xen so I can determine where my memory is going. Because with my math I should be getting more that 40 machines on a server with 147GB of ram 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? 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:~ # 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 -----Original Message----- From: Fajar A. Nugraha [mailto:fajar@fajar.net] Sent: Monday, February 15, 2010 11:25 AM To: Joseph Coleman Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Memory Allocation On Mon, Feb 15, 2010 at 11:42 PM, Joseph Coleman <joe.coleman@infinitecampus.com> wrote:> All of our VM''S are Windows based and assigned 512 MB with the ability to > go up to 1024 MB.Can HVM domUs balloon up memory? Not the last time I check. Have you tried it?> I seem to be maxing out > at 39 to 40 machines and then performance is horrible and it appears I may > be out of ram.And how did you determine they are out of ram? I''m more inclined to think that disk I/O is your problem. Try "iostat -mx 3" on dom0. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Feb 16, 2010 at 12:45 AM, John Smith <slash5bmw@gmail.com> wrote:> How do I know if Windows is actually using the gplpv drivers?Go to device manager, look for NIC and scsi controller, see what driver they use.> The > documentation mentioned something about modifying the boot.ini file but W7 > doesn''t have a boot.ini file.boot.ini is for XP/2003. vista/2008/W7 uses bcdedit. Since it''s x64 I suppose you already enable testsigning? If yes, then GPLPV should be enabled by default. You can use bcdedit to add a second boot entry with NOGPLPV load option that will disable GPLPV. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Feb 16, 2010 at 1:11 AM, Joseph Coleman <joe.coleman@infinitecampus.com> 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.38Disk 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 @ 2394MHzThat 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''sperspective 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@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Feb 15, 2010 at 12:25 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Mon, Feb 15, 2010 at 11:42 PM, Joseph Coleman > <joe.coleman@infinitecampus.com> wrote: >> All of our VM’S are Windows based and assigned 512 MB with the ability to >> go up to 1024 MB. > > Can HVM domUs balloon up memory? Not the last time I check. Have you tried it?The xcp windows pv drivers support memory ballooning. Keith Coleman _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thx Fajar. I did see some entries for pv drivers. Yes, Windows 7 is in Test Mode. Should there be a GPLPV driver for the mouse or pointer devices? I would like the mouse to be a bit faster if possible. I''ve attached a screen shot. Thx again. -----Original Message----- From: Fajar A. Nugraha [mailto:fajar@fajar.net] Sent: Monday, February 15, 2010 2:44 PM To: John Smith Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] installed gplpv drivers On Tue, Feb 16, 2010 at 12:45 AM, John Smith <slash5bmw@gmail.com> wrote:> How do I know if Windows is actually using the gplpv drivers?Go to device manager, look for NIC and scsi controller, see what driver they use.> The > documentation mentioned something about modifying the boot.ini file but W7 > doesn''t have a boot.ini file.boot.ini is for XP/2003. vista/2008/W7 uses bcdedit. Since it''s x64 I suppose you already enable testsigning? If yes, then GPLPV should be enabled by default. You can use bcdedit to add a second boot entry with NOGPLPV load option that will disable GPLPV. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Feb 19, 2010 at 6:40 PM, John Smith <slash5bmw@gmail.com> wrote:> Should there be a GPLPV driver for the mouse or pointer devices?I dont think so.> I would like the mouse to be a bit faster if possible.I assume you access domU console directly using VNC? Adding usbdevice=''tablet'' to domU config might help. However, you''ll get much better display performance by using remote desktop directly to domU''s IP address. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jan Muhammad
2010-Feb-19 12:58 UTC
[Xen-users] Patch management using Xen--A Hypothetical Scenario!
Hi All, My aim is to simulate patch management via Xen virtual environment, to represent a real life use case scenario; as in real life environments it is difficult; before we apply patches on effected nodes, there''s great need to carefully apply those patches to make sure things don''t break or apply patches in a controlled fashion. Specifically in a situation such as "Cloud Computing" or "Compute Grids" where resources are in shared environment; for example (A hypothetical scenario...). In a joint Project called ENROLLER; Chris is a System admin; having different privileges to apply any "critical updates" related to OS having Sys admin role; John has different privileges such as Grid-Engineer to apply "ONLY Middlware or Shibbeloth-related(a middleware security tool)" patches (such as GSI or Globus patches); while Alice being a developer has the rights to apply patches related to "application software" e.g. ONLY Java or Browser related patches........ Can Xen be used in such a scenario with several images (domUs).... because in real life environments things might not work. How if I try to approach the "secure patch management" in the following manner (steps): 1. ''patch notification'' from Microsoft/Debian or Sun/Xen or Globus for any patch update [depends upon who should get these update notifications] 2. Get a list of All existing images (domU''s) on the system 3. Verify the integrity of the patch(such as checking digital signatures etc) 4. Identify which of the domU is effected and need to be patched 5. If there''s need then "pause" the domU i.e (image) and then apply the patch; else 6. Clone the image; and test patches on it before applying it to real domU Or 7. Live migrate the image to other domU or back up area in the dom0 [depending on who can migrate this domU] 8. Once patch is applied and things haven''t gone wrong (no side effects), then restart the domU 8. On successful or failure of patch application notify the sys admin via (dom0) 9. Sys admin in turn update the central Information base (any Data-Base e.g MySQL) for recent changes Off course all of the above steps would be in some automated fashion..... I''m interested in experimenting the above (these may be more or less); Can any one point me to any related tool/wiki/doc which can have a such use-case....? -Jan Muhammad _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thx Fajar. I''m actually running xen inside of centos 5.4. I created a Windows 7 VM and I''m logged directly into the centos machine. The mouse is definitely faster in Centos than in the Windows 7 VM. -----Original Message----- From: Fajar A. Nugraha [mailto:fajar@fajar.net] Sent: Friday, February 19, 2010 7:21 AM To: John Smith Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] installed gplpv drivers On Fri, Feb 19, 2010 at 6:40 PM, John Smith <slash5bmw@gmail.com> wrote:> Should there be a GPLPV driver for the mouse or pointer devices?I dont think so.> I would like the mouse to be a bit faster if possible.I assume you access domU console directly using VNC? Adding usbdevice=''tablet'' to domU config might help. However, you''ll get much better display performance by using remote desktop directly to domU''s IP address. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Feb 19, 2010 at 8:02 PM, John Smith <slash5bmw@gmail.com> wrote:> Thx Fajar. > I''m actually running xen inside of centos 5.4.virt-manager uses vnc to access domU console. Better set up remote desktop on Win7, and use that. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Feb-19 13:17 UTC
Re: [Xen-users] Patch management using Xen--A Hypothetical Scenario!
On Fri, Feb 19, 2010 at 7:58 PM, Jan Muhammad <janmuhd@yahoo.com> wrote:> > 1. ''patch notification'' from Microsoft/Debian or Sun/Xen or Globus for any > patch update [depends upon who should get these update notifications] > > 2. Get a list of All existing images (domU''s) on the system > > 3. Verify the integrity of the patch(such as checking digital signatures > etc) > > 4. Identify which of the domU is effected and need to be patched >those depends on the OS on domU. Xen has little to do with it.> 8. Once patch is applied and things haven''t gone wrong (no side effects), then restart the domUthis would require human verification> Off course all of the above steps would be in some automated > fashion........ which makes automated processing not possible. an easier approach would be to use snapshot/clone-capable storage, like zfs (in opensolaris dom0, or solaris/opensolaris NAS) or NetApp. Snapshot the domU storage before applying the patch. At least that way you can easily rollback if something goes wrong. You might also be interested in this: http://kerneltrap.org/Linux/LVM_Snapshot_Merging -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users