Skip to content

Performance benchmarking – the basics

December 18, 2011

How do you measure performance of a web application?

Of course, you write a test script, applying a sequence of requests to the application and measure the response time. You also might do this several times sequentially to get better statistics and calculate the average.

Depending on the number of parallel users your application will show one of three behaviors. To understand them, let us take a quick look on how a request is process. Put simple, it is sent from the client to the app server, processed by the app server which in turn may ask a database server. The result page is rendered and sent back. Put even more simple, a number of resources are are allocated (network, app server cpu, db connection, db cpu and a lot more). The minimum response time M in a simple model is simply the sum of all the times where resources are allocated (assuming no parallelization).

The resources with the longest allocation time L plays a special role: Its allocation time – lets call it critical) determines the response time T. Assuming only one client can use a resource.

Depending on the number of clients C , the application will be in one of three states:

  • The critical response time times the number of clients is less than the overall response time. Each client can be server within the overall response time, which is thereby constant: T = M
  • The number of clients times the critical response time is higher than the overall response time – which thereby increases linearly with the number of clients: T = C*L
  • At a given load level, some resources will start to fail. For example, app servers typically put requests in a wait queue until the request can be served. This queue has a maximum length. If the queue hits this maximum, the server responds with an error
Advertisements

From → Benchmarking

Leave a Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: