性能测试-jvm

1、jps: 查看java进程

[root@VM-100-3-centos ~]# jps
7088 Jps
1521 ruoyi-admin.jar
3978 sys_perf_01-0.0.1-SNAPSHOT.jar
[root@VM-100-3-centos ~]# 

2、jmap: 查看java内存

[root@VM-100-3-centos ~]# jmap -heap 3978
Attaching to process ID 3978, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.381-b09

using thread-local object allocation.
Parallel GC with 4 thread(s)

Heap Configuration:
   MinHeapFreeRatio         = 0
   MaxHeapFreeRatio         = 100
   MaxHeapSize              = 1258291200 (1200.0MB)
   NewSize                  = 42467328 (40.5MB)
   MaxNewSize               = 419430400 (400.0MB)
   OldSize                  = 85458944 (81.5MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 191365120 (182.5MB)
   used     = 76968480 (73.40286254882812MB)
   free     = 114396640 (109.09713745117188MB)
   40.220746602097606% used
From Space:
   capacity = 7864320 (7.5MB)
   used     = 7667760 (7.3125457763671875MB)
   free     = 196560 (0.1874542236328125MB)
   97.5006103515625% used
To Space:
   capacity = 11534336 (11.0MB)
   used     = 0 (0.0MB)
   free     = 11534336 (11.0MB)
   0.0% used
PS Old Generation
   capacity = 63438848 (60.5MB)
   used     = 11229000 (10.708808898925781MB)
   free     = 52209848 (49.79119110107422MB)
   17.70051057673683% used

13102 interned Strings occupying 1125712 bytes.
[root@VM-100-3-centos ~]# 

可以看到最大堆内存:MaxHeapSize = 1258291200 (1200.0MB)

这个数值是启动该java 服务时设置的最大内存,如下所示:

java -Xmx1200m -Dserver.port=18001 -jar sys_perf_01-0.0.1-SNAPSHOT.jar 
相关推荐
阿伟*rui4 小时前
jvm入门
jvm
学点东西吧.7 小时前
JVM(五、垃圾回收器)
jvm
请你打开电视看看9 小时前
Jvm知识点
jvm
程序猿进阶10 小时前
堆外内存泄露排查经历
java·jvm·后端·面试·性能优化·oom·内存泄露
阿龟在奔跑1 天前
引用类型的局部变量线程安全问题分析——以多线程对方法局部变量List类型对象实例的add、remove操作为例
java·jvm·安全·list
王佑辉1 天前
【jvm】方法区常用参数有哪些
jvm
王佑辉1 天前
【jvm】HotSpot中方法区的演进
jvm
Domain-zhuo1 天前
什么是JavaScript原型链?
开发语言·前端·javascript·jvm·ecmascript·原型模式
Theodore_10222 天前
7 设计模式原则之合成复用原则
java·开发语言·jvm·设计模式·java-ee·合成复用原则
我是苏苏2 天前
Web开发:ORM框架之使用Freesql的DbFrist封装常见功能
java·前端·jvm