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_”揭示了这是一份与Festo CPX终端模块相关的GSDML(Generic Station Description Markup Language)文件。GSDML是一种标准化的数据格式,用于...
《LibGDX夜间构建:20110809版本解析》 LibGDX是Java编程语言中的一款开源游戏开发框架,它为开发者提供了一整套工具集,用于创建跨平台的游戏应用。"libgdx-nightly-20110809.zip"是一个特定日期(2011年8月9日)...
20110809 1.优化了'源椭球系'和'目标椭球系'设置 20111017: 1.包含坐标转换的全部功能 2.新增线路计算 3.增加了拟合参数计算,修改了线路设计中的部分算法 增加了加桩,偏距及里程计算,线路中显示偏距和里程的功能...
离线安装包,亲测可用
离线安装包,亲测可用
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
标题中的"GSDML-V2.25-Festo-MSE-20181003_FESTO_GSDMLV2.2_"提及的是Festo公司的一种特定版本的GSDML(Generic Sensor Description Markup Language)文件,该版本为V2.25,发布日期为2018年10月3日。...
3. `PairTool_Setup_v2.7_20110809_Release_简体中文版.exe`:这是雷柏对码程序的安装文件,用户运行此文件可以安装对码程序到电脑上。文件名中的`v2.7`表示软件版本,`20110809`代表发布日期,`Release`则表示这是...
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**:...
利用雷达、自动站和GPS可降水量等高时空分辨率加密观测资料,对石家庄一次局地大暴雨天气过程进行分析。结果表明:在高温高湿的大气环境下,弱切变线的西摆北伸是此次强对流天气过程出现的触发机制和预报难点,...
在提供的文件列表中,"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日,且提供简体中文界面,便于中国用户理解和操作。安装程序通常会引导用户完成软件的下载、安装...
... 1. `<header>`:页面或部分的头部区域,通常包含导航、logo或页眉信息。 2. `<nav>`:定义主要的导航链接,有助...阅读提供的"WebCast20110809_PDF.pdf"文件,可以获取更详细的讲解和实例,加深对这些概念的理解。
6. PairTool_Setup_v2.7_20110809_Release_简体中文版.exe - V2.7版本的安装程序,带有简体中文界面,2011年8月9日发布。 7. PairTool_Setup_v2.9_20111129_简体中文版.exe - V2.9版本的安装程序,同样支持简体中文...
- `org.eclipse.ui.ide.source_3.7.0.v20110809-1737.jar`:Eclipse IDE的用户界面源代码,提供了开发环境的基本功能。 - `org.eclipse.pde.core_3.7.1.v20110822-2108.jar`:Plug-in Development Environment...
【南方GPS老版本】是一款专为解决老旧GPS接收机与新系统兼容问题而设计的软件。随着技术的不断发展,GPS设备的更新换代迅速,新版本的软件往往不再支持早期型号的硬件。这款软件的出现,就是为了确保那些无法与新...
V3.6.2(20110809) 1.增加试题导入题干和选项换行符“[换行]” 2.增加试题导入题干结束符“|题干结束|”(独立一行),支持多行题干导入 3.增加试题库翻页功能 4.增加切换栏目自动回到页面顶部功能 V3.6.1...
Jboss7上+maven搭建struts2+spring3+hibernate3完整能运行工程源码,在tomcat7上运行也成功测试了,注意:我工程文件是用myeclipse2013开发的,你需要导入自己ide的时候,会有兼容性问题:最好阁下是自己新建一个maven...