The online community for software testing & quality assurance professionals
   
Active Topics Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Jobs
Training
News
Links
Downloads

News Group:
software.testing


Testing
Automation
Performance
Engineering
Miscellaneous
Statistics
Poll
  QA Forums
  Performance & Load Testing
  Actual vs. Virtual Concurrent users

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Actual vs. Virtual Concurrent users
jhilger
New Member

Posts: 1
Registered: Jun 2002

posted 06-11-2002 07:13 PM     Click Here to See the Profile for jhilger   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by jhilger
We are developing a content web portal. My client is looking to get a sense of the number of concurrent users the site can support. We are using jmeter to load test the site. I am looking for a standard metric to convert a number of virtual users to concurrent users.

I don't know if I am explaining this well so let me provide an example. I use a number of machines to simulate 200 concurrent users in JMeter. JMeter simulates 200 users sending http requests at nearly the same time. People on the site will not be sending concurrent http requests in rapid succession. They will often be reading articles. What is an appropriate ratio of concurrent users on the site to the virtual users defined in JMeter. Is 20:1 an accurate representation? (ie. 200 users in JMeter is equivalent to 4000 concurrent users.)

Thanks.


IP Logged

Euc
Moderator

Posts: 272
Registered: May 2002

posted 06-11-2002 11:28 PM     Click Here to See the Profile for Euc   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by Euc
Hi,

Well to start with let me define the word ‘concurrent’ (I see some confusion in your mind about this) as it is interpreted by most of the QA guys.

N Concurrent users in a system means that there are N users who are logged in to the system and the probability that any of them will hit the server at any point of time is far greater than any other logged out or timed out user, something like using some gate to enter a compound in a time window of say 1 hour. Note that it is implicit in this definition that these users not necessarily hit the system at the same time, which leads us to definition of 'simultaneous users. N Simultaneous users in a system means there are N users in the system that are actually sending a simultaneous request, something like trying to pass through a gate all at the same time.

Now what most of the clients expect to know, and most of the technical documents show (ooops, is that rhyming by any chance) is the number of concurrent users. The obvious reason being this figure gives more accurate representation of real word scenario.

Now how do you achieve non-simultaneous concurrent users? It is impossible to make the virtual users generated by any automated tool 100% non-concurrent. And being 100% non-concurrent is also not realistic, hence no need to go for that. What you can achieve is, say if you are running a load test with 100 concurrent users then only about 5% are actually hitting the servers at the same time (simultaneous). This is achieved by implanting humanity (as I call it) to the load testing scripts. You put sleep functions in between the operations, so that the virtual user waits before proceeding. (Also called think time), also this sleep period can be chosen randomly by using a random number generator. You can choose not to start all users at once simultaneously, and use things like ramp up. This will cause the users to lead/lag in phase to each other. There are hundreds of other things you can do.

It all boils down to the ultimate target of using technology, 'make it do the things as if some human being is doing it'

------------------
Euc

while traveling parallel to a tangent , it's difficult to be normal, isn't it?

IP Logged

punekar
Advanced Guru

Posts: 588
Registered: Dec 2000

posted 06-11-2002 11:44 PM     Click Here to See the Profile for punekar   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by punekar Visit punekar's Homepage!
quote:
Originally posted by Euc:
What you can achieve is, say if you are running a load test with 100 concurrent users then only about 5% are actually hitting the servers at the same time (simultaneous). This is achieved by implanting humanity (as I call it) to the load testing scripts. You put sleep functions in between the operations, so that the virtual user waits before proceeding. (Also called think time), also this sleep period can be chosen randomly by using a random number generator. You can choose not to start all users at once simultaneously, and use things like ramp up. This will cause the users to lead/lag in phase to each other.

I may not agree with the magic "5%" figure, but the general stream of thought seems correct. Some tools like LoadRunner have the facility of "rendezvous" points where one can make the vusers make of one or more scripts meet, pause and then start the next operation simultaneously.

------------------
- Suresh Nageswaran, CQA, CSTE
Cognizant Technology Solutions, India.
punekar@yahoo.com

["Carpe diem, quam minimum credula postero!" -Horace]

IP Logged

Euc
Moderator

Posts: 272
Registered: May 2002

posted 06-12-2002 02:06 AM     Click Here to See the Profile for Euc   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by Euc
quote:
Originally posted by punekar:
I may not agree with the magic "5%" figure, but the general stream of thought seems correct. Some tools like LoadRunner have the facility of "rendezvous" points where one can make the vusers make of one or more scripts meet, pause and then start the next operation simultaneously.



Hey Suresh,
This is no magic figure or anything, It's just an illustration.

Also I will like to know what kind of facilities the tool - this friend of ours is using - provides for achieving things like rendezvous.

------------------
Euc

while traveling parallel to a tangent , it's difficult to be normal, isn't it?

IP Logged

icestone
New Member

Posts: 1
Registered: Nov 2001

posted 06-19-2002 01:37 AM     Click Here to See the Profile for icestone   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by icestone
It could be computed through your test result. You can get the throughput(hit/second) from your 200 virtual users test. We assume that a user sends a request every 8 seconds. So the total users your site can support are throughput * 8.

------------------

IP Logged

charles_ezdata
Member

Posts: 19
Registered: Sep 2001

posted 06-19-2002 07:03 PM     Click Here to See the Profile for charles_ezdata   Edit/Delete Message Copy This Message   Reply w/Quote Search for more posts by charles_ezdata Visit charles_ezdata's Homepage!
jhilger: I used to experience the same suituation in my company. Basically, your problem is how to convert the test result (in your case is the number of concurrent users in JMeter)to a constomer-orient measurement(the number of actual concurrent users represented). But, digging deeply, you will know it is a complicated problem related to a lot of aspects like usage pattern, methodology, test designing and so on.

if the number of actual concurrent users is represented by #CU , and #VU represent the number of the virtual users in your test utility(JMeter), there should be a ratio make #CU=#VU*ratio . How ever, the ratio is not a constant, it is one of the output of your test. For example, in real word 100 users generate 10 requests/second, but in your test JMeter can generate 10 requests/seconds by using just 1 VU. At this moment the ratio is 100. When you ramp up the #VU to 100, the requests/second also goes up to 50 (unlikely 1000). It represents 500 actual users in real world. So, the ratio goes down to 5.

So, the ratio depends on how much load a real user can generate. Unfortunetely , this is also a variable. Let's introduce a concept of thinking time. The thinking time is the period a user uses for going through the web page, making a call, writing down information, making decision and so on. It starts from the end of loading page to the beginning of another request. Assuming the average thinking time is Tt, and average response time is Tr, then a user can generate 1/(Tr+Tt) requests/seconds. #CU users can generate #CU/(Tr+Tt) requests/seconds. During your test, at any moment , the requests rate(requests/seconds RPS) is #VU/Tr (each VU can generate 1/Tr requests/second).
#CU/(Tr+Tt)=#VU/Tr
ratio = (Tr+Tt)/Tr
#CU=#VU*(Tr+Tt)/Tr=RPS*(Tr+Tt)

However, it is not easy to deduce a Tt. At the mean time,there are still a lot of factors we didn't take into consideration, like user abandonment, caching...

[This message has been edited by charles_ezdata (edited 06-19-2002).]

IP Logged

All times are PT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A Reply
Hop to:

Contact Us | BetaSoft Inc. | Privacy Statement

Copyright © 1997-2003 BetaSoft Inc.


Ultimate Bulletin Board 5.45c