Showing posts with label Memory settings. Show all posts
Showing posts with label Memory settings. Show all posts

Saturday, September 16, 2017

Basics of Java Garbage Collection

It’s an old joke from the time when Java was new and slow compared to other languages. Over time, Java became a lot faster. Today it powers many real-time applications with hundreds of thousands of concurrent users. These days, the biggest impact on Java’s performance comes from its garbage collection. Fortunately, in many cases, it can be tweaked and optimized to improve performance.

For most applications, the default settings of the JVM work fine. But when you start noticing performance issues caused by garbage collection and giving more heap memory isn’t possible, you need to tune and optimize the garbage collection. For most developers, it’s a chore. It requires patience, good knowledge garbage collection works and an understanding of application’s behavior. This post is a high-level overview of Java’s garbage collection with some examples of troubleshooting performance issues.

Continue reading here

Friday, July 18, 2014

Memory Settings on WebMethods - Windows Installation as Service

According to SoftwareAG, if you want to modify the memory settings of your WebMethods Installation (IS - Integration Server) you have to do it in one place:

setenv.bat
set JAVA_MIN_MEM=1024M
set JAVA_MAX_MEM=2048M
set JAVA_MAX_PERM_SIZE=512M

I'm not saying this is wrong, because is not if you start your IS using command line by invoking startup.bat (X:\SoftwareAG\IntegrationServer\bin)

However for us mortals (muggles) who have our installation configured as a Windows Service I found this that my service is started by executing an EXE file (which uses a config file named wrapper.conf):
X:\SoftwareAG\profiles\IS\configuration\wrapper.conf

Inside that file you'll find all sort of properties but no matter how many changes you perform in this file, you won't see any change reflected (no mater how many times you restart your service), unless you have checked at the end of this file where there is a commented line (leave it commented, no need to change anything) which actually includes an additional file custom_wrapper.conf (aha! That's the right spot!)

Feel free to modify this entries (those are the values I set to my DEV environment):
wrapper.java.additional.7=-Xms2048M
wrapper.java.additional.8=-Xmx2048M
wrapper.java.additional.9=-XX:MaxPermSize=512M 

If you want to add an additional property to your JVM (since the last property ends in 17), I added an additional property 18:
wrapper.java.additional.18=-Dcom.sun.management.jmxremote.port=7007 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

Restart your IS Windows Service and you'll see your changes reflected.