tyrus
tyrus copied to clipboard
jdk-client produces high CPU usage in Jenkins agent on IBM Mainframe (z/OS)
Hi Jan et al.,
as suggested on the mailing list I am opening an issue here. I'm sure there will be more information required. Just let me know whenever you need something.
Description of the problem: We are running Jenkins agents that use the Tyrus WebSocket implementation. I am not a developer of Jenkins but just a user. The agents run on the Mainframe operating system z/OS with a J9 JVM.
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 8.0.7.6 - pmz6480sr7fp6-20220330_01(SR7 FP6))
IBM J9 VM (build 2.9, JRE 1.8.0 z/OS s390x-64-Bit Compressed References 20220303_23850 (JIT enabled, AOT enabled)
OpenJ9 - 6890476
OMR - 1e70123
IBM - 1b0232b)
JCL - 20220120_01 based on Oracle jdk8u321-b07
The agent uses significantly more CPU than it does without WebSockets. The top performing thread shows hat jdk-client is used. We assume that this is either a problem with the implementation of the IBM JVM or the Tyrus library. We have a case open with IBM to analyze this issue. However, they would like to talk to someone from Tyrus. I am going to point them to this issue as well.
J9 vs. OpenJDK: OpenJDK doesn't exist on z/OS so we have to use J9. IBM is the only vendor that provides a JVM for z/OS. We are not seeing high CPU consumtion when running Jenkins with a non-J9 on x86. If that was a problem this would have probably risen a lot more attention. I haven't been able to test whether a J9 on x86 has the same problems as it does on z/OS.
jdk-client vs. grizzly-client: I have put some time into trying to build the Jenkins agent with the grizzly-client instead of the jdk-client. I have to admit that I am not too familiar with the code of the agent. I got it to build but it then didn't find some Jakarta/WebSocket classes during runtime. I'll put in some more time to see if I can get around it. Since I don't know a lot about the Jenkins source code I have no idea if the grizzly-client will just work or if the agent code would actually have to be changed.
Simple reproducer: Not so easy. If I had a simple Java client/server that has a client process that is continuously running and waiting for questions we could see if that produces the same results. It would take me some time to code something like this. By any chance, is there a sample client/server that I could build and try to run?
Tyrus version: Jenkins has version 1.18 included. They very recently upgraded to 2.1.0. I tried to run both agent versions but cannot see any improvement in CPU consumption.
Cheers - David