`
lixjluck
  • 浏览: 105225 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

20110809

 
阅读更多

The maximum heap size of a Java application is limited by three factors

1、the process data model (32-bit or 64-bit) and the associated operating system limitations(what?)

2、the amount of virtual memory available on the system

3、the amount of physical memory available on the system

 

Committing too much of a system's physical memory is likely to result in paging of virtual memory to disk, quite likely during garbage collection operations, leading to significant performance issues。

 

young generation size:

1、the largest recommended value for the young generation is 3/8 of the maximum heap size.

Note that with the throughput and low pause time collectors it may be possible to exceed this ratio 

 

Garbage Collector Policy

The -XX:+UseParallelsGC parallel (throughput) garbage collector, or

The -XX:+UseConcMarkSweepGC concurrent (low pause time) garbage collector (also known as CMS)

The -XX:+UseSerialGC serial garbage collector (for smaller applications and systems)

 

Tuning for low pause times and high throughput

==加大new size,以及survivor size,减少minor gc;尽量减少gc的活动,以把cpu全部给应用;

一般应用于后台任务,非对外对外提供服务的应用;

 

java -Xmx3550m -Xms3550m -Xmn2g -Xss128k -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 

 

Comments:

-XX:+UseConcMarkSweepGC -XX:+UseParNewGC 

Selects the Concurrent Mark Sweep collector. This collector may deliver better response time properties for the application (i.e., low application pause time). It is a parallel and mostly-concurrent collector and and can be a good match for the threading ability of an large multi-processor systems.

-XX:SurvivorRatio=8 

Sets survivor space ratio to 1:8, resulting in larger survivor spaces (the smaller the ratio, the larger the space). Larger survivor spaces allow short lived objects a longer time period to die in the young generation.

-XX:TargetSurvivorRatio=90 

Allows 90% of the survivor spaces to be occupied instead of the default 50%, allowing better utilization of the survivor space memory.

-XX:MaxTenuringThreshold=31 

Allows short lived objects a longer time period to die in the young generation (and hence, avoid promotion). A consequence of this setting is that minor GC times can increase due to additional objects to copy. This value and survivor space sizes may need to be adjusted so as to balance overheads of copying between survivor spaces versus tenuring objects that are going to live for a long time. The default settings for CMS are SurvivorRatio=1024 and MaxTenuringThreshold=0 which cause all survivors of a scavenge to be promoted. This can place a lot of pressure on the single concurrent thread collecting the tenured generation. Note: when used with -XX:+UseBiasedLocking, this setting should be 15.

 

参考

server-class machine detection

http://download.oracle.com/javase/1.5.0/docs/guide/vm/server-class.html

 

http://www.oracle.com/technetwork/java/tuning-139912.html

http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html

http://www.oracle.com/technetwork/java/ergo5-140223.html

 

java6 performance tuning

http://www.oracle.com/technetwork/java/6-performance-137236.html

分享到:
评论

相关推荐

    gsdml-v2.25-festo-cpx-20110809.xml_GSD_gsdml-v2.25_aka_

    标题中的“gsdml-v2.25-festo-cpx-20110809.xml_GSD_gsdml-v2.25_aka_”揭示了这是一份与Festo CPX终端模块相关的GSDML(Generic Station Description Markup Language)文件。GSDML是一种标准化的数据格式,用于...

    libgdx-nightly-20110809.zip

    《LibGDX夜间构建:20110809版本解析》 LibGDX是Java编程语言中的一款开源游戏开发框架,它为开发者提供了一整套工具集,用于创建跨平台的游戏应用。"libgdx-nightly-20110809.zip"是一个特定日期(2011年8月9日)...

    南方测绘GPS工具箱

    20110809 1.优化了'源椭球系'和'目标椭球系'设置 20111017: 1.包含坐标转换的全部功能 2.新增线路计算 3.增加了拟合参数计算,修改了线路设计中的部分算法 增加了加桩,偏距及里程计算,线路中显示偏距和里程的功能...

    txw2-20110809-8.el7.noarch.rpm.zip

    文件放服务器下载,请务必到电脑端资源预览或者资源详情查看然后下载

    txw2-javadoc-20110809-8.el7.noarch.rpm.zip

    文件放服务器下载,请务必到电脑端资源预览或者资源详情查看然后下载

    xsom-0-10.20110809svn.el7.noarch.rpm.zip

    文件放服务器下载,请务必到电脑端资源预览或者资源详情查看然后下载

    txw2-20110809-8.el7.noarch.rpm

    离线安装包,亲测可用

    xsom-javadoc-0-10.20110809svn.el7.noarch.rpm.zip

    文件放服务器下载,请务必到电脑端资源预览或者资源详情查看然后下载

    xsom-0-10.20110809svn.el7.noarch.rpm

    离线安装包,亲测可用

    xsom-javadoc-0-10.20110809svn.el7.noarch.rpm

    官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装

    xsom-0-19.20110809svn.module_el8.4.0+595+e59c9af2.noarch.rpm

    官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装

    GSDML-V2.25-Festo-MSE-20181003_FESTO_GSDMLV2.2_

    标题中的"GSDML-V2.25-Festo-MSE-20181003_FESTO_GSDMLV2.2_"提及的是Festo公司的一种特定版本的GSDML(Generic Sensor Description Markup Language)文件,该版本为V2.25,发布日期为2018年10月3日。...

    雷柏对码2.7

    3. `PairTool_Setup_v2.7_20110809_Release_简体中文版.exe`:这是雷柏对码程序的安装文件,用户运行此文件可以安装对码程序到电脑上。文件名中的`v2.7`表示软件版本,`20110809`代表发布日期,`Release`则表示这是...

    eclipse4

    6. **org.eclipse.ui.ide_3.7.0.v20110809-1737.jar**:Eclipse IDE 插件,包含了项目管理、编辑器、构建工具等功能,是开发者日常使用的主要部分。 7. **org.eclipse.team.cvs.ui_3.3.400.I20110510-0800.jar**:...

    “20110809”石家庄西部大暴雨分析 (2013年)

    利用雷达、自动站和GPS可降水量等高时空分辨率加密观测资料,对石家庄一次局地大暴雨天气过程进行分析。结果表明:在高温高湿的大气环境下,弱切变线的西摆北伸是此次强对流天气过程出现的触发机制和预报难点,...

    WebOS试探+WebIM简单演示

    在提供的文件列表中,"Flex_WebIM_1.0_CatWindows_2.0_20110809.zip.002"可能是一个WebIM系统的源码或工具包,基于Adobe Flex技术。Flex是用于构建富互联网应用(RIA)的开源框架,它可以创建动态、交互性强的用户...

    雷柏最新的对码软件

    2. PairTool_Setup_v2.7_20110809_Release_简体中文版.exe:这是软件的安装程序,版本号为2.7,发布日期为2011年8月9日,且提供简体中文界面,便于中国用户理解和操作。安装程序通常会引导用户完成软件的下载、安装...

    HTML5网页设计初窥系列课程(2):新的页面组织标记

    ... 1. `<header>`:页面或部分的头部区域,通常包含导航、logo或页眉信息。 2. `<nav>`:定义主要的导航链接,有助...阅读提供的"WebCast20110809_PDF.pdf"文件,可以获取更详细的讲解和实例,加深对这些概念的理解。

    雷柏无线键鼠对码软件8个版本

    6. PairTool_Setup_v2.7_20110809_Release_简体中文版.exe - V2.7版本的安装程序,带有简体中文界面,2011年8月9日发布。 7. PairTool_Setup_v2.9_20111129_简体中文版.exe - V2.9版本的安装程序,同样支持简体中文...

Global site tag (gtag.js) - Google Analytics