当前位置:网站首页>JVM (XX) -- performance monitoring and tuning (I) -- Overview
JVM (XX) -- performance monitoring and tuning (I) -- Overview
2022-07-07 05:24:00 【leo_ messi94】
1. Interview questions of Dachang
- JVM What does performance tuning do ?
- I did JVM Memory optimization ?
- from SQL、JVM、 framework 、 Four aspects of database optimization ideas
- JVM Compiler optimization
- JVM What diagnostic tuning tools have been used
- jvm How to tune 、 Heap memory 、 How much stack space is appropriate
- JVM What are the related analysis tools used ? What are the specific performance tuning steps
- jvm How to tune , How to set parameters
- How to understand the memory leak problem , What can cause memory leaks ? How to solve
- Why do hundreds of thousands of concurrent second killing systems happen frequently every second GC
- How to optimize the daily average million level trading system JVM
- On line production system OOM How to monitor, locate and solve
- How high concurrency system is based on G1 Recycler optimizes performance
2. The background that
2.1 Problems in the production environment
- How to deal with memory overflow in the production environment
- How much memory should the production environment allocate to the server
- How to optimize the performance of garbage collection period
- Production environment CPU How to deal with high load
- How many threads should the production environment allocate to the application ?
- No addition log, How to determine whether a line of code has been executed by a request
- No addition log, How to view the return value of a method in real time
2.2 Why tuning
- Avoid OOM
- solve OOM
- Reduce Full GC Frequency of occurrence
2.3 Different stages of consideration
- Before going online
- Project operation phase
- Appear online OOM
3. Tuning Overview
3.1 The basis of monitoring
- Run log
- Exception stack
- GC journal
- Thread snapshot
- Heap dump snapshot
3.2 The general direction of tuning
- Write code properly
- Make full and reasonable use of hardware resources
- Reasonably carry out JVM tuning
4. Performance optimization steps
4.1 Find the problem : Performance monitoring
- GC frequent
- CPU load Too high
- OOM
- Memory leak
- Deadlock
- The program response time is too long
4.2 Troubleshoot problems : Performance analysis
- Print GC journal , adopt GCviewer To analyze log information
- Flexible use of command line tools ,jstack,jmap,jinfo etc.
- dump Get out of the pile , Use memory analysis tools to analyze files
- Use Ali arthas perhaps jconsole、jvisualVM To implement the view JVM state
- jstack View stack information
4.3 solve the problem : performance tuning
- Increase memory appropriately , Choose garbage collector according to business in Beijing
- Optimize the code , Control memory usage
- Add machines , Disperse node pressure
- Reasonably set the number of threads in the thread pool
- Use middleware to improve program efficiency , Such as caching , Message queuing, etc
5. Performance evaluation 、 Test indicators
Pause time ( Or response time )
throughput
- The brightness of the workload completed in unit time
- stay GC in : The percentage of time spent running user code in total runtime ( Total operation time = The running time of the program + Time of memory recovery ) Figure two 1 - 1/(1 + n).-XX:GCTimeRatio = n
Concurrency number : At the same time , The number of requests that actually interact with the server
Memory footprint :java The amount of memory the heap occupies
边栏推荐
猜你喜欢
随机推荐
利用OPNET进行网络仿真时网络层协议(以QoS为例)的使用、配置及注意点
Sorry, I've learned a lesson
漏电继电器JELR-250FG
AOSP ~binder communication principle (I) - Overview
【js组件】自定义select
Knapsack problem unrelated to profit (depth first search)
Timer创建定时器
拿到PMP认证带来什么改变?
window定时计划任务
[Oracle] simple date and time formatting and sorting problem
在米家、欧瑞博、苹果HomeKit趋势下,智汀如何从中脱颖而出?
Phenomenon analysis when Autowired annotation is used for list
Safe landing practice of software supply chain under salesforce containerized ISV scenario
[question] Compilation Principle
【问道】编译原理
U++ metadata specifier learning notes
Linkedblockingqueue source code analysis - initialization
SQL injection cookie injection
Timer create timer
DFS,BFS以及图的遍历搜索