Reputation: 344
I am running WildFly 10 (Final release) and I have a very simple JAX-RS server application. It has only one test endpoint, which waits for one second and then returns HTTP OK status.
@Path("/test")
public class TestEndpoint {
@GET
@Produces("application/json;charset=UTF-8")
public Response get() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return Response.ok().build();
}
}
Trouble is that with this setup, I am only able to reach 10 requests per second. No more.I am testing this with SoapUI LoadTest - 100 threads, 1 ms delay between requests. When another user from another computer connects to such WildFly application, he also gets 10 requests per second maximum. So it looks like the limit is per user.
I've tried the application on different servers and even on localhost and it always seems to be 10 requests per second ( about 9.8 - 10.5 req. per sec.). All CPU cores have low usage (8 % on average).
I bought a book called WildFly Administration Guide and tried some undertow settings:
Nothing helped. Even under stress test, jboss-cli shows this:
{
"outcome" => "success",
"result" => {
"active-sessions" => 0,
"context-root" => "/",
"expired-sessions" => 0,
"max-active-sessions" => 200,
"rejected-sessions" => 0,
"server" => "default-server",
"session-avg-alive-time" => 0,
"session-max-alive-time" => 0,
"sessions-created" => 0,
"virtual-host" => "default-host",
"servlet" => {"com.test.ApiConfiguration" => undefined},
"websocket" => undefined
}
}
This part is interesting
"servlet" => {"com.test.ApiConfiguration" => undefined},
"websocket" => undefined
Here is my configuration:
<thread-pools>
<thread-pool name="default">
<max-threads count="1000"/>
<keepalive-time time="100" unit="milliseconds"/>
</thread-pool>
</thread-pools>
Performance of Web part I also use JSF for another part of the application. This application is packed inside the same WAR. When deployed to the same server, the application can handle 600-700 requests per second, but the requests take less time to complete, so it seems the limit is still the same.
Of course I use Resteasy as default JAX-RS implementation in WildFly.
Is this WildFly related problem, or something else?
Upvotes: 0
Views: 2782
Reputation: 877
Every time I have seen issues like this it is generally an problem with the client limiting the amount of connections it will make.
By default Wildfly will create 16 * CPU's worker threads, which should give you more than 10 req/sec (even if you only have 1 CPU it should give you 16) (IO threads should not be relevant here).
I would look at the SoapUI setting 'Max Connections Per Host', I think you will find that the benchmark client is just not creating enough connections.
Upvotes: 1