After installing the JDK location where the tuning tool to:
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/jvisualvm
Example jdk1.8 tuning parameters:
-XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=256M -Xms256m -Xmx256m
Reference article:
https://blog.csdn.net/baidu_26780083/article/details/86671618