Application Virtualization and Performance Engineering

31 Jan

Lot of companies are using Virtualization technologies to deploy their application on virtual platform and there are many companies who are actually using these technologies in their production level environment. As a performance Engineer, I often get below questions from various people

    • Can we port our application on virtual platform with out degradation of performance?
    • What would be the impact of virtual platforms on response time of the application?
    • What would be the impact of the virtual platforms on throughput of the application?
    • Can I virtualize my processors?
    • Can we virtualize the memory or storage area?
    • Can I virtualize my desktop?

Lot of people are coming and asking these types of the questions in various groups/forums and to my surprise many expect the answers to be plain “Yes or No”. Most of them want a single line answers, which gives them some kind of confidence. So I thought let me share some of my thoughts with regard to performance engineering with regard to virtualization.

In order to understand as how virtualization influences the performance of the application, we need to understand as what are the factors on which Performance of the application depends and how these factors are related to virtualization technologies.

So let us first understand as what exactly the virtualization technology is and how it helps to reduce the costs of the IT Infrastructure,

Wikipedia describes it, as “Virtualization, in computing, is the creation of a virtual (rather than actual) version of something, such as a hardware platform, operating system, a storage device or network resources.

With Virtualization, technologies we can slice the hardware/software into the multiple partition so that resources can be used to the full extend. If we have, an application deployed on the platform and its infrastructure resources are not used maximum to its full potential. Then it is quite possible that we can virtualize it and use some portion of the physical resources for some other activity.

This will increase the ROI of the investment made and in case if we have hundreds of such boxes, then it will result in considerable saving across the organization.Almost all the major flavors of the Web Servers/Application Servers and Database Servers supports virtualization technologies. It offers lot of benefits to the organizations when implemented correctly after resolving some risks that come with it.

So let us see as how virtualization and performance are related closely to each other. Performance of the application depends on the following below physical factors,

1. Memory available to the application.

2. Number of Processors and Processor’s speed

3. Disk Performance

4. Network Speed

These are not exhaustive list but the general factors which we often take into consideration. There are also some other factors like GPI Resources etc. etc.

Performance of the application also depend on the application specific parameters and how it is designed or architected and some of the below general factors that can impact performance are as below,

1. Caching.

      •    How caching is implement and served. Is it client side cache or server side cache?

2. Database Design factors.

      •   How is database connection implemented?

3. Client presentation layer.

      •   This is most often called as View Layer and it should pick only the data which end-user needs to see.

4. JavaScript Optimization (For Enterprise Web application).

5. Images Optimization (For Enterprise Web Application).

6. Thread Management.

      • We need to understand as how threads are created/managed. What they are creating, consuming and how they are closing the resources?

7. Are the best practices for writing the code followed in the development process?

      • For the same task, writing code using for/switch/while/do loop consumes different amount of resources in terms of CPU cycle and memory.

8. How business layer is designed and implemented?

Let us call the application specific points as section B.

Therefore, when we decide to add Virtual layer on the top of the physical layer we are adding one more layer of complexity to environment. So the first section above now contains five elements that we need to deal with namely from environment perspective, memory. Processor, disk, network and virtual overhead.

Virtual overhead greatly depends on the application specific configuration areas. To understand the Virtual overheads one to analyze, study the application design architecture and see as how exactly the data flows happens. Below are some of the questions that help to understand the virtual overhead with regard to application,

1. Is the application CPU bound or Memory Bound?

2. How many reads per second is application doing on the Database side?

3. How many writes/update per second is happening on the database side?

4. How much of the code/module is being complied per second in the application server?

5. How many connections does the application open per second in the database?

6. How is client side rendering happening in the application?

7. How is the client side processing happening?

9. How much resources are consumed on the client and server side?

10. How much data flows across the wire in the single request for an application?

11. How many disk reads/Writes is application doing per second?

12. Is the application process bound or thread bound?

13. If process bound, how much memory does the process consume in the single similar session of the business process?

If you look at the above questions, it sounds like that each of the above questions in some way related to application design.However, we need to understand that with Virtual layer, Hypervisor will take care of all the above activity either by spawning the threads, which will consume memory/cpu and does disk IO for getting these tasks done. The virtual layer should manage all these resources by allocating them appropriate resources.

The answers to the above question will definitely give us reliable picture as what could be our virtual overhead. However, this is not the substitute for real performance testing. Therefore, I often suggest having at least two rounds of performance testing with and without virtual layer.

I also recommend having a complete performance monitoring solution in place while executing the tests so that we can benchmark the necessary resource consumptions used by the application.

Generally, I consider any application, which does read and write operation in Database as Memory Bound application since database transactions often require memory. Rendering or processing on business logic or client side viewing is considered as CPU bound application.

Maybe I will have a dedicated post on CPU and Memory bound application with examples to demonstrate.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: