Do you all use both think time and pacing if you need to achieve 4000 transactions in 30 mins of test.
I mostly use pacing calculation and ignored think time and achieved the expected number of transactions.
As Vivi said, it depends on your goals. If your aim is only "load" with predefined parameters - that you can use just pacing. If you need "real-user" behaviour in load test , you should use a think-time feature
It's not a choice. Think time has pretty much nothing to do with Pacing- they are two separate things entirely!
Pacing is, as it's name suggests, a method to pace your requests. You do this so you can accurately achieve a desired load against your system instead of just mindlessly hammering it.
Think time means that *within* a pacing loop each logical string of requests will take longer. The time for a logcal business journey will be 2 minutes instead of 4 seconds.
The ONLY link between the two is that when you use think time this means you will probably have to have more threads (VUsers) to achieve your desired pacing.
Why use pacing? Because without it you will never know if the problems you find a really problems or not. You could waste everyone's time tuning a system to handle a billion hits per second when in reality when it went live it only needed to able to handle 5 and it could have done that from the start.
Why use think time? The textbook answer we've all read is to make things 'more realistic', but why? There is actually a very simple reason and if you understand that you start to learn why we all bother doing this stuff. When a user logs into a system (or initiates a session in some other way) then very often, not always, they create a SESSION in the application.
Various flavours of system do this in different way but what it all boils down to is that you Mr Smith have just been allocated some sort of working space within the mind of the application. Think of it like the application is the CIA and they just opened a file on Mr Smith as soon as he made contact. Now, whenever Mr Smith does something it is recorded/managed/stored in this file. For a more accurate example say you login to myApp and run a search, the results from that search are most likely kept in your SESSION, they will live there for you to use while you're busy with them. Or maybe you are registering your details on someSite.com, first you enter you name and address and then you go to another page and enter you credit card details. someSite.com is able to *remember* that it was you who just put those address details in the last page becasue it has you stored in a session of some sort.
Sessions can be written to a database, kept in memory or God knows what. .Net uses viewStates, Java uses a JVM, everyoe loves cookies, blah blah. All versions of the same concept.
Now. This is the important bit. When Mr Smith logs out, usually (hopefully!) the session is cleared (deleted, instantiated, wiped out, archived etc.). So the length of time Mr Smith remained logged in *MATTERS*. See? Imagine you're testing a J2EE application. Each time someone logs in, a memory footprint of say, 1Mb in the JVM is created, then he does a big search and it doubles to 2Mb, etc. If your scripts have no think time then they will be creatng these footprints very quickly and then just as quickly removing them. Memory in use, blip!, memory not in use. But if they do use think time the memory remains in use for longer - creating greater CONCURRENCY - more realistic, see?
If there are 200 CONCURRENT people all logged in at the same time that makes 400Mb of memory in use. What about 400 people? 800Mb, but what if your max memory (heap) was only 512Mb? You would have got an out of memory error and found a problem with your system. If you did not use think time you would not have found this issue and it would have only be seen in Production and your boss would rightly, be pretty peeved with you.
So, pacing, achieves LOAD. Think time achieves CONCURRENCY.
So, after reading this.. I was in an understanding that both thinktime and pacing should be set accordingly to achieve concurrency and load on a system. If any of there two are missed we would not be close to a real world scenario....... Is this correct.
Yes to re-answer what you could/should read in long form above, good post oliver:
Think time: can you click mutiple buttons with millisecond precesion? Or does it take you a moment to drag you mouse across the screen to perform your next click? Can you type instantly like a macro/script can? The simple answer is no. You want to have your script, not be instantly fast like a script, but move at the speed of a human(if humans are your end users).
Pacing: used to achieve X number of iterations in X minutes; simple math