Hi all, I'm using Wiremock to simulate a backend s...
# general
a
Hi all, I'm using Wiremock to simulate a backend system during a load testing of an api gateway product; I need to introduce a uniform delay (even fixed, doesn't matter) in order to be as realistic as possible and I found out how to do it in json config. The problem is that under load (even with 15 req/s) wiremock seems to have problems serving the delayed api: for example, I set a fixed 600ms delay but wiremock is responding after 4/5s. It could be a problem with threads? Do you know the best tuning practices to avoid this issue? I tried with jetty.acceptor.threads = 8, if I set it a 16 ore 32, the performance actually decreases. Thank you very much Alessandro
o
Hello, this is strange. I would try to profile it on your instance
a
So it sounds strange to you? I will try to profile it; is there anything to tune on the os?
o
I don't think so, it is not a scale where there should be any problems on the default settings
a
Thanks @Oleg Nenashev, so it seems to be a problem on the machine on wiremock is running on and not a problem on wiremock itself; I actually deployed the wiremock instance on another machine (with no other processes running) and the problem is still there. I will definitely try to profile it, thanks again!
t
Hi @Alessandro Bramati, a few things to check: • Have you disabled or limited the size of the request journal? • Have you enabled async responses and sized the thread pool appropriately? • Have you sized the container thread pool appropriately? • Have you given the JVM process a decent amount of heap space? BTW, don’t touch acceptor threads unless you see a bottleneck at the TCP connection phase (which you probably won’t) - these threads are purely for accepting new connections, not doing the work of serving requests.
a
Hi @Tom, the request journal is disabled and JVM process doesn't have problems with memory. I will try to tune the thread pool and the container thread pool (I actually never done it). Thank you very much for the hints! I'll let you know :-)
t
If you’re using delays the async bit is probably most important
a
Hi @Tom, I enabled async response and tuned the container threads number. Thanks a lot!!
t
Great, glad to hear it helped!