当前位置:网站首页>Common performance tools: if you want to be good at something, you must first sharpen its tools
Common performance tools: if you want to be good at something, you must first sharpen its tools
2022-07-22 19:48:00 【Blizzard 2008】
background
With the soaring business volume , The company's system needs high-speed iteration for business in the early stage , From the perspective of lean thinking , Rapid development of , Left a lot of historical baggage ( Or performance bad code), Lead to frequent performance problems , This article , Mainly sort out some commonly used performance tools , Some general ideas for troubleshooting performance problems will be updated later .
Linux Common performance tools
Generally speaking , My business is deployed in linux The server , I have to consider it here , Performance troubleshooting at the operating system level .
Linux Tool set for system analysis :
Brendan Gregg http://www.brendangregg.com/linuxperf.html
You can check the website in detail . What is mentioned in the above figure is linux All levels : application layer 、 System level 、 Driver layer 、 The network layer , And the corresponding troubleshooting commands , I won't cover all of them here , Click on the link , Make sure you receive a lot of goods .
Java Built in performance troubleshooting tool
- jstack Grab the current stack information , It is mainly used to view java What are the threads doing in , It is very suitable for troubleshooting the slow response of the system 、CPU High , Whether there are a series of problems such as hot lock . Everyone may only know jstack, But I suggest you also take a look jstack Some auxiliary parameters of ,jstack By default, you can only see Java Stack , and jstack -m You can see the thread Java Stack and native Stack .
Usually we go through linux command top -H and jstack To locate some cpu Execute higher questions . Two more are recommended linux The order of
pstack and perf pstack You can use it to see Java Process native Stack ,perf linux Performance analysis super weapon . - Memory related commands :
jmap obtain heap Information , He also has different parameters , Dealing with different scenarios such as jmap -dump and jmap -histo:live
# Extract process memory information , Used to analyze OOM Cause
jmap -dump:format=b,file=xxx.hprof <pid>
[ Export the whole JVM Memory information in ]
# Output heap information
jmap -heap <PID>
# Output permanent generation information
jmap -permstat <PID>
jstat View live gc situation , However, it is recommended to check for complex problems gclog
Generally, the running command is as follows :
jstat -gc 12538 5000
Every time 5 The process number is displayed once per second 12538 Of java Progressive GC situation ,
jps see java In the process of id Information
jhat see dump Information , However, it is not commonly used at present , More advanced tools are described below .
java Built in performance troubleshooting tool , It is very fast in troubleshooting some obvious problems , On the other hand, it is also a quick snapshot of online system status , Convenient for further analysis with sharp tools .
Further sharp weapon
gc Log analysis tool :
GCViewer and gceasy.io , Or online , You can import logs directly , Visual analysis gc situation .
2. Heap memory analysis tool :
MAT Also known as Eclipse Memory Analyzer
3. Thread analysis tool :
IBM JCA Tools (IBM Thread and Monitor Dump Analyze for Java)
A permissive in java The positioning thread in the thread is suspended / Deadlock / Tools for resource competition and bottlenecks .
4. Other performance tools :
JProfiler: Set CPU、 Memory and thread performance analysis in one , Can be used to analyze performance bottlenecks 、 Memory leak 、CPU Load and solve thread related problems , Support local and remote direct connection JVM, It is recommended not to use during peak hours online .
VisualVM: ditto
边栏推荐
- 树和二叉树:树的概念
- Initial experience of MariaDB spider sharding engine
- Atr5179 single pole double throw switch chip replaces as179-92lf
- firewall-cmd 常用操作命令
- Doctoral application | Professor Ni Zhuoxian of the University of Hong Kong enrolls doctoral students with the full award in the direction of Internet of things and machine learning
- C# DataGridView绑定数据源的几种常见方式
- Synchronized与lock锁区别
- Redis深水区经验梳理--面试参考
- HTB- Armageddon
- oracle怎样转义单引号
猜你喜欢
你经常遇到的IO模型
消息的可靠性与重复性
SVN服务端与客户端安装(汉化包)以及简单使用
Neo4j 示例:三国志人物关系图谱
Initial experience of MariaDB spider sharding engine
CI24R1低成本2.4G无线收发器芯片替代XN297精简版SI24R1
zabbix怎样创建只监控某个端口状态的模板
从数据标准到数据库设计:解决基础数据标准落地的最后一公里难题(下)
数据仓库模型设计与工具
Pytest interface automated testing framework | plug-in secondary development practice
随机推荐
How Oracle escapes single quotation marks
AForge “未能加载文件或程序集“AForge.Video.FFMPEG.dll”或它的某一个依赖项。找不到指定的模块”
Firewall CMD common operation commands
firewall-cmd 常用操作命令
CI24R1低成本2.4G无线收发器芯片替代XN297精简版SI24R1
字节码技术在动态代理中的实现探讨
Install MariaDB 10.5.7 (tar package installation)
js map与foreach区别
The luckiest geek in China: in his early twenties, he was worth more than 100 million, and retired after three startups
Modify the contents of /etc/crontab file directly, and the scheduled task will not take effect
08.01 邻接矩阵
SI12T触摸按键芯片替代TMS12
多态性
How can ZABBIX customize MySQL monitoring items and trigger alarms
PHP implementation of SQLite udf/udaf
NiO file lock
基础类型
Several methods of cumulative summation in MySQL
IO models you often encounter
直接修改/etc/crontab 文件内容,定时任务不生效