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 (有待整理)的更多相关文章

  1. JVM的相关知识整理和学习--(转载)

    JVM是虚拟机,也是一种规范,他遵循着冯·诺依曼体系结构的设计原理.冯·诺依曼体系结构中,指出计算机处理的数据和指令都是二进制数,采用存储程序方式不加区分的存储在同一个存储器里,并且顺序执行,指令由操 ...

  2. JVM垃圾回收参数说明整理

    java -Xms4g -Xmx4g -Xmn3g -Xss256k -server -XX:PermSize=64M -XX:MaxPermSize=64M -XX:+UseConcMarkSwee ...

  3. Java中JVM相关面试题-整理

    1.JVM内存模型 •程序计数器:当前线程字所执行节码的行号指示器,用于记录正在执行的虚拟机字节指令地址,线程私有. •Java虚拟机栈:存放基本数据类型,对象的引用,方法出口等,线程私有. •本地方 ...

  4. 我把JVM的类加载器整理了一下

    前言 ​ 之前去面试的时候面试官问了我关于关于JVM性能调优的问题,由于自己之前公司的项目里自己没有接触到JVM性能调优的相关问题(感觉这些都是公司架构师考虑的问题),所有面试官问的时候自己一脸懵逼, ...

  5. MySQL初步笔记,有待整理

     查询表纪录: select * from tb1; 插入一条记录 insert tb1 values(value1,value2,...); 修改表的默认编码: alter table tb1 ch ...

  6. Linux Performance Profiling & Visualization

    https://github.com/figozhang/CLK/tree/master/CLK2016 http://www.linuxep.com/

  7. 有关 Lambda && linq练习 有待整理

    1. 查询Student表中的所有记录的Sname.Ssex和Class列.(select sname,ssex,class from student) Students.Select(s=> ...

  8. Java Performance Optimization Tools and Techniques for Turbocharged Apps--reference

    Java Performance Optimization by: Pierre-Hugues Charbonneau reference:http://refcardz.dzone.com/refc ...

  9. jvm系列(十):如何优化Java GC「译」

    本文由CrowHawk翻译,是Java GC调优的经典佳作. 本文翻译自Sangmin Lee发表在Cubrid上的"Become a Java GC Expert"系列文章的第三 ...

随机推荐

  1. jQuery学习 day01

    最近受某大牛指点(我不会说他姓范),了解了一下jQuery,据说很牛X,就了解了一下,第一天,分享给大家一些心得吧. 1.首先就是导入jQuery文件了,这里我是去jQuery官网下载的.(大家可以去 ...

  2. javascript 单行向上滚动文字

    <html><head><meta http-equiv="Content-Type" content="text/html; charse ...

  3. @using (Html.BeginForm())收集

    一 ,制定表单提交方式和路径 1,指明(视图,控制器,提交方式,参数) <%using(Html.BeginForm("Index","Home",For ...

  4. javascript 写状态模式

    写了状态模式的切换,以及分支循环.but 怎么实现子状态嵌套呢? /** * by JackChen 2016-3-26 11.51.20 * * 状态模式: * 一个状态到另一个状态的变换.其实可以 ...

  5. python 数据类型(元组(不可变列表),字符串

    元组(不可变列表) 创建元组: ages = (11, 22, 33, 44, 55) 或 ages = tuple((11, 22, 33, 44, 55)) 一般情况下是不需要被人该的数值才使用元 ...

  6. C#winform程序安装时自动卸载新版本覆盖旧版本

    vs2005为winform程序做的安装包.在以有程序旧版本的机子上用新版本的安装包安装软件时提示  “以经安装该产品的另一个版本.无法继续安装此版本........” 在安装部署项目中设“Remov ...

  7. ubuntu16.04添加开机启动任务

    比如要把run-nexus.sh这个脚本制作成开机启动项. 系统工具->首选项->启动应用程序.添加该文件,即可.

  8. Clang 与 LLVM

    我们在iOS调试中经常会看到Clang这个,那么Clang到底是什么呢?我们来简单了解一下. Clang是一个C.C++.OC语言的轻量级编译器.源代码发布于BSD协议下.Clang是由C++编写,基 ...

  9. Matlab中Rand()函数用法

    一.理论准备 matlab函数randn:产生均值为0,方差 σ^2 = 1,标准差σ = 1的正态分布的随机数或矩阵的函数. 用法:Y = randn(n),返回一个n*n的随机项的矩阵.如果n不是 ...

  10. nojs iis asp.net mvc

    http://blogs.msdn.com/b/scott_hanselman/archive/2011/11/29/window-iis-node-js.aspx http://www.hansel ...