Response Time of Wiremock degrades with increase in Load and with increase in mapping Files during Load Testing

1,901 views
Skip to first unread message

Rakesh Tripathy

unread,
Mar 10, 2021, 7:32:58 AM3/10/21
to wiremock-user
Hi,

We have prepared the mock mappings using wiremock for Load Testing, however we are facing issue of slow Response from wiremock during Load Test.

Currently we have below things in place:-
> We have recorded the Transactions and our Request/Response pairs are in mappings Folder.
> Please note that we have around ~1000 mapping files as we have a lot of flow to cover in Lod Test, however right now we see slow response from wiremock (~1 seconds of response Time) even with just 40 mapping files
> We are using wiremock latest standalone version of Jar and running the jar as standalone java process in a separate server - https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.27.2/wiremock-jre8-standalone-2.27.2.jar

> We tried tuning the jvm arguments and also wiremock parameters and finally right now we are using below to bring up wiremcok:-

java -Xms512m -Xmx2048m -XX:+UseParallelOldGC -XX:MaxMetaspaceSize=1024m -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar /apps/wiremock/wiremock-jre8-standalone-2.27.2.jar --container-threads=500 --async-response-enabled=true --async-response-threads=200 --no-request-journal --disable-request-logging --port 8082 &

We need some help to resolve this slowness issue of Wiremock with load and with more number of mappings.

Tom Akehurst

unread,
Mar 10, 2021, 8:26:45 AM3/10/21
to wiremock-user
How much CPU and RAM does the machine (or container) running WireMock have?

If you've only got 1 or 2 CPU cores allocated then your thread counts are quite high. I'd suggest going no higher than 100-200 for container threads and 50 for async threads.

Also, worth making sure you've got quite a lot of RAM headroom over the heap + metaspace you've allocated as Jetty uses native byte buffers under the hood which can consume quite a bit of off-heap memory. If this is starting to eat into swap space then it'll slow things down a lot.

TBH, I wouldn't set the GC or metaspace size parameter explicity if you're running on metal or a VM, as the JVM will usually do a better job of tuning these itself. If you're in a container OTOH, sometimes it's worth setting these yourself.

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages