当前位置:网站首页>What is JVM? What are the purposes of JVM tuning?
What is JVM? What are the purposes of JVM tuning?
2022-07-07 04:39:00 【Blue92120】
jvm The composition of
jvm Is one that can run java The virtual machine of bytecode . Loading subsystems by classes 、 Run time data area ( Memory model ) And bytecode execution engine , Cross platform , Shield the differences between the underlying hardware and instructions of different operating systems from the software level , Write in one place and run in multiple places. Pass before running javac The command will be converted to a bytecode file , When bytecode file is running JVM So I started to work .
1. Class loading subsystem
2. Run time data area :
Pile up : new The objects that come out are put in the heap , It is divided into old age and young generation , The elderly account for the whole pile 2/3, Younger generation 1/3. The young generation is divided into three parts : Eden Park ,survivor District (s0 and s1), The proportion 8:1:1 . When the objects in Eden Park are full , Bytecode engine will execute a garbage collection thread (minor( Pretty ) gc) Copy non garbage objects to survivor District , Then delete the garbage object
Stack : As long as one thread is running ,Java The virtual machine will allocate a little memory space to this thread , This space is called thread stack ( Used to put its own local variables inside the method ) A method corresponds to a stack frame memory area
Program counter : Each program will be assigned a program counter when it runs , Record the memory address of the code to be executed immediately , The function is that the current thread is robbed of the execution right , When resuming execution, continue to run from the recorded memory address
Method area : Store constants , Static variables , Class information ( After the bytecode file is loaded, it is placed in the method area )
Native Method Stack : The memory space allocated when executing local methods is provided by the local method stack , The underlying use C C++ The method of language writing is the local method
3. Bytecode execution engine
jvm tuning
Tuning purpose : The user process will be stopped when garbage is collected (STW) stop the word , Concentrate on garbage collection , Reduce GC(minor full)
Why would there be SWT: When the program is running , There's garbage ,full GC Start looking for garbage , Start with local variables and find all objects , Are marked as non garbage objects , Then looking for other variables . If there is a thread ,GC The thread is not finished yet , It's over first , Then the stack memory space in it will be released , Releasing it means that the local variable table is gone , Local variables are also destroyed , That just GC When looking for garbage, clearly mark these objects as not garbage objects , Now it's garbage again , This is not appropriate . So when recycling garbage , Let the user thread stop first , Don't affect the state of the object , Mark it and then clean up the garbage , Maybe the performance is a little higher
Can it be right? JVM tuning , Make it almost impossible Full GC :
Tuning Tools : Arthas( Alsace ) It is open source by Alibaba java Diagnostic tools , Support JDK6+, Use command line interaction mode . Easy to use , Monitor progress .
边栏推荐
- True global ventures' newly established $146million follow-up fund was closed, of which the general partner subscribed $62million to invest in Web3 winners in the later stage
- [multi threading exercise] write a multi threading example of the producer consumer model.
- 广告归因:买量如何做价值衡量?
- Golang compresses and decompresses zip files
- 案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展
- 【实践出真理】import和require的引入方式真的和网上说的一样吗
- Lecture 3 of "prime mover x cloud native positive sounding, cost reduction and efficiency enhancement lecture" - kubernetes cluster utilization improvement practice
- Easycvr cannot be played using webrtc. How to solve it?
- Digital chemical plant management system based on Virtual Simulation Technology
- 用CPU方案打破内存墙?学PayPal堆傲腾扩容量,漏查欺诈交易量可降至1/30
猜你喜欢

SSM+JSP实现企业管理系统(OA管理系统源码+数据库+文档+PPT)

九章云极DataCanvas公司蝉联中国机器学习平台市场TOP 3

树与图的深度优先遍历模版原理

Ssm+jsp realizes the warehouse management system, and the interface is called an elegant interface

EasyCVR无法使用WebRTC进行播放,该如何解决?

【ArcGIS教程】专题图制作-人口密度分布图——人口密度分析
![A detailed explanation of head pose estimation [collect good articles]](/img/22/7ae0b12c3d945b449bcc8bb4a8961b.jpg)
A detailed explanation of head pose estimation [collect good articles]

How to open win11 remote desktop connection? Five methods of win11 Remote Desktop Connection

Kivy tutorial of setting the size and background of the form (tutorial includes source code)

Win11图片打不开怎么办?Win11无法打开图片的修复方法
随机推荐
微信能开小号了,拼多多“砍一刀”被判侵权,字节VR设备出货量全球第二,今日更多大新闻在此
EasyCVR视频广场点击播放时,主菜单高亮效果消失问题的修复
图灵诞辰110周年,智能机器预言成真了吗?
Zero knowledge private application platform aleo (1) what is aleo
程序员上班摸鱼,这么玩才高端!
C#使用西门子S7 协议读写PLC DB块
How do test / development programmers get promoted? From nothing, from thin to thick
ESG全球领导者峰会|英特尔王锐:以科技之力应对全球气候挑战
Oracle -- 视图与序列
【ArcGIS教程】专题图制作-人口密度分布图——人口密度分析
leetcode 53. Maximum subarray maximum subarray sum (medium)
C # use Siemens S7 protocol to read and write PLC DB block
主设备号和次设备号均为0
Jetson nano配置pytorch深度学习环境//待完善
Five years of automated testing, and finally into the ByteDance, the annual salary of 30W is not out of reach
jvm是什么?jvm调优有哪些目的?
This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
Video fusion cloud platform easycvr video Plaza left column list style optimization
九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
軟件測試之網站測試如何進行?測試小攻略走起!