Hello, I''m trying to set dom0 to 4G of memory. (Let me quickly say I don''t know if 4G of RAM for dom0 is good idea, but I thought I would try it, please advise otherwise) :) My system has 32Gig of memory. (Xeon''s with Debian 6.0.5) Here is my /etc/default/grub GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=4096M dom0_vcpus_pin" Here is my /etc/xen/xend-config.sxp [snip] # dom0-min-mem is the lowest permissible memory level (in MB) for dom0. # This is a minimum both for auto-ballooning (as enabled by # enable-dom0-ballooning below) and for xm mem-set when applied to dom0. (dom0-min-mem 196) # Whether to enable auto-ballooning of dom0 to allow domUs to be created. # If enable-dom0-ballooning = no, dom0 will never balloon out. (enable-dom0-ballooning no) # 32-bit paravirtual domains can only consume physical # memory below 168GB. On systems with memory beyond that address, # they''ll be confined to memory below 128GB. # Using total_available_memory (in GB) to specify the amount of memory reserved # in the memory pool exclusively for 32-bit paravirtual domains. # Additionally you should use dom0_mem = <-Value> as a parameter in # xen kernel to reserve the memory for 32-bit paravirtual domains, default # is "0" (0GB). (total_available_memory 0) # In SMP system, dom0 will use dom0-cpus # of CPUS # If dom0-cpus = 0, dom0 will take all cpus available (dom0-cpus 4) [snip] I''ve updated grub to populate /boot/grub/grub.cfg and then rebooted. It boots, and then I run top on my dom0 which shows this: Tasks: 153 total, 1 running, 152 sleeping, 0 stopped, 0 zombie Cpu(s): 0.1%us, 0.3%sy, 0.0%ni, 96.9%id, 1.8%wa, 0.0%hi, 0.0%si, 0.9%st Mem: 2267508k total, 1641848k used, 625660k free, 88140k buffers Swap: 0k total, 0k used, 0k free, 1279128k cached Why do I only have 2Gig of RAM? Here are my domU''s... root@xen:/etc/xen# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 2557 4 r----- 252.0 debian-central 1 1024 2 -b---- 22.2 debian-cms 2 4096 2 -b---- 186.7 debian-ldap 3 1024 2 -b---- 4.6 debian-ts 4 1024 2 -b---- 42.8 redhat-sdsweb 5 4096 4 -b---- 58.7 w2k3-awards 6 2048 2 -b---- 225.4 w2k3-sme 8 2048 2 -b---- 33.5 w2k8-sme 7 2048 2 -b---- 52.6 root@xen:/etc/xen# root@xen:/etc/xen# xm info host : xen.sd57.bc.ca release : 2.6.32-5-xen-amd64 version : #1 SMP Sun May 6 08:57:29 UTC 2012 machine : x86_64 nr_cpus : 24 nr_nodes : 2 cores_per_socket : 6 threads_per_core : 2 cpu_mhz : 2800 hw_caps : bfebfbff:2c100800:00000000:00001f40:029ee3ff:00000000:00000001:00000000 virt_caps : hvm hvm_directio total_memory : 32704 free_memory : 12115 node_to_cpu : node0:0,2,4,6,8,10,12,14,16,18,20,22 node1:1,3,5,7,9,11,13,15,17,19,21,23 node_to_memory : node0:2172 node1:9942 node_to_dma32_mem : node0:2172 node1:0 max_node_id : 1 xen_major : 4 xen_minor : 0 xen_extra : .1 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable xen_commandline : placeholder dom0_mem=4096M dom0_vcpus_pin cc_compiler : gcc version 4.4.5 (Debian 4.4.5-8) cc_compile_by : fw cc_compile_domain : deneb.enyo.de cc_compile_date : Thu Jun 21 06:41:09 UTC 2012 xend_config_format : 4 root@xen:/etc/xen# Thanks for your advice! Cheers, Mike _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Alexandre Kouznetsov
2012-Aug-03 16:02 UTC
Re: settinjg dom0 memory, where did I go wrong?
Hello. El 02/08/12 23:48, Michael Egglestone escribió:> Here is my /etc/default/grub > > /GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=4096M dom0_vcpus_pin"/ > [...] > I''ve updated grub to populate /boot/grub/grub.cfg and then rebooted.This two stepas are the only relevant ones to achieve the Dom0 memory restriction. While booting, you should have interacted with Grub, checking if the parameter dom0_mem is really present in the right place. There you would probably find that it is not. The variable used to set Dom0 memory is slightly different: GRUB_CMDLINE_XEN="dom0_mem=4032" Piece of advice: don''t set dom0_mem as "round" n*2^10. Subtract at least 64MB from it. Hypervisor itself need some RAM, some bit less than 64MB in Xen 4.0 case. So, after you assign, let''s say, 4032MB to Dom0 and another 64MB was eaten by hypervisor, you may consider you have "(your total RAM) - 4GB" free, available for DomU''s, round 28GB in your case. Otherwise, you would have available "(your total RAM) - 4GB - (little more piece)", which will left with a "not round" amount of available RAM, near 27.94 GB in your case. This is far from being mandatory, but brings simplicity to estimations and some bit of esthetics. -- Alexandre Kouznetsov
Alexandre Kouznetsov
2012-Aug-03 20:36 UTC
Re: settinjg dom0 memory, where did I go wrong?
Hi. El 03/08/12 12:40, Michael Egglestone escribió:> It appears my system could fall into this link: > > http://blog.xen.org/index.php/2012/04/30/do%EF%BB%BFm0-memory-where-it-has-not-gone/Silly me, I have not payed enough attention to the description of the problem you made, sorry. That''s new for me that GRUB_CMDLINE_XEN_DEFAULT and GRUB_CMDLINE_XEN turned to be synonyms. Checked the scripts, they are. -- Alexandre Kouznetsov