Performance testing (environment & infrastructure setup ) -2
As per the production system architectural we would have decide our environment In our case we decided to have dedicated machines for the following:
1 Linux server running instance of x App server. (Ideally configured to real world scenario)
1 Linux server running instance of (Oracle database). (Ideally configured to real world scenario)
1 machine should be configured to handle Controller (Load runner ) or any Load initiation agents for other tools.
X no of machines to generate load ,where x depends on the no of machine calculated depending upon the of real users generated through user profiling & transactional profiling. The no of machine required for load generation depends on virtual user footprint & is different for different tools.
Calculating test workload How many virtual users??
Suppose the system analyst have identified the X module as the most frequent and resource intensive user action. We can try to calculate test work load for that module.
In the stress test mode, as soon as a virtual user receives a response, it immediately submits the next request. In other words, the virtual user think time equals zero i.e. (Z = 0). In defining the test workload, one has to specify the number of concurrent virtual users.
This number can be estimated as follows:
Let R denote the average application server response time,
X0 the server throughput,
Nr the number of simultaneous real customers,
and Nv the number of virtual users.
Considering that the throughput and the response time should be the same during the tests and the live operation, one can write the following:
X0 = Nr/(R + Z)
X0 = Nv/(R + 0).
From the two above equations, we have
Nv/Nr = R/(R + Z).
Let us assume that we have set R = 2 seconds as the average response time goal and Z = 20 seconds for actual users. Then,
Nv = Nr × 2/(2 + 20) = 1, 000 × 1/11 = 90.9 91.
Virtual User Memory Footprint
Memory footprint for a virtual user can be called as a function that is dependent on virtual user type (Web, CITRIX, SAP GUI).if your Web/HTTP virtual user takes 5MB when running as a process, 50 virtual user would take 250 MB.
The amount of maximum load depends on the CPU and memory on a given hardware machine. Execution scenario (varies from product to product)
Virtual users are running on memory instead of disk
Load generators encounter bottlenecks first in memory and then in the processor.
If no of logged in users in X project is: 4000
A module : 2000 users
Clinical suite : 2000 to 2500
we have to find the real users ????
Load Runner virtual memory foot print (report provided by HP)
How many load generators?
Calculations :
Memory usage
Process based initiation:
1 virtual user requires 25.3 MB of RAM
2500 virtual users require 63250 MB RAM = 61 GB RAM
42 virtual users / GB of RAM
i.e. 15 systems with 4 GB RAM each handling = 165 virtual users.
1 virtual user requires 0.76 MB of RAM
2500 virtual users require 1900MB RAM= 1.8 GB RAM
1388 virtual users / GB of RAM
i.e. 2 systems with 1 GB RAM would suffice.
CPU utilization
Windows 2000 server 1 CPU , 1 GB RAM: 1 virtual user takes about 0.75 % CPU utilization .
Windows 2003 server 1 CPU , 1 GB RAM: 1 virtual user takes about 0.52 % CPU utilization .
Calculation based on footprint assumption for Load runner on different machines.
Recommended CPU speed for load generation agent machines is 2.33 GHz or greater.
What if memory footprint report is not available ?
First we can calculate the memory footprint for 5 to 10 virtual users on our Load testing set up.
For that we would be using a simple configuration machine which you would ideally have. ( 3gb RAM or 4gb RAM and single core processor speed)
if 5 virtual users take about X MB of RAM. check how many virtual users would take about 60-70% of the total RAM & then check how many machines are required for 2500 users.
Based on this calculation you can calculate the number of machines we would need.
How many load generators?
Q : How much load can be put on a load generator without impacting performance?
Monitor CPU & Memory usage.
Monitor bandwidth usage .
Monitor usage by script & load test tool. i.e. monitor & load test load testing environment.
Steps:
Test the load testing environment. Start by having a few virtual users from a single generator system. Monitor the CPM & memory usage for the same. When you have the meta data extrapolate the no of users based on the findings. Trial & error method to get the perfect load on a specific instance of a generator.
Note : Use many agent machines with low-end configurations (in terms of number of CPU's and amount of memory) and have these machines generate load. If you use fewer agent machines with high-end configurations, then the operating system is limited by the total number of available sockets, processing parallelism, and limits on multi threading. Therefore, use many agent machines with low-end configurations that are horizontally scaled out for performance testing, rather than vertically scaling agents on a few high-end machines
Number of Servers: Number of physical and virtual servers
Load Balancing Strategy: The type of load balancing mechanism is in use
Hardware Resources: CPUs count and type, RAM capacity, Number and type of NICs
Software Resources: Standard application build apart from components of the AUT
Application Components: Application components description which needs to be deployed on the server
External Links: Links to third party application and other internal system components.
Some of the parameters which need to be checked on Windows load generation machines
MaxUserPort 65534 (Controls the range of dynamically allocated ports) default is 5000
TcpTimedWaitDelay 30 The Windows TCP/IP layer has a registry setting TcpTimedWaitDelay that controls the time a connection is in TIME_WAIT state ) default is 240
MaxFreeTcbs 72000
MaxHashTableSize 65535
TcpWindowSize 65535
EnableDynamicBacklog 1
MinimumDynamicBacklog 20
MaximumDynamicBacklog 1000
DynamicBacklogGrowthDelta 10
TcpAckFrequency 1