Search
Lori MacVittie - Two Different Socks
You are here: DevCentral > Weblogs

posted on Thursday, February 18, 2010 3:47 AM

Surprised? I was, but I shouldn’t have been.

capacity While working on other topics I ran across an interesting slide in a presentation given by Microsoft at TechEd Europe 2009 on virtualization and Exchange. Specifically the presenter called out the average 12% overhead incurred from the hypervisor on systems in internal testing. Intuitively it seems obvious that a hypervisor will incur overhead; it is, after all, an application that is executing and thus requires CPU, I/O, and RAM to perform its tasks. That led to me to wonder if there was more data on the overhead from other virtualization vendors.

I ended up reading an enlightening white paper from VMware on consolidation of web applications and virtualization in which it observes that multi-virtual configurations actually outperformed in terms of capacity and performance a server configured with a similar number of CPUs. Note that this is specifically for web applications, though I suspect that any TCP-heavy application would likely exhibit similar performance characteristics.

quotesAlthough virtualization overhead varies depending on the workload, the observed 16 percent performance degradation is an expected result when running the highly I/O‐intensive SPECweb2005 workload. But when we added the second processor, the performance difference between the two‐CPU native configuration and the virtual configuration that consisted of two virtual machines running in parallel quickly diminished to 9 percent. As we further increased the number of processors, the configuration using multiple virtual machines did not exhibit the scalability bottlenecks observed on the single native node, and the cumulative performance of the configuration with multiple virtual machines well exceeded the performance of a single native node.

-- “Consolidating Web Applications Using VMware Infrastructure” [PDF, VMware]

We know there’s overhead associated with the hypervisor. Fact. But what’s interesting here is that the overhead turns out to be irrelevant – at least in the case of web applications. What’s important is the initial degradation of performance and its subsequent improvement as additional virtual instances are added. We need to understand why that’s the case, because it has – or should have – an impact on our overall architectural strategy.


SCALE OUT VIRTUALLY for BEST RESULTS

image So why would multi-instances of a web server – virtual no less - scale better for performance than simply scaling out, i.e. adding more CPUs? If we look at typical performance patterns from really any TCP-connection oriented device or application, we see very similar behavior. Capacity of the device or application tends to have a steep growth curve that plateaus rather quickly and then remains somewhat constant. The associated performance pattern of such devices and applications tends to begin with very low latency and good response times, but gradually increases as capacity plateaus at or near capacity.

This pattern, with few aberrations, should be fairly recognizable to anyone who’s performed any kind of load or performance testing on a connection-oriented (TCP-based) solution. In fact, an obvious deviation from the pattern often indicates some sort of problem in the network or solution that needs to be addressed. Garbage collection processes in JavaEE application servers, for example, have traditionally been seen as regular inverse spikes in the overall number of TCP connections and CPU utilization on the host server coupled with an increase in response time as the CPU is completely utilized for a matter of microseconds while the process completes. The reason this is consistent across connection-oriented devices and applications is because they are connection oriented. Connections must be tracked, i.e. stored in memory, and subsequently accessed as messages flow across the connection. This requires RAM and, in some cases, I/O resources. As the number of connections grows, the “table” in which they are stored grows, thus increasing the amount of time necessary to “find” the connection as well as the associated resources. Too, the more connections the more serialization and locking that occurs and it is the serialization that is another primary bottleneck for the web server.

Hence, the more connections made to a given solution, the more its performance tends to degrade. image

Virtualization appears to actually address this issue by limiting connection capacity by limiting available resources. On the other hand, adding more CPU and RAM will lead to higher connection capacity and thus larger connection tables which leads to a higher degradation in performance due to the increase in serialization. Rather than simply adding CPUs it would be, from a performance standpoint, probably a better option to add another virtual instance – and another, as CPUs increase – to maintain consistent capacity and a predictable performance pattern.

You need to scale up the hardware capacity, but should scale out at the virtual and application layers to optimize efficiency of the resources and maintain the end-user experience. By load balancing across multiple, smaller, homogeneous server instances you also make capacity planning much simpler because you know exactly what the capacity for a given instance will be and can use that information to prepare in advance a plan for increasing capacity on-demand. Scaling up does not offer the same consistency because capacity will be highly dependent upon the CPU and RAM provisioned as well as load.


OPTIMAL STRATEGY for ADDRESSING SCALABILITY

When it comes time to scale an application, keep in mind that the decision to scale out or up has a direct impact on your ability to perform capacity planning and on performance. Predictable capacity with predictable performance is optimal as a baseline, and thus what’s required is a strategy that employs homogeneous (in terms of capacity) virtual servers as well as load balancing. As if you’re getting a bonus, it’s good to note that for optimizing operational costs associated a scaling out strategy, scaling out based on smaller, focused virtual servers will likely afford you the best return on investment you’ll get.

 quotesIT operations has to first trust the ability of cloud computing  models to scale up, on-demand, as per the literature. In order to maximize the benefits of cloud computing IT actually has to provision resources based on the lowest common denominator rather than trying to provision for highest peak demand, which runs contrary to everything IT operations knows as truth about provisioning a data center to ensure availability of applications around the clock.

