Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Performance Benchmarking - Java upgrade from Java7 to Java8

Bahmni is currently on OpenMRS 1.12.  We are planning to upgrade to 2.0.  We would like to ensure that there is no performance degradation after the upgrade.  OpenMRS 2.0 requires Java 8 and there might be some tuning required after the upgrade. You can refer here.

The Performance Benchmarking setup consists of 2 steps. 

  1. Installed Bahmni 0.85 release on a new AWS instance with anonymised Possible database so that a real time data is simulated. This installation is through ansible by default it uses Java7, you can verify in the /opt/openmrs/etc/openmrs.conf file
  2. Wrote Gatling tests for some scenarios like registration search, patient dashboard, clinical search etc, you find here. Gatling is an open-source load testing framework based on Scala. The software is designed to be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications. The Project's aims include High performance, Ready-to-present HTML reports(sample report), Scenario recorder and developer-friendly DSL.

Performance Benchmarking

We have bahmni instance and gatling tests are ready for benchmarking, Testing procedure consist of 2 steps

  1. Run each the scenarios 3 times and took response times for each scenario and noted in the sheet (Java7, Java8).
  2. For each scenario, did memory profiling using JConsole (sample snapshot).
Repeated the above steps for Java8(update the JAVA_HOME to point to JRE8 in /opt/openmrs/etc/openmrs.conf)

PermGen Elimination & Impact on Java commandline options

We need to do small changes around JAVA_OPTS. As PerGenSpace is removed in Java8 and in place of PermGen it uses native memory for meta space.
Essentially the changes are
         export SERVER_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"
               to

                   export SERVER_OPTS="-Xms512m -Xmx1024m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m"

Conclusion

The response times & memory consumption of each scenario with java7 and java8 are approximately equal. There are no major performance issues(degradation) observed.

References


Panel
titleColorwhite
titleBGColor#1FA5A0
titleOn this page

Table of Contents