Monday, June 30, 2014

Common Performance Engineering Misconceptions - Part 1



Mastering a performance testing tool is the ultimate goal

I thought of writing some articles about performance engineering old beliefs or misconceptions which drive you off road.  So this is my first part of the series, hence read carefully.

If I ask, what is the most vital part of the performance testing or engineering domain? I am pretty sure that most of the answers would be based on mastering a performance assessment tool. Yes, learning a tool rather mastering a tool is not that easy and it needs a lot of effort, no doubt about that. But unfortunately, according to my experience, the answer is too old :)
 
OK, now all of you are pointing the figures and ask what are you going to say? In my performance engineering carrier time line, I went through a lot of real time projects, customers, techniques, phases, various types of tools, methodologies and industry best practices. In this all situations, I realized that we have tons of things to know other than dealing with a tool or a tool suite.

So let’s discuss these things briefly:

Requirements:
When doing a performance assessment task, we need to know the entire background and characteristics of the application such as customer background, product domain, product technologies, critical scenarios, user base, shared resources, batch processes, environments, benchmarks and the competitors. If performance assessment is a building, this is the first brick of the construction. But this phase also differs if your application or the product is a well known one or internal application. Then requirements gathering section will be quite easy. Anyway, you need to put 100% to this phase because as I said earlier, this is the foundation of your entire assessment. The foundation is poor, poor output.

Technology Expertise:
In the above section, I have mentioned that we need to know things such as product technologies and environments. But this is not just know, we need to learn things thoroughly. During the last few years, I have realized that product performance engineering is very difficult and critical area that cannot be matched with other functional and  non-functional attributes such as Test automation, Security, Usability, etc. Because it is tightly coupled with application architecture and its technologies.

I will tell you why, say for an instance, if we need to automate tests for a particular product, main difficultly will be to capture the product objects (page objects) using our existing tools and add those things to the CI framework. In this case we need to be a good tool expert and need to have good knowledge in OOP concepts. 

But if you are going to do a performance assessment of a product, you need to know things such as environment configurations, network and related rules, future user growth and capacity planning, client side technologies, CDN, compression, minification, DNS, Javascript rendering, waterfall analysis, server side components, database technologies and configurations, product architecture, design, load balancing algorithms other than the performance assessment tools suite and CI configurations. So if you want to become a product performance expert, you should be an overall guy with a lot of tech knowledge.  

Process:
We have always targeted an application or a product. Hence we need to have a look at the process that the application is getting constructed and as well as the life cycle milestone that the application is in when we receive this assignment. Say for an instance, the application is almost completed and several weeks to be released, then our approach should be different then the application is only 5~6 sprints old. Or application is in the initial development stage. And as well as if the application is developed using agile methodology, then we need to adapt to that process and do the tasks in sprint wise to make sure that the performance assessment is not a burden or a comet which falls from the sky.  
        
Check and Proof:
If we decide to take the assignment, we need to make sure that the requirements are doable and can be done within the required time slot. In order to do so we need to conduct a Proof of Concept (POC) first place and assure that the application or the product technologies can be addressed and critical scenarios can be scripted. And one more thing to say, as you already know in performance engineering, we have two areas to be tested. One is Front end and other is Back End. So when we say we will do a POC and let you know the feasibility, we are targeting back end and not the front end testing because we do not need a POC to do a Front end assessment as it is dealing with the client side UI. But my advice is to do a POC first with the back end technologies and know the situation even though we execute Front end testing first. Hope you understand the concept.

Model the user load:
When doing a load test, load generation is a vital part and I’ll talk about that later. But before the load generation, do you ever bother about the pattern which real users are accessing your awesome web application. All the users that access your application has their own way of doing things. Say for an example, if user A login to the system and do scenario S and T and logout. But user B login to the system and do scenario S and U. And user C is not even login to the system and he is just a new user that browses the site to know some info.

