I have my Geoservers in 2 different environments: Tomcat on Windows and JBOSS on RHEL. I was guessing that JBOSS on RHEL will be faster, but to make sure I made some test plans with JMeter.
- are VMware servers
- have same number of processor and same amount of memory
- are using exactly same SHP file on each disk (no database)
- are on the same network segment, so network distance to my JMeter (on my Workstation PC) are the same
- are dealing with similar WMS requests and style from my JMeter
My observation shows that Geoserver on JBOSS/RHEL is noticeably slower than on Tomcat/Windows. This brought me to early conclusion that this is because the JBOSS/RHEL is not optimally configured.
But to be sure I made another test with both, but instead of using Geoserver, now only with static content (simply file) with format similar to Geoserver response:
- 8-bit and 32-bit 256x256 PNG
- GML file
- geojson file
Those static content are hosted on both JBOSS/RHEL and Tomcat/Windows. Interestingly now JBOSS/RHEL is faster than Tomcat/Windows.
I returned to the Geoserver test plan an played with Image Processing and Image Encoding options (image below) in Geoserver JBOSS/RHEL.
This is because I suspected the java/image processing is the source of problem. But the result is the same: Geoserver on JBOSS/RHEL is slower.
The speed difference of the two Geoserver is not only measured in JMeter, but even visually noticeable in OpenLayers(!).
Now the suspect is clear: the Geoserver on my JBOSS is not working optimal.
Where do i start to try and fix this?
ADDED INFOS: Java version is added in the above comparison.
I checked this as suggested by @bugmenot. I think the most relevant item is the JVM Optimization in the Container Considerations. The link suggests to set several JVM parameters (1-7 in the table below). Another site suggests few other parameter (8-11).
Therefore i checked both server:
The JVM parameter in JBOSS does not differ too much with Tomcat.
But still, I tried to increase (in JBOSS server #21) the InitialHeapSize to 128MB and MaxHeapSize to 2048MB, with the following command:
java -Xms128m -Xmx2048m -version
No error. But when i check with the command:
java -Xms128m -Xmx756m -XX:+PrintFlagsFinal -version | grep -iE 'InitialHeapSize|MaxHeapSize'
Both heap size doesn't change to the value I wanted.
So my question now:
Both server doesn't differ too much. So why?
Does Java version affects ?
How to set JVM memory amount (eg. increase heap size) for JBOSS?
Below are images showing the test plans.