Hello! I have 2quad xeon server where I run as domu one windows terminal server and one database server. I whant to set most power to terminal server, is it good to make more vcpu than physical processors or there is another way? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Mar 25, 2009 at 11:07 PM, Vladislav Karpenko <vladislav@karpenko.od.ua> wrote:> is it > good to make more vcpu than physical processorsNo. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
25 марта 2009, в 18:13, Fajar A. Nugraha написал(а):> On Wed, Mar 25, 2009 at 11:07 PM, Vladislav Karpenko > <vladislav@karpenko.od.ua> wrote: >> is it >> good to make more vcpu than physical processors > > No.Thank u, but how many vcpus must be totaly asigned to domus if i have 8 cores? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2009/3/25 Vladislav Karpenko <vladislav@karpenko.od.ua>:>>> is it >>> good to make more vcpu than physical processors >> >> No. > > > Thank u, but how many vcpus must be totaly asigned to domus if i have 8 > cores?Depends on what you need, actually. In my case I always dedicate one core (core 0) to dom0, plus limit its initial memory usage. This is done using grub.conf like this (see dom0_mem and dom0_vcpus_pin) #========================title Red Hat Enterprise Linux Server (2.6.18-128.1.1.el5xen) root (hd0,0) kernel /xen.gz-3.3.1 com1=115200,8n1 console=vga,com1 dom0_mem=512M dom0_vcpus_pin module /vmlinuz-2.6.18-128.1.1.el5xen ro root=/dev/rootVG/rootLV rhgb quiet console=vga console=ttyS0 module /initrd-2.6.18-128.1.1.el5xen.img #======================== and these settings on /etc/xen/xend-config.sxp #========================(dom0-min-mem 256) (dom0-cpus 1) #======================== combined, both settings ensure that dom0 only uses 256-512MB memory, plus it only uses cpu0. On all domU config I use something like this (relevant cpu settings for windows HVM) vcpus=1 cpus="1-7" cpu_cap=100 cpu_weight=128 it means I only use 1 vcpu, and it can be in cpu 1-7 (thus leaving cpu0 for dom0 exclusive usage). This ensures dom0 can handle disk and network requests for domUs at all times. If you want to give some domU priority over another, adjust cpu_weight as necessary. Note that on Windows HVM you probably need GPLPV to have a usable performance. However when using GPLPV, I/O throughput with vcpus >1 is lower when compared to vcpus=1 (although it''s still MUCH higher compared to emulated QEMU drivers). So you see, adding vcpu does not always mean higher performance. You need to experiment and see which settings suit you best. Probably vcpus=1 for db server and vcpus=6 for terminal server (that is assuming your windows version can handle 6 cpus). Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Fajar And BTW, are these domU HVM settings also applicable to a PV domU? Cheers, Nuno Fajar A. Nugraha wrote:> On all domU config I use something like this > (relevant cpu settings for windows HVM) > > vcpus=1 > cpus="1-7" > cpu_cap=100 > cpu_weight=128 > > it means I only use 1 vcpu, and it can be in cpu 1-7 (thus leaving > cpu0 for dom0 exclusive usage). This ensures dom0 can handle disk and > network requests for domUs at all times. > > If you want to give some domU priority over another, adjust cpu_weight > as necessary. > > Note that on Windows HVM you probably need GPLPV to have a usable > performance. However when using GPLPV, I/O throughput with vcpus >1 > is lower when compared to vcpus=1 (although it''s still MUCH higher > compared to emulated QEMU drivers). So you see, adding vcpu does not > always mean higher performance. > > You need to experiment and see which settings suit you best. Probably > vcpus=1 for db server and vcpus=6 for terminal server (that is > assuming your windows version can handle 6 cpus). > > Regards, > > Fajar > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- =============================================Nuno Ricardo Santos Loureiro da Silva Ferreira NMR Spectroscopy Research Group Bijvoet Center for Biomolecular Research Utrecht University Bloembergen gebouw Padualaan 8, 3584 CH Utrecht The Netherlands P: +31.(0)30.253 9932 F: +31.(0)30.253 2652 E: n.l.ferreira@uu.nl W: http://nmr.chem.uu.nl ============================================= _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Mar 26, 2009 at 1:13 AM, Ferreira, N. L. (Nuno) <n.l.ferreira@uu.nl> wrote:> Hi Fajar > > And BTW, are these domU HVM settings also applicable to a PV domU? > Cheers, > NunoYes. PV domU also supports memory and cpu hotplug (at least xenified ones like Redhat''s kernel-xen does, but pv_ops kernel like 2.6.28 don''t have it yet). Because of that I like use another setting, so now it looks like this: #==============memory = "500" maxmem = "8000" vcpus=8 vcpu_avail=1 cpus="1-7" #============== note maxmem and vcpu_avail. With those settings domU starts with one vcpu and 500MB memory, but I can grow it online up to 8 vcpu and 8 GB. You can still put cpu_cap and cpu_weight there if you want. Support for vcpu_avail and cpu_cap is kinda new, so check whether you have it with "xm create --help_config". I''m using Xen 3.3.1 which supports them. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dear Fajar A. Nugraha please comment my mind: so as i understand: 1. If i have only one domU and make 2 configs for it with vcpu=1 and vcpu 8, the domu will have same perfomance, yes? 2. if i have 2 domu, one with vcpu=4 and second with vcpu=1, they will have same perfomance if one of them is idle, and half of perfomance if they are both loaded? 3. the only way to limit load is cpu_cap and for QOS is cpu_weight? 3. May be you mistake with:> In theory you can have something like a domU with vcpu=7 (note that > dom0 should have it''s own dedicated core), cpu_weight=65000, and > cpu_cap=1, which should create a high-priority (cpu-wise) 7-way system > whose total performance equals to that of one cpu. It could be handy > for testing multi-threaded application to see how it performs in a > fast CPU vs many slow CPUs.cpu_cap=1 - the system will have only 1% of 1 cpu power, may be mast be cpu_cap=x*100 (x is a number of cpu for domu) for high-priority (cpu-wise) %x-way system ThankU!!! PS sorry for my english 26 ÍÁÒÔÁ 2009, × 00:53, Fajar A. Nugraha ÎÁÐÉÓÁÌ(Á):> 2009/3/26 Vladislav Karpenko <vladislav@karpenko.od.ua>: >> So there is two ways for domu cpu management vcpu and cpu_weight, >> what is >> the difference? > > Three actually, with cpu_weight. > http://wiki.xensource.com/xenwiki/CreditScheduler > > vcpu is the number of cpu on domU. If you have lots of cores and small > number of domUs, you might want to put each on a dedicated core (which > is similar to how Sun''s LDOM work). > > cpu_weight determines which domain will get higher priority when > fighting over the same cpu, while cpu_cap is max amount of cpu > resource it can use. > > In theory you can have something like a domU with vcpu=7 (note that > dom0 should have it''s own dedicated core), cpu_weight=65000, and > cpu_cap=1, which should create a high-priority (cpu-wise) 7-way system > whose total performance equals to that of one cpu. It could be handy > for testing multi-threaded application to see how it performs in a > fast CPU vs many slow CPUs. > > Don''t forget to check whether your xen version supports cpu_cap with > "xm create --help_config | grep cpu" > > Regards, > > Fajar_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Mar 26, 2009 at 7:49 PM, Vladislav Karpenko <vladislav@karpenko.od.ua> wrote:> 1. If i have only one domU and make 2 configs for it with vcpu=1 and vcpu 8, > the domu will have same perfomance, yes?Depends. In an oversimplified scenario where only CPU matters, then : On a single core server : depending on the type of load, vcpus=8 will be slower. Performance-wise, you should not create a domU with more vcpus than available physical core. On 8-core (or more) server : depending on the type of load, vcpus=8 will be much faster. A special case is when on 8-core server and you set "cpu_cap=100" (or less) on both domUs. In theory, they will have the same performance. Again, this is only true if your xen version supports cpu_cap.> 2. if i have 2 domu, one with vcpu=4 and second with vcpu=1, they will have > same perfomance if one of them is idle, and half of perfomance if they are > both loaded?No, see above. If both domUs have the same vcpus, cpu_weight, and cpu_cap, then the answer is yes.> > 3. the only way to limit load is cpu_cap and for QOS is cpu_weight?vcpus and cpu_cap can limit cpu load. Note that there are other factors that can affect system load, one of the them is disk I/O.> > 3. May be you mistake with: > >> In theory you can have something like a domU with vcpu=7 (note that >> dom0 should have it''s own dedicated core), cpu_weight=65000, and >> cpu_cap=1, which should create a high-priority (cpu-wise) 7-way system >> whose total performance equals to that of one cpu. It could be handy >> for testing multi-threaded application to see how it performs in a >> fast CPU vs many slow CPUs. > > > cpu_cap=1 - the system will have only 1% of 1 cpu power, may be mast be > cpu_cap=x*100 (x is a number of cpu for domu) for high-priority (cpu-wise) > %x-way systemYou''re half right :) To emulate a SMP system whose performance equal to one CPU, cpu_cap should be 100. Note that this is just an example to demonstrate vcpu vs cpu_cap. For practical usage in your setup (you have 8 core system, right?) You can simply : - assign core 0 to dom0 - set domUs to use core 1-7 - distribute the load using vcpus, with each domU uses 7 or less vcpus. For example : db -> vcpus=1, terminal server -> vcpus=6 That should give most performance. If the total number of vcpus (on dom0 and domUs) are greater than available physical cores, then you may want to start playing with cpu_weight and cpu_cap. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
ok so if I want to make 3 domU: Terminal, Database, Mail on 8 core system Terminal mast have 6 vcpus on demand with max priority, database and mail 1 vcpu each with minimum 1 core for both and max 2 cores for both (if Terminal is Idle, for better perfomence mail and database) configs mast be: Terminal: vcpus=6 cpus=''1-7'' #0-core dom0 cpu_weight=65000 cpu_cap=600 Database/Mail is vcpus=1 cpus=''1-7'' #0-core dom0 cpu_weight=256 cpu_cap=100 is it ok or may be better (for perfomence loss) do easier: Terminal: vcpus=6 cpus=''1-6'' cpu_weight=65000 #cpu_cap=600 Database/Mail is vcpus=1 cpus=''7'' cpu_weight=256 cpu_cap=70 # for do not make domu to zero cpu if it idle ???? 26 ÍÁÒÔÁ 2009, × 15:31, Fajar A. Nugraha ÎÁÐÉÓÁÌ(Á):> On Thu, Mar 26, 2009 at 7:49 PM, Vladislav Karpenko > <vladislav@karpenko.od.ua> wrote: >> 1. If i have only one domU and make 2 configs for it with vcpu=1 >> and vcpu 8, >> the domu will have same perfomance, yes? > > Depends. In an oversimplified scenario where only CPU matters, then : > > On a single core server : depending on the type of load, vcpus=8 > will be slower. > Performance-wise, you should not create a domU with more vcpus than > available physical core. > > On 8-core (or more) server : depending on the type of load, vcpus=8 > will be much faster. > > A special case is when on 8-core server and you set "cpu_cap=100" (or > less) on both domUs. In theory, they will have the same performance. > Again, this is only true if your xen version supports cpu_cap. > >> 2. if i have 2 domu, one with vcpu=4 and second with vcpu=1, they >> will have >> same perfomance if one of them is idle, and half of perfomance if >> they are >> both loaded? > > No, see above. > If both domUs have the same vcpus, cpu_weight, and cpu_cap, then the > answer is yes. > >> >> 3. the only way to limit load is cpu_cap and for QOS is cpu_weight? > > vcpus and cpu_cap can limit cpu load. > Note that there are other factors that can affect system load, one of > the them is disk I/O. > >> >> 3. May be you mistake with: >> >>> In theory you can have something like a domU with vcpu=7 (note that >>> dom0 should have it''s own dedicated core), cpu_weight=65000, and >>> cpu_cap=1, which should create a high-priority (cpu-wise) 7-way >>> system >>> whose total performance equals to that of one cpu. It could be handy >>> for testing multi-threaded application to see how it performs in a >>> fast CPU vs many slow CPUs. >> >> >> cpu_cap=1 - the system will have only 1% of 1 cpu power, may be >> mast be >> cpu_cap=x*100 (x is a number of cpu for domu) for high-priority >> (cpu-wise) >> %x-way system > > You''re half right :) > To emulate a SMP system whose performance equal to one CPU, cpu_cap > should be 100. > Note that this is just an example to demonstrate vcpu vs cpu_cap. > > For practical usage in your setup (you have 8 core system, right?) You > can simply : > - assign core 0 to dom0 > - set domUs to use core 1-7 > - distribute the load using vcpus, with each domU uses 7 or less > vcpus. For example : db -> vcpus=1, terminal server -> vcpus=6 > > That should give most performance. > If the total number of vcpus (on dom0 and domUs) are greater than > available physical cores, then you may want to start playing with > cpu_weight and cpu_cap. > > Regards, > > Fajar_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2009/3/26 Vladislav Karpenko <vladislav@karpenko.od.ua>:> ok so if I want to make 3 domU: Terminal, Database, Mail on 8 core system > > Terminal mast have 6 vcpus on demand with max priority, database and mail 1 > vcpu each with minimum 1 core for both and max 2 cores for both (if Terminal > is Idle, for better perfomence mail and database) > configs mast be:Do some experiments to find a setup that works best for you.> > Terminal: > vcpus=6 > cpus=''1-7'' #0-core dom0 > cpu_weight=65000 > cpu_cap=600 > > Database/Mail is > vcpus=1 > cpus=''1-7'' #0-core dom0 > cpu_weight=256 > cpu_cap=100 >That config would essentiallay mean that 6 core would be almost dedicated (due to very high cpu_weight) to terminal server. This means that under high load dom0 will use one core (if you pin and limit dom0 CPU like I do), terminal server will occupy 6 cores, and 1 core is shared between database/mail. If this is what you want then above config is correct. cpu_cap lines are somewhat useless in the above since you set it to 100*vcpus. Its effect would only show when set to less than 100*vcpus. It''s good for readability purposes though (which is why I put it explicitly, to easily compare between one domU config to another). IMHO cpu_cap serves its purpose best on a hosting environment, where (for example) on low-cost packages you set it to something like 20 or 50 to emulate lower CPU speed.> is it ok or may be better (for perfomence loss) do easier: > > Terminal: > vcpus=6 > cpus=''1-6'' > cpu_weight=65000 > #cpu_cap=600 > > Database/Mail is > vcpus=1 > cpus=''7'' > cpu_weight=256 > cpu_cap=70 # for do not make domu to zero cpu if it idle ???? >This config would essentially do the same thing as the above one since you set cpu_weight on terminal server very high (the main difference would be which cpu/core actually running the domU). I don''t understand your comment on cpu_cap though. cpu_cap=70 on a 2GHz CPU roughly means you''ll get the performance of a 1.4 GHz CPU. Is this what you want? Another note on cpu assignment. If your domU load is similar at all times (for example, all domUs has highest load at 2 pm every day) then it might be best to give each domU its own core (like what you did for terminal server on second config). On the other hand if domUs have different times for high load (for example, one has highest load every Monday while the other has highest load every Tuesday) then it might be better (in terms of maximizing resource utilization) to assign all available core to all domU (in your case vcpus=7) and let Xen pick which physical core to use dynamically. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Mar 26, 2009 at 10:26 PM, Vladislav Karpenko <vladislav@karpenko.od.ua> wrote:>>> Terminal: >>> vcpus=6 >>> cpus=''1-7'' #0-core dom0 >>> cpu_weight=65000 >>> cpu_cap=600 >>> >>> Database/Mail is >>> vcpus=1 >>> cpus=''1-7'' #0-core dom0 >>> cpu_weight=256 >>> cpu_cap=100 >>> >> >> That config would essentiallay mean that 6 core would be almost >> dedicated (due to very high cpu_weight) to terminal server. This means >> that under high load dom0 will use one core (if you pin and limit dom0 >> CPU like I do), terminal server will occupy 6 cores, and 1 core is >> shared between database/mail. If this is what you want then above >> config is correct. > > But if Terminal server is idle and have some piece of cpu resources could > other domu use this piece with that config?Yes, since you set all to use same physical cpus/core (1-7). However due to high cpu_weight don''t be surprised if you see terminal server dominates those 6 cores (since in Windows it''s quite common to have almost-constant high cpu load without you knowing why, but that''s another issue), so that the other domUs can only fight over one core.> cpu=100 means that rest of domu can load max one core from pool per domUcpu_cap=100 means that particular domU can have a maximum total load equivalent to one physical CPU. The default setting is 0 (which means unlimited), but if you allocate only 1 vcpu then specifiying cpu_cap=0, or cpu_cap=100, or not specify it at all will have the same effect. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users