Hence, can we just script the scenarios and do the test. No, we cannot. So what we need to do is, we need to create a model to simulate the user behavior in the load generation to mimic the real situation. In this case we use a concept called ‘User Community Model (UCM)’ (http://www.perftestplus.com/articles/ucml.pdf). This model is created using ‘User Community Model Language’ (UCML) which created by Scott Barber who is a pioneer in this field.

Using this language we can easily graph the entire user scenario base and create a real user load environment without much effort. We can user google analytics and server logs to get the information to draw this UCM.

Load generation types:
Load generation is not a simple task in a performance test assessment. We need to know the environment that we are going to be tested. In this case, we can use 3 types of load generation mechanisms which address different aspects. We can use On-premise model that generate load inside the same internal environment. This is quite an isolated environment which suitable for segregating specific issues in the system as we do not have any network or latency issues. 

The second option is to use the cloud VMs (Ex: Azure, Amazon EC2) to generate the load to the cloud hosted application. In this type, we can use geographically distributed load generators to mimic the actual user distribution in different countries. But in this case, we do not have much idea about the network bandwidth and the latency as all the components are in the cloud. Hence network issues isolation is not quite easy.

The final option is the hybrid version which divides the server environment and load generation into two locations. System Under Test (SUT) or the application server is in the on-premise environment and load generators are from the cloud (Ex: Azure, Amazon EC2). In this option, issues isolation is not more difficult than the cloud version as the server environment is in our hands. Hence, most performance engineering gurus’ are recommending this.

Result Presentation:
This is also very important thing in the performance test assessment, but not conceded as a vital part in most of the times. When presenting results, we need to make sure that we know the audience. If the audience is not coming from the tech background (Ex: Business stakeholders), then our report should be simple and contain a lot statistics such as impact to the business, future user growth, can we deploy this, how current performance impact to the business continuity, etc.

But the audience is technical oriented people, then we can include some technical backgrounds of the issues we have encountered. Then those people can benefit out of it. Finally, make sure to add a lot of tables, charts, graphs and a summary rather than tons of texts as readers not tend to read a lot.

Hope you learn something.

Next, I'll write an article about another performance engineering misconception soon.


Monday, March 31, 2014

Performance Engineering Responsibilities and Career Model



This time my focus goes to the performance testing ultimate work force which we can call as a Performance Testing Team and their growth.

When doing performance testing as a separate service, we need to build a unique team to deliver the service with quality results. This is not an easy task because all the team members should work as a team and need to gather a lot of knowledge regarding performance engineering and optimization principles.  According to my experience, application performance assessment is very broad area when compared with other services. Because we need to know End to End cycle of the application and its architecture to give a good assessment. We need to know the DB technologies, Network related frameworks, Product architecture and the infrastructure of that system.

Altogether, this is not just a nonfunctional testing type, but an engineering discipline which needs a lot of technical expertise + performance testing specific knowledge. Hence, the Performance Test Team should have a very good and clear career path to avoid the issues related to motivation and retention in performance engineering track. So in the following area I have mentioned a career model which created using several industry models that suitable to our standards.

In this model, I have defined 3 major levels and the information is as follows:

1.    Software Performance Engineer (First he/she should come as Associate > Engineer > Senior Engineer)

Responsibilities:

·         Performs identified performance tests like load, stress, endurance etc.
·         Understands the available workflows for test script generation
·         Create workload models by working with development team.
·         Executes test scripts with the required workload at various points.
·         Monitors and captures performance statistics of various system components like servers, databases, etc.
·         Collects defects and monitor.
·         Prepare required reports

Skills:

·         Need to have a BSc degree in Computer science or information Technology
·         Good communication skills
·         A performance tester needs to have the good knowledge of OOP principles
·         Need to have good analytical and problem solving skills, a conceptual understanding of the network, operating systems, web servers & database architecture, etc.  
·         A performance test engineer needs to have the very good knowledge of at least one standard industry performance testing tool.



2.    Software Performance Lead (First he/she should come as Associate > Lead > Senior Lead)

Responsibilities:

·         Helps to define performance testing objectives and strategy.
·         Designing of the test script and define the available workflows for test script generation
·         Monitor test scripts with the required workload at various points.
·         Verify performance statistics of various system components like servers, databases, etc.
·         Customizes scripts for simulating business transactions
·         Work with testing team to develop performance test plans and cases.
·         Conduct job trainings and provide assistance to Junior Test Engineers as needed.
·         Create the platform to automate test scenarios and environments for performance testing.
·         Suggest new tools and techniques to improve testing efficiency
·         Generate test summary reports for review

 Skills:

·         Need to have a BSc degree in Computer science or information Technology
·         Very good communication and negotiation skills
·         Good experience in performance testing service model and the implementation.
·         Knowledge of performance testing core principles and their usage
·         Need to have very good analytical and problem solving skills
·         Good understanding of the network, operating systems, web servers & database architecture, etc.
·         Very good knowledge in testing tools and related technologies
·         A sound knowledge in performance testing matrixes/ counters, various application technologies and the concepts of load simulation



3.    Software Performance Architect (First he/she should come as Associate > Architect  > Senior Architect)

Responsibilities:

·         Define performance testing objectives (Short term and long term).
·         Implement performance Testing service in the company
·         Build and maintain Performance engineering activities and benchmarking.
·         Verifies and validates workload models.
·         Provide support in project design, development activities which related to the application performance.
·         Build and verify CI automation environment
·         Review and recommend improvements to existing test strategies
·         Capacity planning and predicts the system performance for the future.
·         Work with developers and the management to develop performance testing culture at the company
·         Assist in project budgeting and resource planning activities.
·         Generate test final reports for management review


Skills:

·         Need to have a BSc or MSc degree in Computer science or information Technology
·         Thorough knowledge in project management and team handling.
·         Excellent communication and negotiation skills
·         Needs to have an excellent knowledge of testing tool architecture and the distributed load mechanisms.
·         Strong problem analysis and solving skills
·         Thorough understanding of the network, operating systems, web servers, database and application architecture.
·         Excellent knowledge in performance testing matrixes/ counters, various application technologies and core principles and their usage
·         Thorough knowledge regarding performance testing process and strategies
·         Excellent knowledge of the relevant and current industry trends.