JVM performance profiling (有待整理)
Agenda
memory model
3 parts: heap, permgen (method area) , thread stack(pointer, local var)
heap: young and old generation ?? permanent generation
young: eden, fromspace(surviror1), tospace(surironr2)
== quoted ==
To get the clear memory diagram:http://blog.pointsoftware.ch/index.php/under-the-hood-runtime-data-areas-javas-memory-model/
http://www.yourkit.com/docs/kb/sizes.jsp
http://www.slideshare.net/gengmao/inside-the-jvm-memory-management-and-troubleshooting
PermGen
The method area is also known as the permanent generation space (PermGen). Allclass data are loaded into this memoryspace. This includes the field and method data and the code for the methods andconstructors
Heapmemory
Sinceobjects are stored in the heap part it is worth to have a closer look. The heapspace itself is again separated into several spaces:
-Young generation with eden and survivor space
-Old Generation with tenured space
Eachspace harbors objects with different life cycles:
-New/short-term objects are instantiated in theeden space.
-Survived/mid-term objects are copied from theeden space to the survivor space.
Tenured/long-term objects arecopied from the survivor to the old generation space.
== unquoted ==
jvm setting
GC algorithm: serial, ... etc, MaxNewSize, MaxSize , there is recommendation online, client side, server side and diff platform.
JavaOne: best heap percent :43% ??
tunning concerns
availablility , throughput, latency and responsiveness, memory footprint (100 txn need how many mem?), startup time
real time profiling
Remote
Add JMX parameter to bootstrap script
$JAVA_HOME/bin/java ${GC_OPTS} \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=9010 \
-Dcom.sun.management.jmxremote.local.only=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-classpath $PROJ_CLASSPATH ${BOOTSTRAPPER} ${PARAMETER}
Local
VisualVM/Jconsole is able to detect the running JAVA application process id..
http://www.gamlor.info/wordpress/2011/09/visualvm/
Eclipse for VisualVM (https://visualvm.java.net/eclipse-launcher.html)
JMX profile ?! - linux svr profile , like shell
server port number?! - need ask server team
Will it cause the app slowness? - yes, occupy CPU
post gc analysis
Enable the verbose:gc option in the bootstrap script
-verbose:gc
-Xms512m -Xmx1024m
-XX:+PrintGCTimestamps
-XX:+PrintGCDetails
-Xloggc:./${GC_LOG}
After the log file generated, you can use the tool to analyse. - GC Histogram Tool
All GC
Young GC - GC in young generation ?
Full GC -
Good tips:
Eclipse plugin center - for you to goto there via company proxy,
1. check from stackoverflow site - Add parm into eclipse.ini ;
2. disable socket proxy port
Websphere JVM profiling on app server
Ask WAS team to install a was plugin into for monitor
JVM performance profiling (有待整理)的更多相关文章
- JVM的相关知识整理和学习--(转载)
JVM是虚拟机,也是一种规范,他遵循着冯·诺依曼体系结构的设计原理.冯·诺依曼体系结构中,指出计算机处理的数据和指令都是二进制数,采用存储程序方式不加区分的存储在同一个存储器里,并且顺序执行,指令由操 ...
- JVM垃圾回收参数说明整理
java -Xms4g -Xmx4g -Xmn3g -Xss256k -server -XX:PermSize=64M -XX:MaxPermSize=64M -XX:+UseConcMarkSwee ...
- Java中JVM相关面试题-整理
1.JVM内存模型 •程序计数器:当前线程字所执行节码的行号指示器,用于记录正在执行的虚拟机字节指令地址,线程私有. •Java虚拟机栈:存放基本数据类型,对象的引用,方法出口等,线程私有. •本地方 ...
- 我把JVM的类加载器整理了一下
前言 之前去面试的时候面试官问了我关于关于JVM性能调优的问题,由于自己之前公司的项目里自己没有接触到JVM性能调优的相关问题(感觉这些都是公司架构师考虑的问题),所有面试官问的时候自己一脸懵逼, ...
- MySQL初步笔记,有待整理
查询表纪录: select * from tb1; 插入一条记录 insert tb1 values(value1,value2,...); 修改表的默认编码: alter table tb1 ch ...
- Linux Performance Profiling & Visualization
https://github.com/figozhang/CLK/tree/master/CLK2016 http://www.linuxep.com/
- 有关 Lambda && linq练习 有待整理
1. 查询Student表中的所有记录的Sname.Ssex和Class列.(select sname,ssex,class from student) Students.Select(s=> ...
- Java Performance Optimization Tools and Techniques for Turbocharged Apps--reference
Java Performance Optimization by: Pierre-Hugues Charbonneau reference:http://refcardz.dzone.com/refc ...
- jvm系列(十):如何优化Java GC「译」
本文由CrowHawk翻译,是Java GC调优的经典佳作. 本文翻译自Sangmin Lee发表在Cubrid上的"Become a Java GC Expert"系列文章的第三 ...
随机推荐
- php不允许用户提交空表单(php空值判断)
我们在设计提交空的评论时依然可以写入数据库,并在页面显示出来.这显然是不合理的,所以需要我们加入空值判断 可以修改代码,添加些判断: 复制代码代码如下: if(empty($_POST['name ...
- JDOM
JDOM是什么: To provide a complete, Java-based solution for accessing, manipulating, and outputting XML ...
- libiconv2.dll
一.问题描述 在我使用MinGW的mingw32-make工具的时候,提示错误“libiconv-2.dll找不到”. 二.问题解决 1.从脚本之家下载“libiconv-2.dll”,下载地址“ht ...
- 利用Jquery实现http长连接(LongPoll)
参考:http://www.cnblogs.com/vagerent/archive/2010/02/05/1664450.html PS:为了满足 某些需要 实时请求的业务(PS:例如聊天室),我们 ...
- 在ajax当中使用url重写来避免url的暴露
记得一次面试,有这样一道面试题:jsp页面当中需要用到ajax的实现,此时需要调用java的url:此时的问题是如果用户查看页面源码就能看到真是的url,这个问题如何避免.说实话,AJAX我用的只是皮 ...
- IOS公司开发者账号申请详细教程--1 备用
谈到苹果开发者账号,我们需要区分一下个人账号.公司账号和企业账号这三种,还有一种是教育账号,这个就不多说了. 个人账号:个人申请用于开发苹果app所使用的账号,仅限于个人使用,申请比较容易,$99. ...
- simhash--文本排重
转载自 https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/06.12.md http: ...
- Windows Xp Home Edition 安装IIS组件
问题描述: 在虚拟机(操作系统是Windows Xp Home Edition)中安装Sql Server 2005的时候警告缺少IIS相关组件,控制面板"添加/删除组件"中也没有 ...
- NAT(NAPT)地址转换过程
整理自NAT地址转换过程 注:本文实质讲的是NAPT(Network Address Port Translation),即网络端口地址转换.NAPT与动态地址NAT不同,它将内部连接映射到外部网络中 ...
- 【BZOJ 3110】 [Zjoi2013]K大数查询(整体二分)
[题目] Description 有N个位置,M个操作.操作有两种,每次操作如果是1 a b c的形式表示在第a个位置到第b个位置,每个位置加入一个数c如果是2 a b c形式,表示询问从第a个位置到 ...