How do I provide JVM arguments to VisualVM?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 14:47:12

Should be able to modify the memory settings in %JDK_HOME%\lib\visualvm\etc\visualvm.conf

Xms and Xmx are in the default_options line.

or I think this works too:

jvisualvm.exe -J-Xmx512m (or whatever amount you need)

-J on the .exe command line for onetime settings, or the .conf file noted in the other answer for changing defaults

Prabhat Jha

I started with

jvisualvm -J-Xms1024m -J-Xmx2048m

and it worked.

aspdeepak

In mac, you can configure them by editing this file.

/Applications/VisualVM.app/Contents/Resources/visualvm/etc/visualvm.conf

visualvm_default_options="-J-client -J-Xms4096m -J-Xmx5120m -J-XX:+IgnoreUnrecognizedVMOptions -J-Dnetbeans.accept_license_class=com.sun.tools.visualvm.modules.startup.AcceptLicense -J-Dsun.jvmstat.perdata.syncWaitMs=10000 -J-Dsun.java2d.noddraw=true"

For Mac OSX 10.12+

If you have downloaded the visualvm dmg from https://visualvm.github.io/download.html and have moved it to the Applications directory. You can find the configuration file visualvm.conf under the location Applications/VisualVM.app/Contents/etc/visualvm.conf. In this configuration file, you can change the

visualvm_default_options="-J-client -J-Xms24m -J-Xmx256m

to(e.g.)

visualvm_default_options="-J-client -J-Xms24m -J-Xmx2048m

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!