针对大型应用程序的JVM性能调优 [英] JVM performance tuning for large applications

查看:86
本文介绍了针对大型应用程序的JVM性能调优的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认JVM参数不适合运行大型应用程序。来自在真实应用程序上进行调整的人的任何见解都会有所帮助。我们在使用客户端JVM的32位Windows机器上运行应用程序默认情况下。我们添加了-server并将NewRatio更改为1:3(年轻一代更大)。

The default JVM parameters are not optimal for running large applications. Any insights from people who have tuned it on a real application would be helpful. We are running the application on a 32-bit windows machine, where the client JVM is used by default. We have added -server and changed the NewRatio to 1:3 (A larger young generation).

您尝试过哪些其他参数/​​调整有用吗?

Any other parameters/tuning which you have tried and found useful?

[更新]我正在谈论的特定应用程序类型是很少关闭的服务器应用程序,至少需要-Xmx1024m。还假设已经分析了应用程序。我正在寻找仅 JVM性能的一般指导原则。

[Update] The specific type of application I'm talking about is a server application that are rarely shutdown, taking at least -Xmx1024m. Also assume that the application is profiled already. I'm looking for general guidelines in terms of JVM performance only.

推荐答案

量大这些信息。

首先,在调优JVM之前对代码进行概要分析。

First, profile the code before tuning the JVM.

其次,阅读< a href =http://www.oracle.com/technetwork/java/javase/tech/index-jsp-137187.html\"rel =noreferrer> JVM文档;周围有很多城市传说。例如,-server标志仅在JVM保持驻留并运行一段时间时才有用; -server关闭JIT / HotSpot,并且需要通过相同的路径进行多次传递才能启动。另一方面,-server,减慢 JVM的初始执行,因为有更多的设置时间。

Second, read the JVM documentation carefully; there are a lot of sort of "urban legends" around. For example, the -server flag only helps if the JVM is staying resident and running for some time; -server "turns up" the JIT/HotSpot, and that needs to have many passes through the same path to get turned up. -server, on the other hand, slows initial execution of the JVM, as there's more setup time.

有几本好书和网站周围。例如,请参阅 http://www.javaperformancetuning.com/

There are several good books and websites around. See, for example, http://www.javaperformancetuning.com/

这篇关于针对大型应用程序的JVM性能调优的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