Java HotSpot VM 参数

SAP CDS View association 的工作原理,与数据库传统 join 操作的区别讲解 笔者前一篇教程,介绍了 SAP CDS View 里如何创建 association:本文就来一一对这些问题进行解答。首先我们来研究如何消费创建好的 SAP CDS View 中的 association 数据。在上图 ABAP Development Tool 里展示的 CDS View 界面,点击 F8 快捷键,进入 Data Preview 即数据预览界面。我们随便选中一条行项目,右键,发现右键菜单里,赫然有一条的菜单项。看来这个功能肯定和 association 相关了。 阅读详情

Java HotSpot VM参数类别

 

  • 以-X开头的参数是非标准的(不保证在所有的VM实现里都支持),并且在后续的JDK版本发布中修改后不作通告。
  • 以-XX开头的参数是不稳定的,并且它也不推荐,只是临时使用。这些参数同样在修改后不作通告。

 

一些有用的-XX参数

 

这些参数的默认值在不同的平台上可能会有不同的值。不同平台的不同默认值列在描述里。

  • Boolean参数可以通过-XX:+<option>进行开启(true),通过-XX:-<option>进行关闭(false)。
  • Numeric参数可以通过-XX:<option>=<number>进行设置。数据可以包含'm'或'M'来表示兆,'k'或'K'表示千字节。'g'或'G'表示千兆。(例如, 32k等于32768)。
  • String参数可以通过-XX:<option>=<string>进行设置, 它通常用来指文件,路径或一些命令的列表。

 


行为参数

参数及默认值                                    描述

-XX:-AllowUserSignalHandlers Do not complain if the application installs signal handlers. (Relevant to Solaris and Linux only.)

-XX:AltStackSize=16384Alternate signal stack size (in Kbytes). (Relevant to Solaris only, removed from 5.0.)

-XX:-DisableExplicitGCDisable calls to System.gc(), JVM still performs garbage collection when necessary.

-XX:+FailOverToOldVerifierFail over to old verifier when the new type checker fails. (Introduced in 6.)

-XX:+HandlePromotionFailureThe youngest generation collection does not require a guarantee of full promotion of all live objects. (Introduced in 1.4.2update 11) [5.0 and earlier: false.]

-XX:+MaxFDLimitBump the number of file descriptors to max. (Relevant to Solaris only.)

-XX:PreBlockSpin=10Spin count variable for use with -XX:+UseSpinning. Controls themaximum spin iterations allowed before entering operating system threadsynchronization code. (Introduced in 1.4.2.)

-XX:-RelaxAccessControlCheck Relax the access control checks in the verifier. (Introducedin 6.)

-XX:+ScavengeBeforeFullGCDo young generation GC prior to a full GC. (Introduced in 1.4.1.)

-XX:+UseAltSigsUse alternate signals instead of SIGUSR1 and SIGUSR2 for VMinternal signals. (Introduced in 1.3.1 update 9, 1.4.1. Relevant toSolaris only.)

-XX:+UseBoundThreadsBind user level threads to kernel threads. (Relevant toSolaris only.)

-XX:-UseConcMarkSweepGCUse concurrent mark-sweep collection for the old generation.(Introduced in 1.4.1)

-XX:+UseGCOverheadLimitUse a policy that limits the proportion of the VM's time that isspent in GC before an OutOfMemory error is thrown. (Introduced in 6.)

-XX:+UseLWPSynchronizationUse LWP-based instead of thread based synchronization. (Introduced in 1.4.0. Relevant to Solaris only.)

-XX:-UseParallelGCUse parallel garbage collection for scavenges. (Introduced in 1.4.1)

-XX:-UseParallelOldGCUse parallel garbage collection for the full collections. Enablingthis option automatically sets -XX:+UseParallelGC. (Introduced in 5.0update 6.)

-XX:-UseSerialGCUse serial garbage collection. (Introduced in 5.0.)

-XX:-UseSpinningEnable naive spinning on Java monitor before entering operatingsystem thread synchronizaton code. (Relevant to 1.4.2 and 5.0 only.)[1.4.2, multi-processor Windows platforms: true]

