JVM Parameters

本文档详细介绍了如何通过调整JVM参数来优化NetBeans IDE的性能,包括内存分配、垃圾回收策略、类卸载、代码验证等设置,旨在帮助用户提高开发效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

-Xms$m=Initial JVM heap size
-Xmx$m=Maximum JVM heap size
-XX/:PermSize/=32m=Initial size of permanent generation
-XX/:MaxPermSize/=96m=Size of the permanent generation
-ea=Enable assertions
-XX/:+UseConcMarkSweepGC=Try this, if you are having problems with intrusive garbage collection pauses. It causes the JVM to use different algorithms for major garbage collection events (also for minor collections, if run on a multiprocessor workstation), ones which do not "stop the world" for the entire garbage collection process. You should also add the line -J-XX:+CMSClassUnloadingEnabled and -J-XX:+CMSPermGenSweepingEnabled to your netbeans.conf file so that class unloading is enabled (it isn't by default when using this collector).
-XX/:+UseAdaptiveSizePolicy=this switch may help improve garbage collector throughput and memory footprint. It is part of garbage collector ergonomics implemented in JDK5.0.
-XX/:+UseParallelGC=Some tests have shown that, at least on systems fairly well equipped with memory, the durations of minor garbage collections is halved when using this collection algorithm, on uniprocessor systems. Note that this is paradoxical - this collector is designed to work best on multiprocessor systems with gigabyte heaps. No data is available on its effect on major garbage collections. Note: this collector is mutually exclusive with -J-XX:+UseConcMarkSweepGC. . The measurements supporting the use of this algorithm can be found on the performance website.
-XX/:CompileThreshold/=100=This switch will make startup time slower, by HotSpot to compile many more methods down to native code sooner than it otherwise would. The reported result is snappier performance once the IDE is running, since more of the UI code will be compiled rather than interpreted. This value represents the number of times a method must be called before it will be compiled.
-XX/:+CMSClassUnloadingEnabled=Enable class unloading when performing GC
-XX/:+CMSPermGenSweepingEnabled=Used in conjunction to CMSClassUnloadingEnabled
-Xverify/:none=This switch turns off Java bytecode verification, making classloading faster, and eliminating the need for classes to be loaded during startup solely for the purposes of verification. This switch improves startup time, and there is no reason not to use it.
-Dsun.java2d.opengl/=true=Enables a new OpenGL-based pipeline for Java 2D used to support hardware-accelerated rendering using OpenGL
-Dsun.java2d.d3d/=false=This switch disables DirectDraw and may solve performance problems with some HW configurations.
-Dawt.nativeDoubleBuffering/=true=This switch makes Swing assume the OS is handling double buffering and it shouldn't do any. This will probably not work over a remote X connection, but for local use it's very useful because you literally see every repaint get done, and it makes it very easy to notice if some operation is causing gratuitous repaints.
-Dswing.aatext/=true=Font anti-aliasing for Swing widgets can be turned on
--fontsize/ 11=It applies to fonts used in menus, dialogs and most components in the IDE. The size of fonts used in editors is also based on the --fontsize parameter as long as has not been customized by the user in Tools | Options | Editing | Editor Settings.
--laf/ net.sourceforge.napkinlaf.NapkinLookAndFeel=Configure the look and feel of NetBeans IDE
-Dnb.tabnames.html/=true=Instead of displaying an * beside the name of a modified file, and "[read-only]", on editor tabs, use bold for modified and italic for read-only.
-Dnetbeans.winsys.statusLine.in.menuBar/=true=Instead of having a statusbar at the bottom of the screen, make it part of the menu bar (won't work on Mac OS in current 5 builds, since they now use the screen menu bar)
-Dnetbeans.small.main.window/=true=This did a lot on the 3.5 windowing system; something is still checking it, but I didn't find out what. Related to statusline-in-menubar, for making size smaller
-Dnb.cellrenderer.fixedheight/=10=This is an integer in pixels. Set a fixed height for cells in all tree/list/table views. You can make the more cluttered this way (less space between items), which, if you want to fit the maximum info on screen possible, is desirable.
-Dnb.navigator.singleclick/=true=In list views, such as the class members view, clicking once on a method/field/etc. name will scroll the editor there (ala IDEA)
-Dnavigator.string.abbrevs/=true=Shorten names of methods that won't fit, rather than use a horizontal scrollbar. It selectively omits characters using a weighting algorithm - the results are readable for the same reason we know what all those ads for Genric Vigara are talking about.
-Dnb.navigator.decorate/=true=This one will cause some performance issues - once they're solved, it will probably be on by default. Boldface any methods that override methods in the parent class, italicize final methods, show native methods in blue, deprecated methods with strikethrough
-Dnb.navigator.no.related.items=false plus nb.navigator.relatedItems=true - (both of them) - Poor man's Find Usages - Whenever you put the caret in the editor inside a method or field definition/body, Navigator will highlight all of the methods in that same class which call the method/use the field where the caret is. This seems not to be working in today's build, but should work in 4.1.
-Dnb.navigator.noscroll/=true=Having Navigator scroll when the caret moves can be distracting; this disables auto scrolling. Works best if you dock Navigator to the right of the editor so it has a lot of height - for most java files, all methods will be displayed, and horizontal real estate is less critical than vertical screen real estate.
-Dnb.navigator.reordering/=true=Allow (in natural sort mode only - right click and choose it from the menu) you to drag and drop methods to reorder them in your sources
[omm@lm2hdp03 bin]$ ./start-cluster.sh Starting cluster. [ERROR] The execution result is empty. [ERROR] Could not get JVM parameters and dynamic configurations properly. [ERROR] Raw output from BashJavaUtils: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000080200000, 1404043264, 0) failed; error='Cannot allocate memory' (errno=12) # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 1404043264 bytes for committing reserved memory. # An error report file with more information is saved as: # /opt/gcytest/flink-1.17.1/bin/hs_err_pid30333.log Warning: Permanently added 'lm2hdp01,10.100.40.200' (ECDSA) to the list of known hosts. [INFO] 1 instance(s) of taskexecutor are already running on lm2hdp01. Starting taskexecutor daemon on host lm2hdp01. Warning: Permanently added 'lm2hdp02,10.100.40.202' (ECDSA) to the list of known hosts. [INFO] 1 instance(s) of taskexecutor are already running on lm2hdp02. Starting taskexecutor daemon on host lm2hdp02. Warning: Permanently added 'lm2hdp03,10.100.40.209' (ECDSA) to the list of known hosts. [ERROR] Could not get JVM parameters and dynamic configurations properly. [ERROR] Raw output from BashJavaUtils: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000080200000, 1404043264, 0) failed; error='Cannot allocate memory' (errno=12) # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 1404043264 bytes for committing reserved memory. # An error report file with more information is saved as: # /home/omm/hs_err_pid32379.log
06-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值