-- To Take Advantage of Cloud Computing You Must Unlearn, Luke.

Even if you’re using only one physical server, you’ll probably want to employ a smaller, homogeneous virtualized approach to scaling out web applications. Test your application until you find the apex of its performance and capture then the CPU and RAM required at that point. Use these values to standardize your web application virtual machine specifications. Evaluate your current infrastructure, too, and determine if there are performance and efficiency tuning enhancements you can make to configurations, such as simply changing the load balancing algorithm on your Load balancer/application delivery controller.

Virtualization apparently has, in addition to making the life of system administrators a whole lot easier, shall we say some hidden benefits for web applications that make combining a strong application delivery strategy and architecture with virtualization a win-win for users and administrators alike. But just as you’ll need to “unlearn” to really take advantage of cloud computing, you’re probably going to have to “unlearn” to take advantage of virtualization in your own data center, too.


Related blogs & articles:

Follow me on Twitter    View Lori's profile on SlideShare  friendfeed icon_facebook

AddThis Feed Button Bookmark and Share



Feedback

2/18/2010 4:07 AM
Gravatar Yup, numbers are pretty much confirming that TCP-heavy applications show similar behavior as you mentioned.

There is a distinct advantage (in price/performance) to having N+M redundancy (where N > and M => 1) for load balancers/ADCs as well. Active/passive failover ADC configuration has limitations that can be overcome with active/active type of deployments with multiple active ADCs (many run 6 or so in a cluster).
Izzy
2/18/2010 4:43 AM
Gravatar This post was mentioned on Identica by lorimacvittie: Lots of Little Virtual Web Applications Scale Out Better than Scaling Up: http://tinyurl.com/ykcmunp
uberVU - social comments
10/6/2010 1:24 AM
Gravatar I've always liked Phorum, very flexible, developer friendly and not overly complicated. I hadn't realized that it was able to support multiple sites like that, so I will definitely try to use it more in the future.
Mainly what i'm looking for is a good e-commerce package, since that is what seems to be the most recommended "feature". Mainly, i've gut-wrenchingly had to deal with osCommerce because other people usually make the decisions before coming to me and it's free. My problems with osCommerce are common with many large-scale applications. What I mean by large-scale applications is the type of features that people/clients can refer to with one or a few words and require little modification, if any at all, like shopping carts, web forums, groupware/collaboration, weblog/CMS, web email, image galleries, etc... Regards.
web application development
10/14/2010 1:09 PM
Gravatar Single Point of Failure Is Not Just a Hardware Issue
Don MacVittie
11/24/2010 4:29 AM
Gravatar Yup, numbers are pretty much confirming That TCP-heavy applications show similar behavior as you mentioned.There is a distinct advantage (in price / performance) Having two N + M redundancy (wherefores N and M = 1) for load balancers / ADCS as well. Active / passive failover configuration ADC ha Limitation That Can ask overcome with active / active type of deployments with multiple active ADCS (Many run 6 or so in a cluster). This one af advantages of studying in a vocational school. We'll get a lesson about entrepreneurship for about 3 years. That's really good even it's just theory.
New Toy hauler trailers
1/2/2011 5:07 PM
Gravatar yup, don is right. it is not JUST a hardware issue, there are lot of possible factors to look at.
Lisa Alloju
2/1/2011 11:04 PM
Gravatar I agree with your post. But VMWare server is a resource hog too," For us, the most important part about using virtual servers is that it allows us to do server refreshes quite easily. Your posts are different from others which have unique contents. I really appreciate your work. Keep up posting new stuffs. Mobile Application
Aaron Schmidt

Let Me Know What You Think


Please use the form below if you have any comments, questions, or suggestions.

Title:
 
Name:
 
Email: (so we can show your gravatar)
Website:
Comment: Allowed tags: blockquote, a, strong, em, p, u, strike, super, sub, code
 
Please add 6 and 8 and type the answer here:

Blog Stats

Posts:979
Comments:1685
Stories:0
Trackbacks:583
  

Image Galleries

  

Application Delivery

  

Cloud Computing

  

Random

  

Security

  

Chat Catcher

82,243 Members in 102 Countries and Growing!

Join DevCentral Today!

About DevCentral

DevCentral has been a successful, thriving community for many years. We have always strived to bring you the best technical documentation, discussion forums, blogs, media and much more that we can.

So dive in, get familiar with DevCentral. We hope you like it, we hope it makes your job easier, and lets you get that much more power out of the community. To learn more, make sure to check out the Getting Started section. And if you have any problems, or think something could be easier to use, drop us a line to let us know.

Got It !

We've received your comment and transmitted it directly to DevCentral HQ.

Thanks for taking time to let us know what's on your mind. At DevCentral | Community Matters!

Get In Touch With Us

Have questions, suggestions or just want to get something off your chest?

Use our handy form below to Direct Connect with DevCentral Mission Control.

Send Us Feedback       or