-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAX WS builtin Server implementation is very slow on Linux #594
Comments
Here is test fork with dependencies and code update to build the test with latest development snapshot: https://github.com/Tomas-Kraus/linuxjvmjaxwstest
...so let's try Linux now ... I got some 23-25 ops/s. So the problem still exists in master branch. |
Running Java VM with -Dsun.net.httpserver.nodelay=true seems to solve the issue on Linux:
|
Related topics: |
Signed-off-by: Lukas Jungmann <[email protected]>
release noted in #612 |
Previously tracked at: https://bugs.openjdk.java.net/browse/JDK-8193236
FULL PRODUCT VERSION :
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1~deb9u1-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux c0ab5270bb70 4.9.49-moby #1 SMP Wed Sep 27 23:17:17 UTC 2017 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The built-in JAX WS server implementation works 100 times slower on linux machines then on Mac OS X or Windows. JMH test is published here: https://github.com/Andremoniy/linuxjvmjaxwstest
Basically it does the following:
endpoint = Endpoint.publish("http://localhost:8888/", new FooServiceImpl());
String result = state.client.foo(state.foo);
On Mac OS X with 2 Cores Intel Core i7 it gives:
JMH version: 1.19
VM version: JDK 1.8.0_151, VM 25.151-b12
VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre/bin/java
...
Result "test.openjdk.MyBenchmark.testMethod":
3077.813 ±(99.9%) 51.818 ops/s [Average]
(min, avg, max) = (1718.347, 3077.813, 3315.271), stdev = 219.400
CI (99.9%): [3025.995, 3129.630] (assumes normal distribution)
Run complete. Total time: 00:06:49
Benchmark Mode Cnt Score Error Units
MyBenchmark.testMethod thrpt 200 3077.813 ± 51.818 ops/s
The same machine, docker without CPU limitations:
JMH version: 1.19
VM version: JDK 1.8.0_151, VM 25.151-b12
VM invoker: /usr/java/jdk1.8.0_151/jre/bin/java
...
Result "test.openjdk.MyBenchmark.testMethod":
19.882 ?(99.9%) 0.169 ops/s [Average]
(min, avg, max) = (10.031, 19.882, 20.104), stdev = 0.715
CI (99.9%): [19.714, 20.051] (assumes normal distribution)
Run complete. Total time: 00:07:01
Benchmark Mode Cnt Score Error Units
MyBenchmark.testMethod thrpt 200 19.882 ? 0.169 ops/s
The situation changes if JAX WS server is started with Jetty (there is no performance issues):
ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection();
server.setHandler(contextHandlerCollection);
Please, refer also: https://stackoverflow.com/questions/47645817/jax-ws-server-implementation-performance-issue-for-linux-jvm
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
On linux machine (for instance, docker pull openjdk:8u151)
git init
git clone https://github.com/Andremoniy/openjdkjaxwstest
mvn package
cd target
java -jar benchmark.jar
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The performance should be the about 3000-5000 ops/s.
ACTUAL -
The performance is about 20 ops/s.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
https://github.com/Andremoniy/linuxjvmjaxwstest
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use Jetty server for publishing WS.
Source: javaee/metro-jax-ws#1219
Author: LanceAndersen
The text was updated successfully, but these errors were encountered: