How to memory profile in Java?

Strings are problematic Basically in Java, String references ( things that use char[] behind the scenes ) will dominate most business applications memory wise. How they are created determines how much memory they consume in the JVM. Just because they are so fundamental to most business applications as a data type, and they are one … Read more

How to memory profile in Java?

Strings are problematic Basically in Java, String references ( things that use char[] behind the scenes ) will dominate most business applications memory wise. How they are created determines how much memory they consume in the JVM. Just because they are so fundamental to most business applications as a data type, and they are one … Read more

JVM memory usage out of control

You can’t control what you want to control, -Xmx only controls the Java Heap, it doesn’t control consumption of native memory by the JVM, which is consumed completely differently based on implementation. VisualVM is only showing you what the Heap is comsuming, it doesn’t show what the entire JVM is consuming as native memory as … Read more

VisualVM over ssh

You either need to run jstatd on the remote side, or specify a JMX connection using host:port. Jstatd: jstatd -J-Djava.security.policy=permissions.txt [-p port] After that: add a remote connection to the target machine, and on the properties of that remote connection configure the jstatd connection. (permissions.txt contains for example this: grant { permission java.security.AllPermission; }; Edit: … Read more