JVM -XX: 参数介绍
来源:互联网 发布:linux停到oracle服务 编辑:程序博客网 时间:2024/05/25 20:01
功能开关:
性能参数:
8 (1.3.1+), x86: 12, 其他默认 2新生代和年老代的堆内存占用比例, 例如2表示新生代占年老代的1/2,占整个堆内存的1/3-XX:NewSize=2.125m5.0以后: 64 bit Vms 会增大预设值的30%, x86: 1m, x86, 5.0以后: 640k, 其他默认 2.125m新生代预估上限的默认值-XX:ReservedCodeCacheSize=32mSolaris 64-bit, amd64, -server x86: 48m, 1.5.0_06之前, Solaris 64-bit amd64: 1024m, 其他默认 32m设置代码缓存的最大值,编译时用-XX:SurvivorRatio=8Solaris amd64: 6, Sparc in 1.3.1: 25, Solaris platforms 5.0以前: 32, 其他默认 8Eden与Survivor的占用比例。例如8表示,一个survivor区占用 1/8 的Eden内存,即1/10的新生代内存,为什么不是1/9?
因为我们的新生代有2个survivor,即S0和S1。所以survivor总共是占用新生代内存的 2/10,Eden与新生代的占比则为 8/10-XX:TargetSurvivorRatio=5050实际使用的survivor空间大小占比。默认是50%,最高90%-XX:ThreadStackSize=512Sparc: 512, Solaris x86: 320 (5.0以前 256), Sparc 64 bit: 1024, Linux amd64: 1024 (5.0 以前 0), 其他默认 512.线程堆栈大小-XX:+UseBiasedLockingJDK 5 update 6后引入,但需要手动启用, JDK6默认启用启用偏向锁-XX:+UseFastAccessorMethods默认启用优化原始类型的getter方法性能(get/set:Primitive Type)-XX:-UseISM默认启用启用solaris的ISM-XX:+UseLargePagesJDK 5 update 5后引入,但需要手动启用, JDK6默认启用启用大内存分页-XX:+UseMPSS1.4.1 之前: 不启用, 其余版本默认启用启用solaris的MPSS,不能与ISM同时使用-XX:+UseStringCache默认开启启用缓存常用的字符串。-XX:AllocatePrefetchLines=11Number of cache lines to load after the last object allocation using prefetch instructions generated in JIT compiled code. Default values are 1 if the last allocated object was an instance and 3 if it was an array.-XX:AllocatePrefetchStyle=11Generated code style for prefetch instructions.
0 – no prefetch instructions are generate*d*,
1 – execute prefetch instructions after each allocation,
2 – use TLAB allocation watermark pointer to gate when prefetch instructions are executed.-XX:+UseCompressedStringsJava 6 update 21有一选项其中,对于不需要16位字符的字符串,可以使用byte[] 而非char[]。对于许多应用,这可以节省内存,但速度较慢(5%-10%)-XX:+OptimizeStringConcat在Java 6更新20中引入优化字符串连接操作在可能的情况下
调试参数:
<cmd args>”1.4.2 update 12, 6当发生OOM时执行用户指定的命令-XX:-PrintClassHistogram1.4.2当Ctrl+Break发生时打印Class实例信息,与jmap -histo相同-XX:-PrintConcurrentLocks6当Ctrl+Break发生时打印java.util.concurrent的锁信息, 与jstack -l相同-XX:-PrintCommandLineFlags5打印命令行上的标记-XX:-PrintCompilation 当方法被编译时打印信息-XX:-PrintGC 当GC发生时打印信息-XX:-PrintGCDetails1.4.0打印GC详细信息-XX:-PrintGCTimeStamps1.4.0打印GC用时-XX:-PrintTenuringDistribution 打印Tenuring年龄信息-XX:-TraceClassLoading 跟踪类加载-XX:-TraceClassLoadingPreorder1.4.2跟踪所有加载的引用类-XX:-TraceClassResolution1.4.2跟踪常量池的变化-XX:-TraceClassUnloading 跟踪类的卸载-XX:-TraceLoaderConstraints6Trace recording of loader constraints-XX:+PerfSaveDataToFile 退出时保存jvmstat二进制文件-XX:ParallelGCThreads= 设置新生代与老年代并行垃圾回收器的线程数-XX:+UseCompressedOops Enables the use of compressed pointers (object references represented as 32 bit offsets instead of 64-bit pointers) for optimized 64-bit performance with Java heap sizes less than 32gb.-XX:+AlwaysPreTouch Pre-touch the Java heap during JVM initialization. Every page of the heap is thus demand-zeroed during initialization rather than incrementally during application execution.-XX:AllocatePrefetchDistance= Sets the prefetch distance for object allocation. Memory about to be written with the value of new objects is prefetched into cache at this distance (in bytes) beyond the address of the last allocated object. Each Java thread has its own allocation point. The default value varies with the platform on which the JVM is running.-XX:InlineSmallCode= 当编译的代码小于指定的值时,内联编译的代码-XX:MaxInlineSize=35 内联方法的最大字节数-XX:FreqInlineSize= 内联频繁执行的方法的最大字节码大小-XX:LoopUnrollLimit= Unroll loop bodies with server compiler intermediate representation node count less than this value. The limit used by the server compiler is a function of this value, not the actual value. The default value varies with the platform on which the JVM is running.-XX:InitialTenuringThreshold=7 设置初始的对象在新生代中最大存活次数-XX:MaxTenuringThreshold= 设置对象在新生代中最大的存活次数,最大值15,并行回收机制默认为15,CMS默认为4
0 0
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM -XX: 参数介绍
- JVM参数:-XX:ReservedCodeCacheSize
- JVM参数:-XX:StringTableSize
- JVM参数:-XX:CompileCommand
- JVM -XX:NewRatio、-XX:SurvivorRatio参数含义
- JVM -XX:NewRatio、-XX:SurvivorRatio参数含义
- linux下JVM参数-XX:+HeapDumpOnOutOfMemoryError 设置
- jvm 打印所有XX参数及值
- JVM GC的核心参数: -XX:Newratio -XX:Newsize -XX:Maxnewsize -XX:Surviorratio
- JVM调优总结 -Xms -Xmx -Xmn -Xss等
- NodeJS学习系列课程笔记(NodeJS util工具类相关使用方法)
- UE4中创建vive控制器交互
- 用python写一个简单的推荐系统
- 06:最短前缀
- JVM -XX: 参数介绍
- js获取url参数
- iOS开发--- CocoaLumberjack 的简单使用
- EventBus使用详解(一)——初步使用EventBus
- 使用PullToRefresh实现下拉刷新和上拉加载
- Vagrant Boxs
- HEVC标准概览(一)引言
- Java性能调优
- 《文件传输基础----Java IO流---《三》》