性能测试-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 
相关推荐
东阳马生架构15 小时前
JVM简介—3.JVM的执行子系统
jvm
程序员志哥21 小时前
JVM系列(十三) -常用调优工具介绍
jvm
后台技术汇21 小时前
JavaAgent技术应用和原理:JVM持久化监控
jvm
程序员志哥1 天前
JVM系列(十二) -常用调优命令汇总
jvm
黄油饼卷咖喱鸡就味增汤拌孜然羊肉炒饭1 天前
聊聊volatile的实现原理?
java·jvm·redis
_LiuYan_1 天前
JVM执行引擎JIT深度剖析
java·jvm
王佑辉1 天前
【jvm】内存泄漏的8种情况
jvm
工业甲酰苯胺1 天前
JVM简介—1.Java内存区域
java·jvm·python
yuanbenshidiaos2 天前
c++---------数据类型
java·jvm·c++