where do we configure to reduce the response time of a virtual service, apart from the think time in VSI. Can we add any java script step to resolve this ?
how much do you need to reduce it? my services are usually milliseconds in duration
Think time is the main controller for reducing response time of virtual services. You should set the think time scale on deployment to 0. Above and beyond that you get into optimization of the infrastructure and environment to reduce response time as much as possible. The biggest thing that will slow you down is logging. You'll want to open up your logging.properties on your VSE server and adjust the following lines:
log4j.logger.com.itko=INFO and log4j.logger.VSE=INFO, VSEAPP
I'd recommend turning logging from INFO down to WARN or even ERROR.
Also, you'll want to make sure you're using an enterprise level DB like (Oracle, SQL Server, etc) rather than the derby database. Make sure you've also allocated enough memory to VSE based on your box size and specs.
Those are a few of the quick and easy things to do to increase response time.
In addition to what Josh indicated above, if your DevTest license is not a Performance VSE, your TPS rate is throttled for each service by the DevTest software. Functional VSEs limit the per service TPS rate to approximately 1 transaction every 100ms. (At least this was the model in versions prior to DevTest 8.x) Performance VSE licenses disable this behavior. If you are running a functional VSE, you might also notice that you are unable to increase the Capacity setting for a given virtual service. Or, even if it does allow you to increase Capacity, the functional VSE license will honor its internal TPS rate.
If this algorithm has changed, hopefully someone else will chime in.
Thanks Josh.. useful info.. out of curiosity I wanted to understand .. when we set think time to 0 when deploying what will happen ?
do we have any specific values that represent 0 and specific seconds or mili secods that says withing that VS will response when think time is set 100% while deploying ?
Setting the Think Time in the Virtual Service Image to '0' instructs the service to send the response as fast as it possibly can. The 0 in that case means, do not wait a specified period of time prior to sending the response to the system under test (or client application). Your VSM will consume some amount of time to execute all of its steps, so your response will technically never reach an absolute 0 amount of time. The VSM overhead time is generally negligible unless you have added a lot of behavior or additional steps.
By default, Think Time is described in milliseconds. So, 0 means 0 millis. 100 means 100ms. You do not need to add a time suffix if you want your Think Time to use millis.
You can add other units of time by adding a suffix to the number. For example, 1s means 1 second. Valid suffix values are: 't' for millis, 's' for seconds, 'm' for minutes and 'h' for hours. Depending on the transport and how long your client keeps connections open, using minutes and hours in Think Time responses may cause unintended connection errors when the VSM sends a response.
Make sure that the following rows in the logging.properties file are set as below:
Retrieving data ...