-XX:+UseTLABUse thread-local object allocation (Introduced in 1.4.0, known asUseTLE prior to that.) [1.4.2 and earlier, x86 or with -client: false]

-XX:+UseSplitVerifierUse the newtype checker with StackMapTable attributes. (Introduced in 5.0.)[5.0: false]

-XX:+UseThreadPrioritiesUse native thread priorities.

-XX:+UseVMInterruptibleIOThread interrupt before or with EINTR for I/O operations results in OS_INTRPT. (Introduced in 6. Relevant to Solaris only.)

 


性能参数

 

参数及默认值                               描述

-XX:+AggressiveOptsTurn on point performance compiler optimizations that are expectedto be default in upcoming releases. (Introduced in 5.0 update 6.)

-XX:CompileThreshold=10000Number of method invocations/branches before compiling [-client: 1,500]

-XX:LargePageSizeInBytes=4mSets the large page size used for the Java heap. (Introduced in 1.4.0 update 1.) [amd64: 2m.]

-XX:MaxHeapFreeRatio=70Maximum percentage of heap free after GC to avoid shrinking.

-XX:MaxNewSize=sizeMaximum size of new generation (in bytes). Since 1.4, MaxNewSize iscomputed as a function of NewRatio. [1.3.1 Sparc: 32m; 1.3.1 x86:2.5m.]

-XX:MaxPermSize=64mSize of the Permanent Generation.  [5.0 and newer: 64 bit VMs are scaled 30% larger; 1.4 amd64: 96m; 1.3.1 -client: 32m.]

-XX:MinHeapFreeRatio=40Minimum percentage of heap free after GC to avoid expansion.

-XX:NewRatio=2Ratio of new/old generation sizes. [Sparc -client: 8; x86 -server: 8; x86 -client: 12.]-client: 4 (1.3) 8 (1.3.1+), x86: 12]

-XX:NewSize=2.125mDefault size of new generation (in bytes) [5.0 and newer: 64 bit VMs are scaled 30% larger; x86: 1m; x86, 5.0 and older: 640k]

-XX:ReservedCodeCacheSize=32m Reserved code cache size (in bytes) - maximum code cache size.[Solaris 64-bit, amd64, and -server x86: 48m; in 1.5.0_06 and earlier,Solaris 64-bit and and64: 1024m.]

-XX:SurvivorRatio=8Ratio of eden/survivor space size [Solaris amd64: 6; Sparc in 1.3.1: 25; other Solaris platforms in 5.0 and earlier: 32]

-XX:TargetSurvivorRatio=50Desired percentage of survivor space used after scavenge.

-XX:ThreadStackSize=512Thread Stack Size (in Kbytes). (0 means use default stack size)[Sparc: 512; Solaris x86: 320 (was 256 prior in 5.0 and earlier); Sparc64 bit: 1024; Linux amd64: 1024 (was 0 in 5.0 and earlier); allothers 0.]

-XX:+UseBiasedLockingEnable biased locking. For more details, see this tuningexample. (Introduced in 5.0 update 6.) [5.0: false]

-XX:+UseFastAccessorMethodsUse optimized versions of Get<Primitive>Field.

-XX:-UseISMUse Intimate Shared Memory. [Not accepted for non-Solarisplatforms.] For details, see Intimate Shared Memory.

-XX:+UseLargePagesUse large page memory. (Introduced in 5.0 update 5.) For details, see Java Support for Large MemoryPages.

-XX:+UseMPSS

