Skip to content

fix: 修正一处文档错误 #2662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/java/jvm/jvm-parameters-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ GC 调优策略中很重要的一条经验总结是这样说的:

> 将新对象预留在新生代,由于 Full GC 的成本远高于 Minor GC,因此尽可能将对象分配在新生代是明智的做法,实际项目中根据 GC 日志分析新生代空间大小分配是否合理,适当通过“-Xmn”命令调节新生代大小,最大限度降低新对象直接进入老年代的情况。

另外,你还可以通过 **`-XX:NewRatio=<int>`** 来设置老年代与新生代内存的比值
另外,你还可以通过 **`-XX:NewRatio=<int>`** 来设置新生代与老年代内存的比例

比如下面的参数就是设置新生代与老年代内存的比值为 2(默认值)。也就是说 young/old 所占比值为 2,新生代占整个堆栈的 2/3。
比如下面的参数就是设置新生代与老年代内存的比例为 1:2(默认值)。也就是说新生代占整个堆栈的 1/3。

```plain
-XX:NewRatio=2
Expand Down