Hi I have a server, Dual Opteron 265 (dual core), witch allow me to have 4 *virtual* CPUs. The server is dedicated to serving dynamic web page. I have 2 configurations in my mind: 1. I install one operating system; 2. I install Xen with 2 virtuals machines, each one with one cpu (dual core). I''m not an expert so I''d like to know what is the best setup to get the maximun of responsivness and speed from this server. Thank you Frank _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Frank, I''d say use Xen and create a guest for each core. I''m not sure what kind of web serving you''re doing (dynamic or otherwise), but it would take a lot to fill up ONE Opteron, much less two. You''ll max out the bandwidth first. With this in mind, I''d suggest creating the following domUs: one guest, dynamically generate a cache of static pages (assign two cores) two guests, each serving those static web pages, setup in round robin fashion via DNS (one core each) S On Aug 30, 2006, at 8:02 AM, François Levasseur wrote:> Hi > > I have a server, Dual Opteron 265 (dual core), witch allow me to > have 4 *virtual* CPUs. The server is dedicated to serving dynamic > web page. > > I have 2 configurations in my mind: > > 1. I install one operating system; > 2. I install Xen with 2 virtuals machines, each one with one cpu > (dual core). > > I''m not an expert so I''d like to know what is the best setup to get > the maximun of responsivness and speed from this server. > > Thank you > > Frank > > _______________________________________________ > 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
Ok I already have a memcached server, a static server (lighttpd), and a database server. I also have a load balancing server to distribute http requests. I have an opteron that is already fill up with dynamic http request (php, apache2-prefork). So I bought a new one, with 2 cpus dual core. I wonder if I''ll get more performance with Xen and two or four domUs? If so, why? On 8/30/06, Stephen Yum <steveyum@exactimage.com> wrote:> > Frank, > > I''d say use Xen and create a guest for each core. I''m not sure what > kind of web serving you''re doing (dynamic or otherwise), but it would > take a lot to fill up ONE Opteron, much less two. You''ll max out the > bandwidth first. > > With this in mind, I''d suggest creating the following domUs: > > one guest, dynamically generate a cache of static pages (assign two > cores) > two guests, each serving those static web pages, setup in round robin > fashion via DNS (one core each) > > S > > On Aug 30, 2006, at 8:02 AM, François Levasseur wrote: > > > Hi > > > > I have a server, Dual Opteron 265 (dual core), witch allow me to > > have 4 *virtual* CPUs. The server is dedicated to serving dynamic > > web page. > > > > I have 2 configurations in my mind: > > > > 1. I install one operating system; > > 2. I install Xen with 2 virtuals machines, each one with one cpu > > (dual core). > > > > I''m not an expert so I''d like to know what is the best setup to get > > the maximun of responsivness and speed from this server. > > > > Thank you > > > > Frank > > > > _______________________________________________ > > 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
I think you''d find your best performance just by breaking up LAMP, if thats the intended use of the rig :) Keeping mysql and Apache (or your web server of choice) on different dom-u''s means all services have easier times finding contiguous blocks of cache to take to keep more child servers active during peak load times. I''d actually create 3 guests, and just leave the scheduling at default 2 of them web servers, using a central SQL server, for a total of 3. You can also play around with scheduling later to tweak and learn. I try to keep everything that malloc()''s much more than it needs (like apache / mysql) on different dom-u''s, whenever possible. Another config would be use 2 guests, one for sql, one for everything else. ''Elbow room'' in cache is the idea, but having a failover for one (or both) would be ideal. HTH -Tim On Wed, 2006-08-30 at 11:02 -0400, François Levasseur wrote:> Hi > > I have a server, Dual Opteron 265 (dual core), witch allow me to have > 4 *virtual* CPUs. The server is dedicated to serving dynamic web page. > > I have 2 configurations in my mind: > > 1. I install one operating system; > 2. I install Xen with 2 virtuals machines, each one with one cpu (dual > core). > > I''m not an expert so I''d like to know what is the best setup to get > the maximun of responsivness and speed from this server. > > Thank you > > Frank > > _______________________________________________ > 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
On Wednesday 30 August 2006 16:02, François Levasseur wrote:> I have a server, Dual Opteron 265 (dual core), witch allow me to have 4 > *virtual* CPUs. The server is dedicated to serving dynamic web page.Do you have 2 CPU sockets? Each with a dual core Opteron in? If yes to both, you have 4 *real* CPUs. -- Mike Williams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi> I wonder if I''ll get more performance with Xen and two or four domUs? Ifso, why? Why do you think you will get any better performance with Xen than without? Xen is great for a lot of things, especially bundling multiple servers on one hardware. BUT Xen - as every other layer of software you use - will always take some performance. Xen is very lightweight for CPU usage and memory access, but actually slows down harddrive and network access. Depending on your usage maybe very little, maybe much. You can get tons of new possibilities using Xen at a very low penalty, but you will never get more performance.... Anybody disagree? But please argue. Regards, Steffen _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
CPU wont be your bottleneck, drive IO will be. Any time one of my DomU''s goes IO crazy, the rest of my DomU''s might as well be hammered. You can of course minimize that impact by using SCSI controllers or other IO devices that offload that work from your main CPU. Tim Post wrote:> I think you''d find your best performance just by breaking up LAMP, if > thats the intended use of the rig :) > > Keeping mysql and Apache (or your web server of choice) on different > dom-u''s means all services have easier times finding contiguous blocks > of cache to take to keep more child servers active during peak load > times. > > I''d actually create 3 guests, and just leave the scheduling at default > > 2 of them web servers, using a central SQL server, for a total of 3. > > You can also play around with scheduling later to tweak and learn. I try > to keep everything that malloc()''s much more than it needs (like > apache / mysql) on different dom-u''s, whenever possible. > > Another config would be use 2 guests, one for sql, one for everything > else. ''Elbow room'' in cache is the idea, but having a failover for one > (or both) would be ideal. > > HTH > > -Tim > > On Wed, 2006-08-30 at 11:02 -0400, François Levasseur wrote: > >> Hi >> >> I have a server, Dual Opteron 265 (dual core), witch allow me to have >> 4 *virtual* CPUs. The server is dedicated to serving dynamic web page. >> >> I have 2 configurations in my mind: >> >> 1. I install one operating system; >> 2. I install Xen with 2 virtuals machines, each one with one cpu (dual >> core). >> >> I''m not an expert so I''d like to know what is the best setup to get >> the maximun of responsivness and speed from this server. >> >> Thank you >> >> Frank >> >> _______________________________________________ >> 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 > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I don''nt have any IO bottleneck, the server will only server PHP pages that are cached with APC. CPU is clearly the bottleneck here. Well I appreciate your answers. It seens that Xen cannot help me here to get more performance from my hardware. Frank, On 8/31/06, Jason <fearthepenguin@jasonandjessi.com> wrote:> > CPU wont be your bottleneck, drive IO will be. Any time one of my > DomU''s goes IO crazy, the rest of my DomU''s might as well be hammered. > You can of course minimize that impact by using SCSI controllers or > other IO devices that offload that work from your main CPU. > > Tim Post wrote: > > I think you''d find your best performance just by breaking up LAMP, if > > thats the intended use of the rig :) > > > > Keeping mysql and Apache (or your web server of choice) on different > > dom-u''s means all services have easier times finding contiguous blocks > > of cache to take to keep more child servers active during peak load > > times. > > > > I''d actually create 3 guests, and just leave the scheduling at default > > > > 2 of them web servers, using a central SQL server, for a total of 3. > > > > You can also play around with scheduling later to tweak and learn. I try > > to keep everything that malloc()''s much more than it needs (like > > apache / mysql) on different dom-u''s, whenever possible. > > > > Another config would be use 2 guests, one for sql, one for everything > > else. ''Elbow room'' in cache is the idea, but having a failover for one > > (or both) would be ideal. > > > > HTH > > > > -Tim > > > > On Wed, 2006-08-30 at 11:02 -0400, François Levasseur wrote: > > > >> Hi > >> > >> I have a server, Dual Opteron 265 (dual core), witch allow me to have > >> 4 *virtual* CPUs. The server is dedicated to serving dynamic web page. > >> > >> I have 2 configurations in my mind: > >> > >> 1. I install one operating system; > >> 2. I install Xen with 2 virtuals machines, each one with one cpu (dual > >> core). > >> > >> I''m not an expert so I''d like to know what is the best setup to get > >> the maximun of responsivness and speed from this server. > >> > >> Thank you > >> > >> Frank > >> > >> _______________________________________________ > >> 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 > > > > > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, 31 Aug 2006, Jason wrote:> CPU wont be your bottleneck, drive IO will be. Any time one of my DomU''s > goes IO crazy, the rest of my DomU''s might as well be hammered. You can of > course minimize that impact by using SCSI controllers or other IO devices that > offload that work from your main CPU.CPU is unlikely to be your problem... which of course is what you opened with, but then suggest using hardware to offload the CPU ... huh? My suggestion is to use more (possibly smaller) drives and spread the load across the spindles... if you put each domU on a separate drive I doubt you will see much affect on the other domUs if one goes I/O bound... (of course if you''re using iSCSI, AOE, NFS, or other network storage, then you may hit network or CPU bottlenecks....) If you do, that''s a scheduling issue which should be solved shortly with the new scheduler. I/O bottle necks IMHO are one of the most common system problems. -Tom _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
The root of the problem is not enough contiguous cache to allow adequate # of child daemons to spawn and stay ready to meet demand. What happens is , on a typical linux server is this : Apache, MySQL (and usually a mailer) all fight running at the same priority to spawn / cache x # of child daemons. One, or all gets a surge in usage or abused .. and now there''s not enough contiguous blocks of cache for new children to live. So, mysql, apache, php (if using fastcgi) must now 1 - fork for every request 2 - swap (skid to disk) This is the cause of your I/O bottlenecks. Simply putting Apache and MySQL on different VM''s will eliminate most of the problem, because you are also eliminating the competition for contiguous space to cache. You can also try : Using something like spri, available at rfxnetworks.com to re-prioritize your process tree based on demands. This helps quite a bit. Build PHP sensibly. Typically its bloated at about 15 MB, you can normally get it down to as low as 3 - 5 MB in size with all functionality you need. Use FastCGI! Stop making everything fork each time (ahem, php hehe) Increase the # of idle HTTP and sql servers. ... etc .. etc. Breaking up your over-malloc()''ing daemons however is step 1, if you hope to get it under control. Then, you can look at what''s really causing I/O loads in your applications, without having to weed through what''s just dirty paging. Log your dirty* in slabinfo for a week, xen the machine, break up your services a bit then log it again. You''ll see a major improvement. HTH Tim On Thu, 2006-08-31 at 20:01 -0700, Tom Brown wrote:> On Thu, 31 Aug 2006, Jason wrote: > > > CPU wont be your bottleneck, drive IO will be. Any time one of my DomU''s > > goes IO crazy, the rest of my DomU''s might as well be hammered. You can of > > course minimize that impact by using SCSI controllers or other IO devices that > > offload that work from your main CPU. > > CPU is unlikely to be your problem... which of course is what you opened > with, but then suggest using hardware to offload the CPU ... huh? > > My suggestion is to use more (possibly smaller) drives and spread the load > across the spindles... if you put each domU on a separate drive I doubt > you will see much affect on the other domUs if one goes I/O bound... > > (of course if you''re using iSCSI, AOE, NFS, or other network storage, then > you may hit network or CPU bottlenecks....) > > If you do, that''s a scheduling issue which should be solved shortly with > the new scheduler. > > I/O bottle necks IMHO are one of the most common system problems. > > -Tom > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users