I have a system with 2 quad core CPUs running Xen on CentOS 5.1 64-bit. The kernel sees this system as having 8 CPUs. If I were to create 6 domUs, what would be the best way to allocate the CPUs to get best CPU and IO performance? Should all CPUs be allocated to all domU and let the system allocate as it sees fit or would the system perform better if each domU is restricted to fewer CPUs? Each domU is running a custom Java application that utilizes MySQL heavily. Application is heavily threaded. Thanks for any comment. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Itamar - IspBrasil
2008-Apr-24 21:56 UTC
Re: [Xen-users] best way to optimize use of CPU and IO
put mysql on another machine. Fong Vang wrote:> I have a system with 2 quad core CPUs running Xen on CentOS 5.1 > 64-bit. The kernel sees this system as having 8 CPUs. If I were to > create 6 domUs, what would be the best way to allocate the CPUs to get > best CPU and IO performance? Should all CPUs be allocated to all domU > and let the system allocate as it sees fit or would the system perform > better if each domU is restricted to fewer CPUs? > > Each domU is running a custom Java application that utilizes MySQL > heavily. Application is heavily threaded. > > Thanks for any comment. > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-25 02:51 UTC
RE: [Xen-users] best way to optimize use of CPU and IO
Itamar - IspBrasil wrote:> Fong Vang wrote: > > I have a system with 2 quad core CPUs running Xen on CentOS 5.1 > > 64-bit. The kernel sees this system as having 8 CPUs. If I were to > > create 6 domUs, what would be the best way to allocate the CPUs to get > > best CPU and IO performance? Should all CPUs be allocated to all domU > > and let the system allocate as it sees fit or would the system perform > > better if each domU is restricted to fewer CPUs? > > > > Each domU is running a custom Java application that utilizes MySQL > > heavily. Application is heavily threaded. > > put mysql on another machine.I do not understand how you can blindly say that. You don''t know the type of CPUs, the amount of memory, or the type of storage the OP is using, so there is no qualification to say that. Jeez If anything, in the end it will probably be the Java engine that may need it''s own sandbox to play in. You could setup 8 separate MySQL read instances and load balance well under Xen. Java... well that''s another story. You need to allocate the number of CPUs based on the application and how your processors react to the Xen scheduler. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2008-Apr-25 03:18 UTC
Re: [Xen-users] best way to optimize use of CPU and IO
Fong Vang wrote:> I have a system with 2 quad core CPUs running Xen on CentOS 5.1 > 64-bit. The kernel sees this system as having 8 CPUs. If I were to > create 6 domUs, what would be the best way to allocate the CPUs to get > best CPU and IO performance? Should all CPUs be allocated to all domU > and let the system allocate as it sees fit or would the system perform > better if each domU is restricted to fewer CPUs? > > Each domU is running a custom Java application that utilizes MySQL > heavily. Application is heavily threaded. >As a rule of thumb, performance-wise, virtualization is best when you have under-utilized systems. Meaning, you''ll need to know the load characteristic of each domU. Not-so-busy systems can be grouped togethere, while busy systems might be better of on a separate physical system. Since dom0 handles actual disk/network I/O, you should give it a dedicated core/cpu. A somewhat simple way to get domU load : - set each domU to have 1 cpu, each on different dom0 physical cpu (use vcpus and cpus on xen config file) - limit dom0 to use only the CPU that domU doesn''t use (xm vcpu-set, xm vcpu-pin) - put each domU''s disk on LVM on dom0. - run all domU - use "xm top", you''ll get CPU and block device read/writes per domU - use "iostat -x", you''ll get disk usage rate of each LV depending on the result, you might need to move some domUs to a separate server, assign some domUs more CPUs than others, or have several domUs share a single CPU. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thank you the advice. I''ll try them out. in xentop, what do the numbers in the VBD number represent? What units are they in (blocks?)? On Thu, Apr 24, 2008 at 8:18 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> Fong Vang wrote: > >> I have a system with 2 quad core CPUs running Xen on CentOS 5.1 64-bit. >> The kernel sees this system as having 8 CPUs. If I were to create 6 domUs, >> what would be the best way to allocate the CPUs to get best CPU and IO >> performance? Should all CPUs be allocated to all domU and let the system >> allocate as it sees fit or would the system perform better if each domU is >> restricted to fewer CPUs? >> >> Each domU is running a custom Java application that utilizes MySQL >> heavily. Application is heavily threaded. >> > > As a rule of thumb, performance-wise, virtualization is best when you have > under-utilized systems. Meaning, you''ll need to know the load characteristic > of each domU. Not-so-busy systems can be grouped togethere, while busy > systems might be better of on a separate physical system. Since dom0 handles > actual disk/network I/O, you should give it a dedicated core/cpu. > > A somewhat simple way to get domU load : > - set each domU to have 1 cpu, each on different dom0 physical cpu (use > vcpus and cpus on xen config file) > - limit dom0 to use only the CPU that domU doesn''t use (xm vcpu-set, xm > vcpu-pin) > - put each domU''s disk on LVM on dom0. > - run all domU > - use "xm top", you''ll get CPU and block device read/writes per domU > - use "iostat -x", you''ll get disk usage rate of each LV > > depending on the result, you might need to move some domUs to a separate > server, assign some domUs more CPUs than others, or have several domUs share > a single CPU. > > Regards, > > Fajar > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2008-Apr-28 03:40 UTC
Re: [Xen-users] best way to optimize use of CPU and IO
Fong Vang wrote:> Thank you the advice. I''ll try them out. > > in xentop, what do the numbers in the VBD number represent? What > units are they in (blocks?)?The best documentation that I can find about it is on xentop.c source file, and I believe the unit is requests. A more informative output would be from iostat, where you get the stats as sectors/s or request/s. You could also take a look at /proc/diskstats, if you want. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users