网站ip如何做跳转,室内装修设计图片欣赏,电子商务网站建设题,做婚恋网站需要什么资质jvm 运行时数据区
jvm 运行时数据区包括且不限于以下几个部分:
堆(heap): 用于存储对象实例和数组。堆内存的分配和释放由垃圾回收器进行管理。方法区(method area): 用于存储类的信息、静态变量、常量等。jdk 8 后方法区位于 metaspace。虚拟机栈(vm stack): 用于存储方法的…jvm 运行时数据区
jvm 运行时数据区包括且不限于以下几个部分:
堆(heap): 用于存储对象实例和数组。堆内存的分配和释放由垃圾回收器进行管理。方法区(method area): 用于存储类的信息、静态变量、常量等。jdk 8 后方法区位于 metaspace。虚拟机栈(vm stack): 用于存储方法的局部变量、参数值等。本地方法栈(native method stack): 用于存储本地方法调用的相关信息。程序计数器(program counter): 用于记录当前线程执行的字节码指令地址。
观察 jvm 运行时数据区内存使用的命令
观察 jvm 运行时数据区内存情况可以使用 jcmd 命令:
# 需要 JVM 参数配置 -XX:NativeMemoryTrackingsummary 或 -XX:NativeMemoryTrackingdetail
# 使用前需要先 su 切换到 pid 的用户(top 中可看一般 java 进程的用户是 tomcat)例如
su tomcat# 应用启动后输入
jcmd pid VM.native_memory summary
# 或
jcmd pid VM.native_memory detail# 例如
jcmd 385 VM.native_memory summary输出内容: 输出的 VM.native_memory 全部内容
[tomcatpreparedocker-dep2-7f64d558f8-gfkmw default.qunar.com]$ jcmd 385 VM.native_memory summary
385:Native Memory Tracking:(Omitting categories weighting less than 1KB)Total: reserved14696320KB, committed13246344KB
- Java Heap (reserved11534336KB, committed11534336KB)(mmap: reserved11534336KB, committed11534336KB)- Class (reserved1055872KB, committed34688KB)(classes #41524)( instance classes #39223, array classes #2301)(malloc7296KB #139986)(mmap: reserved1048576KB, committed27392KB)( Metadata: )( reserved196608KB, committed188544KB)( used186864KB)( waste1680KB 0.89%)( Class space:)( reserved1048576KB, committed27392KB)( used25440KB)( waste1952KB 7.13%)- Thread (reserved574463KB, committed245719KB)(thread #2115)(stack: reserved568244KB, committed239500KB)(malloc3741KB #12726)(arena2478KB #4229)- Code (reserved262510KB, committed170658KB)(malloc14822KB #46616)(mmap: reserved247688KB, committed155836KB)- GC (reserved506924KB, committed506924KB)(malloc45760KB #83524)(mmap: reserved461164KB, committed461164KB)- Compiler (reserved16021KB, committed16021KB)(malloc15856KB #9536)(arena165KB #5)- Internal (reserved95580KB, committed95576KB)(malloc95540KB #150203)(mmap: reserved40KB, committed36KB)- Other (reserved353690KB, committed353690KB)(malloc353690KB #1001)- Symbol (reserved38658KB, committed38658KB)(malloc36572KB #993784)(arena2086KB #1)- Native Memory Tracking (reserved24133KB, committed24133KB)(malloc302KB #4295)(tracking overhead23831KB)- Shared class space (reserved12288KB, committed12160KB)(mmap: reserved12288KB, committed12160KB)- Arena Chunk (reserved12414KB, committed12414KB)(malloc12414KB)- Tracing (reserved32KB, committed32KB)(arena32KB #1)- Logging (reserved7KB, committed7KB)(malloc7KB #288)- Arguments (reserved4KB, committed4KB)(malloc4KB #138)- Module (reserved4051KB, committed4051KB)(malloc4051KB #14643)- Safepoint (reserved8KB, committed8KB)(mmap: reserved8KB, committed8KB)- Synchronization (reserved872KB, committed872KB)(malloc872KB #7198)- Serviceability (reserved2042KB, committed2042KB)(malloc2042KB #35392)- Metaspace (reserved198597KB, committed190533KB)(malloc1989KB #2357)(mmap: reserved196608KB, committed188544KB)- String Deduplication (reserved1KB, committed1KB)(malloc1KB #8)- Object Monitors (reserved3817KB, committed3817KB)(malloc3817KB #18790)命令权限问题
如执行 jcmd pid VM.native_memory summary 命令后无输出需要通过 su 切换到 pid 的用户(top 中可看一般 java 进程的用户是 tomcat)