Forum Discussion

Richards's avatar
15 years ago

slow load test when using Groovy

Hi,

I am planning a load test of an ESB. One of the tests is to establish max request/second against a really fast web service. Expected performance is > 200 req/sec.

To verify that SoapUI can handle this I created a simple echo servlet and ran a performance test on my laptop. Results were better than expected: I was able to do 1200 requests per sec using the 'simple scenario', 5 threads, no delay:

Test Step,min,max,avg,last,cnt,tps,bytes,bps,err
send soap request,1,651,2.89,4,385143,1283.82,299256111,997530,0
TestCase:,1,651,2.89,4,385143,1283.82,299256111,997530,0

However, I my real test I need to vary the credentials in the UsernameToken. So I created a groovy setup script that reads 50 users from a file into memory and added another test step that randomly picks one of the users.

Running the same load test scenario as before gave very disappointing results:

Test Step,min,max,avg,last,cnt,tps,bytes,bps,err
pick random credential,1,41,0.01,0,8669,28.9,0,0,0
send soap request,1,1218,15.65,2,8669,28.9,6742944,22479,0
TestCase:,2,1259,15.67,2,8669,28.9,6742944,22479,0


My throughput is now down to a poor 28 request/sec. I noticed some garbage collection activity. Increasing heapsize to 1 GB solved this but did not really improve throughput significantly.

At it's current performance this makes my setup pretty useless for my tests. Is this slow performance when using Groovy expected? Any suggestions to improve this?

Regards,

Richard

3 Replies

  • sadia's avatar
    sadia
    Occasional Contributor
    hi,
        i just read your post at forum. i am new with the tool.

    i have one test case, in test steps i have one groovy script that read a text file, set property value, this property value will copy in request at run time. in load test i choose the 'simple test', 5 threads and total run are 10. but during load test, according to load test log, script run, property also calls but when i checked the property there is no change in the value and request icon not change into green.

    i am expecting that each thread will execute the script, increment the counter and pick the next value from file and copy into request. IS IT CORRECT UNDERSTANDING?

    HOW I CAN SOLVE THIS?
  • Richards wrote:

    pick random credential,1,41,0.01,0,8669,28.9,0,0,0


    It looks like the Groovy step is running pretty quickly. Could it be the randomness of the credential that is causing your SOAP operation to be slower? ie., is SoapUI just reporting the behaviour it sees?

    Can you verify independently that the operation is still running as fast as you think it is, from the server side?
  • sadia wrote:
    i am expecting that each thread will execute the script, increment the counter and pick the next value from file and copy into request. IS IT CORRECT UNDERSTANDING?


    Possibly not.

    Can you post the Groovy script you are using? Since there are many ways to do what you describe, some of them error-prone, it would be easier to help if we could see the piece of code in question.

    J