我是JavaMelody和基准测试新手。我正在使用JavaMelody在https://dzone.com/articles/a-step-by-step-guide-to-tomcat-performance-monitor之后的tomcat中监控我的Jersey应用程序。
我的应用程序设置: 4个docker容器由docker-compose设置:myapplication(tomcat,jersey application),kafka,postgres,zookeeper。
我从javaMelody监控页面获得了以下详细信息:
Host: 16a180e86bba@172.18.0.5
Java memory used: 784 Mb / 7,124 Mb ++++++++++++
Nb of http sessions: 0
Nb of active threads
(current http requests): 9
Nb of active jdbc connections: 0
Nb of used jdbc connections
(opened if no datasource): 0
System load 27.89
% System CPU 93.36 ++++++++++++
##############
# Details
##############
OS: OS Linux, 4.11.0-32-generic , amd64/64 (8 cores)
Java: OpenJDK Runtime Environment, 1.8.0
JVM: OpenJDK 64-Bit Server VM
PID of process: 1
Nb of opened files 418 / 1,048,576 ++++++++++++
Server: Server Apache Tomcat/8.0.50
Webapp context: /event-bus
Start: 2/28/18 2:47 PM
JVM arguments: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djdk.tls.ephemeralDHKeySize=2048
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
-Dignore.endorsed.dirs=
-Dcatalina.base=/usr/local/tomcat
-Dcatalina.home=/usr/local/tomcat
-Djava.io.tmpdir=/usr/local/tomcat/temp
Mean age of http sessions (min): -1
Tomcat "http-apr-8080": Busy threads = 17 / 200 ++++++++++++
Bytes received = 65,071,259
Bytes sent = 4,411,314
Request count = 538,335
Error count = 19,253
Sum of processing times (ms) = 17,998,558
Max processing time (ms) = 3,161
Memory: Non heap memory = 99 Mb (Perm Gen, Code Cache),
Buffered memory = 33 Mb,
Loaded classes = 9,535,
Garbage collection time = 1,420 ms,
Process cpu time = 854,410 ms,
Committed virtual memory = 14,718 Mb,
Free physical memory = 21,865 Mb,
Total physical memory = 32,052 Mb,
Free swap space = 32,651 Mb,
Total swap space = 32,651 Mb
Free disk space: 408,262 Mb
Dependencies: Dependencies Dependencies View Maven's pom View Maven's pom
Threads Threads
Threads on 16a180e86bba@172.18.0.5: Number = 624, Maximum = 681, Total started = 1,182
我有一些问题:
1,我设置了4个docker容器,其中一个正在运行tomcat。 JavaMelody是否给出了应用程序的CPU和内存使用情况或仅仅是docker容器的准确结果?
2,我的机器中有8个核心,% System CPU 93.36
是指 y应用程序使用所有8个核心CPU资源的93.36%?
我使用docker stats <docker id>
并且我的应用程序CPU %
约为336%。我很困惑。
3,system load
是什么意思?
4,7124 Mb
在Java memory used: 784 Mb / 7,124 Mb ++++++++++++
中的含义是什么?
5,在Tomcat "http-apr-8080": Busy threads = 17 / 200 ++++++++++++
和Threads on 16a180e86bba@172.18.0.5: Number = 624, Maximum = 681, Total started = 1,182
。
17/200
是否表示接受连接的最大线程数为200,但只使用了17。但是Number = 624, Maximum = 681, Total started = 1,182
是什么意思?
6,我使用ab以200并发方式发送20000个请求。但为什么只使用17/200
?如何制作200/200
?
感谢。
答案 0 :(得分:0)
Theads on ...: Number = 624, Maximum = 681, Total started = 1,182
表示有624个线程处于活动状态,最近有681个处于活动状态,自启动Tomcat以来已启动了1182个线程