性能测试-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 
相关推荐
AAA 建材批发王哥(天道酬勤)4 小时前
JVM 由多个模块组成,每个模块负责特定的功能
jvm
JavaNice哥11 小时前
1初识别jvm
jvm
涛粒子11 小时前
JVM垃圾回收详解
jvm
YUJIANYUE11 小时前
PHP将指定文件夹下多csv文件[即多表]导入到sqlite单文件
jvm·sqlite·php
逊嘘11 小时前
【Java语言】抽象类与接口
java·开发语言·jvm
鱼跃鹰飞21 小时前
大厂面试真题-简单说说线程池接到新任务之后的操作流程
java·jvm·面试
王佑辉21 小时前
【jvm】Major GC
jvm
阿维的博客日记21 小时前
jvm学习笔记-轻量级锁内存模型
jvm·cas·轻量级锁
曹申阳1 天前
2. JVM的架构模型和生命周期
jvm·架构