Use Multiple Page Size Support w/4mb pages for the heap. Do not usewith ISM as this replaces the need for ISM. (Introduced in 1.4.0 update1, Relevant to Solaris 9 and newer.) [1.4.1and earlier: false


调试参数

 

参数及默认值                                                描述

-XX:-CITimePrints time spent in JIT Compiler. (Introduced in 1.4.0.)

-XX:ErrorFile=./hs_err_pid<pid>.logIf an error occurs, save the error data to this file. (Introduced in 6.)

-XX:-ExtendedDTraceProbesEnable performance-impacting dtrace probes. (Introduced in 6.Relevant to Solaris only.)

-XX:-HeapDumpOnOutOfMemoryErrorDump heap to file when java.lang.OutOfMemoryError is thrown. Manageable.(Introduced in 1.4.2 update 12, 5.0 update 7.)

-XX:OnError="<cmd args>;<cmd args>" Run user-defined commands on fatal error. (Introduced in1.4.2 update 9.)

-XX:OnOutOfMemoryError="<cmd args>;
<cmd args>"
 Run user-defined commands when an OutOfMemoryError is first thrown. (Introduced in 1.4.2 update 12, 6)

-XX:-PrintClassHistogramPrint a histogram of class instances on Ctrl-Break. Manageable. (Introduced in 1.4.2.) The jmap -histo

command provides equivalent functionality.
-XX:-PrintConcurrentLocksPrint java.util.concurrent locks in Ctrl-Break thread dump. Manageable.(Introduced in 6.) The jstack -l command provides equivalent functionality.

-XX:-PrintCommandLineFlagsPrint flags that appeared on the command line. (Introduced in 5.0.)

-XX:-PrintCompilationPrint message when a method is compiled.

-XX:-PrintGCPrint messages at garbage collection. Manageable.

-XX:-PrintGC DetailsPrint more details at garbage collection. Manageable. (Introduced in 1.4.0.)

-XX:-PrintGCTimeStampsPrint timestamps at garbage collection. Manageable(Introduced in 1.4.0.)

-XX:-PrintTenuringDistributionPrint tenuring age information.

-XX:-TraceClassLoadingTrace loading of classes.

-XX:-TraceClassLoadingPreorderTrace all classes loaded in order referenced (not loaded). (Introduced in 1.4.2.)

-XX:-TraceClassResolutionTrace constant pool resolutions.(Introduced in 1.4.2.)

-XX:-TraceClassUnloadingTrace unloading of classes.

-XX:-TraceLoaderConstraintsTrace recording of loader constraints. (Introduced in 6.)

 


相关参考:

java虚拟机参数说明
The most complete list of -XX options for Java 6 JVM

2025年7月12日全国青少年信息素养大赛图形化(Scratch)编程小学低年级组复赛真题+答案解析 阅读详情

相关推荐

国税局发票查验中英文验证码识别最新版,识别率99.9%

采用深度学习进行发票查验验证码模型的训练,在我电脑上模型训练的环境如下: 显卡:RTX 2080TI tensorflow-gpu:2.5.3 1 训练集和测试集的准备 发票查验的验证码分为4种类型,分别为黑色、红色、黄色、蓝色,经过我的测试,采用4个模型的效果最好,每个模型对应识别一种类型的验证码。 首先我们4种类型的验证码都准备10万张。 00黑色类型的验证码: 01红色类型的验证码: 02黄色类型的验证码: 03蓝色类型的验证码: 验证码图像图像准备好后,对其进行标记,也就是对验证码重命名:

Keras深度学习 83万+

Java中VM options与Program arguments区别与作用

Java中VM options与Program arguments区别与作用

pi_tiger的博客 1753

c语言实现求一个矩阵特征值和特征向量

前言 求矩阵的特征值,主要是用的QR分解,在我的有一次博客里,我已经详细地给出了计算的过程,大家有兴趣可以去看下,经过几天的钻研,终于完成了整个的eig算法。下面我将把我的整个代码附上,有不懂的可以问我,欢迎一起讨论学习! 这是对上一次的修改版,上一次写的程序是在C++编译环境下编译的,所以放在c里面编译有些会出错。 最后,如果有不对的地方希望大...

qq_36417014的博客 2万+

Java HotSpot VM命名参数选项详解

Java Hotspot VM 可选参数选项可以划分为四类: Ø 行为选项改变了基本VM的行为。 Ø G1垃圾收集器选项(GarbageFirst (G1) Garbage Collection Options) Ø 性能调优选项就一个个能够用来调节VM性能的旋钮 Ø 调试选项一般跟踪、打印或是输出VM信息。在跟踪程序的处理流程非常有用,尤其对于不知道程序有问题而不知道问题

java的平凡之路 3911

YOLO11改进|YOLO11中引入注意力和卷积融合模块CAFMAttention

YOLO11改进|YOLO11中引入注意力和卷积融合模块CAFMAttention

A1983Z的博客 1239

让 ABAP Screen Variant 安稳上车:SHD0 与 SHD0_MANDT 的 Transport 全攻略

摘要: SAP项目常需优化交易码界面,通过SHD0的Transaction Variant和Screen Variant可实现字段精简、默认值预设及权限控制,避免修改标准代码。但跨系统迁移时易出现变式丢失或版本兼容问题。核心概念包括: Screen Variant:针对单个屏幕的字段属性配置(跨Client); Transaction Variant:串联多屏幕变式(分跨Client和Client-specific); 版本差异:4.70/6.x后需区分SHD0(跨Client)与SHD0_MANDT(Cl

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 240

Java HotSpot VM警告排查:SpringBoot启动时JVM参数被忽略怎么办

在Java应用开发中,JVM参数的正确配置直接关系到垃圾回收策略、堆内存管理和整体性能表现。SpringBoot项目启动时偶尔出现的Java HotSpot(TM) 64-Bit Server VM warning,并不代表启动失败,却暗示着某些JVM选项未被生效——比如CMS垃圾收集器在JDK 14后被移除,导致旧参数形同虚设。这类警告常源于IDEA运行配置中的历史遗留参数、全局VM选项、环境变量或JDK与SpringBoot版本不匹配。理解警告背后的原理,有助于开发者从更通用的角度排查问题,避免因参数失

weixin_30074763的博客 197

基于TKVA与深度学习的量子点微型光谱仪光谱重建改进算法研究

本文提出了一种融合深度学习的改进TKVA算法(TKVA-DL),用于提升量子点微型光谱仪的光谱重建精度。该方法创新性地结合深度先验网络与注意力机制,通过自适应学习光谱隐式先验替代传统固定正则化项,并动态加权探测器响应通道。实验表明,所提方法在仿真和实测数据上均显著优于传统TKVA及主流深度学习算法,RMSE降低35%,PSNR提升4.2 dB,同时保持物理可解释性。完整MATLAB实现验证了方法的有效性与可复现性,为微型光谱仪的高精度重建提供了新思路。 关键词:量子点微型光谱仪;光谱重建;Tikhonov正

AI的内部世界的博客 89

Java HotSpot VM参数大全

jvm调优是每个java程序员几乎绕不开的话题,本文就把jvm常用的一些命令参数记录下,方便以后使用,也希望能帮助到有需要的朋友。因为本文内容来自oracle官网,更多的信息可以参考oracle官网。 行为参数: Option and Default Value Description -XX:-AllowUserSignalHandlers Do not complain i...

johnhuster的专栏 803

【异常】OpenClaw 项目 `fetch failed` 报错问题排查与解决方案Response interrupted: TypeError: fetch failed

针对无超时控制、异常兜底缺失导致的请求中断,封装标准化的安全请求工具,一次性解决超时控制、异常捕获、日志埋点三大问题,全项目替换原生。:将项目运行的 Node.js 版本升级至 18.x 及以上 LTS 版本,使用 Node.js 内置的稳定版。实现的网络请求环节,包括但不限于:第三方开放接口调用、内部服务接口通信、跨域资源请求、外部配置拉取等场景。:针对无法升级 Node.js 版本的存量环境,通过社区稳定兼容包替换原生。类型异常,直接造成业务请求响应中断。第二步:业务代码改造,替换原生。

奶爸的编程之路,也就一周冷个三天 376

3D结构光 vs TOF——手机厂商为何选择TOF方案?

3D视觉感知技术路线分析:结构光与TOF对比 3D视觉感知领域存在结构光和TOF两大主流技术。结构光基于三角定位法,精度高(毫米级)但工作距离短(<1.5米),适合人脸识别等近距离场景;TOF通过测量光脉冲飞行时间计算深度,精度中等(厘米级)但工作距离长(0.5-5米+),更适合AR导航等中远距离应用。手机厂商选型时考虑:前置认证选择结构光(如苹果FaceID),后置场景倾向TOF(安卓阵营),因后者更适配全面屏设计、环境适应性强且成本优势明显。两种技术互补共存,共同推动3D感知应用发展。

致力于lidar应用开发 121

JAVA HOTSPOT VM参数大全

(本文JDK版本6.0)   SUN的JDK版本从1.3.1开始使用HotSpot虚拟机技术。 HotSpot是较新的Java虚拟机技术,用来代替JIT(Just in Time)技术,可以大大提高Java运行的性能。 Java原先是把源代码编译为字节码在虚拟机执

rj042的专栏 4098

OAuth2.0集成SpringSecurity加JWT实现单点登录

单点登录(Single sign on),英文名称缩写SSO,SSO的意思就是在多系统的环境中,登录单方系统,就可以在不用再次登录的情况下访问相关受信任的系统。也就是说只要登录一次单体系统就可以

Nicky's blog 9044

Java HOTSPOT VM参数大全

SUN的JDK版本从1.3.1开始使用HotSpot虚拟机技术。   HotSpot是较新的Java虚拟机技术,用来代替JIT(Just in Time)技术,可以大大提高Java运行的性能。   Java原先是把源代码编译为字节码在虚拟机执行,这样执行速度较慢。而该技术将常用的部分代码编译为本地(原生,native)代码,这样显著提高了性能。用于服务器版和标准版的HotSpot有所不同。 ...

BAK 224

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Java HotSpot VM Options 参数设置

https://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html 转载于:https://www.cnblogs.com/newlangwen/p/10123175.html

weixin_34015566的博客 310

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

Java HotSpot VM 命令行参数【官方版】

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33859665的博客 211

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

Java HotSpot VM的-Xshare参数详解:为什么会出现‘Sharing is only supported for boot loader classes‘警告?

本文深入解析Java HotSpot VM的-Xshare参数,探讨类共享技术(CDS)的实现原理及性能优化实践。从类加载机制到生产环境配置,详细介绍了-Xshare的三种模式及其适用场景,并针对常见的'Sharing is only supported for boot loader classes'警告提供解决方案。文章还分享了现代Java版本中的CDS最佳实践,包括容器化环境下的优化技巧和性能对比数据。

weixin_29313817的博客 106

java 获取vm 参数_如何从Java应用程序内部获取VM参数?

至尊宝的传说我发现HotSpot列出了管理bean中除-client和-server之外的所有VM参数。因此,如果从VM名称推断出-client / -server参数并将其添加到运行时管理bean的列表中,则会获得完整的参数列表。这是SSCCE:importjava.util.*;importjava.lang.management.ManagementFactory;classmain...

weixin_35719180的博客 755

Java HotSpot VM参数大全,rabbitmq分布式事务面试题

如果你选择了IT行业并坚定的走下去,这个方向肯定是没有一丝问题的,这是个高薪行业,但是高薪是凭自己的努力学习获取来的,这次我把P8大佬用过的一些学习笔记(pdf)都整理在本文中了《Java中高级核心知识全面解析》记(pdf)都整理在本文中了《Java中高级核心知识全面解析》[外链图片转存中…(img-YtfeYiQX-1711744441965)][外链图片转存中…(img-CFe0ISQ0-1711744441966)]

2401_83627805的博客 623

JVM内存调优:GC 优化+HotSpot VM 参数,java程序员面试笔记

由于细节内容实在太多了,为了不影响文章的观赏性,只截出了一部分知识点大致的介绍一下,每个小节点里面都有更细化的内容!小编准备了一份Java进阶学习路线图(Xmind)以及来年金三银四必备的一份《Java面试必备指南》小编准备了一份Java进阶学习路线图(Xmind)以及来年金三银四必备的一份《Java面试必备指南》[外链图片转存中…(img-U34uK8PE-1711759157100)]

ccc6553584的博客 890
上一篇: struts中使用form标记
下一篇: java虚拟机参数说明
youfly
博客等级 码龄25年 24粉丝 23原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值