Mark W
Mark W

Reputation: 141

Mule ESB JDK 1.8 memory tweaks

We are planning on using JDK 1.8 for Mule 3.7 CE.

In the past we edited wrapper.conf to tweak the memory JDK 1.6/1.7 uses. We did this by editing:

wrapper.java.initmemory=256m
wrapper.java.maxmemory=512
wrapper.java.additional.7=-XX:PermSize=256m
wrapper.java.additional.8=-XX:MaxPermSize=512m

Looking into the processes that are running in linux we see that Mule still uses xmx settings. If not mistaken, this no longer works in java 1.8 because it has been removed. Instead JDK 1.8 uses metaspace.

Now my question is, how/where to we make memory tweaks for Mule 3.7 using JDK 1.8? Or does Mule 3.7 CE not support this yet?

Do we simply add to wrapper.conf the following settings?:

wrapper.java.additional.16=-XX:MetaspaceSize=100M
wrapper.java.additional.17=-XX:MaxMetaspaceSize=2024m

And remove:

wrapper.java.initmemory=1024
wrapper.java.maxmemory=1024

Or we do still use the following settings?

wrapper.java.initmemory
wrapper.java.maxmemory?

Thanks!

Upvotes: 3

Views: 689

Answers (1)

user1760178
user1760178

Reputation: 6647

You can keep using the initmemory and maxmemory. Changing to Java 1.8 doesn't impact this.

We use Java 1.8 with Mule 3.7 in Linux and we are able to successfully control the heap allocation with the current setting of initmemory and maxmemory.

You might want to use Metaspace configuration only to replace PermGen settings.

wrapper.java.additional.16=-XX:MetaspaceSize=100M
wrapper.java.additional.17=-XX:MaxMetaspaceSize=2024m

Go through the following link for more understanding. http://www.infoq.com/articles/Java-PERMGEN-Removed

Hope this helps.

Upvotes: 1

Related Questions