如何在IntelliJ中为VM设置内存?我是否必须单独设置Tomcat内存选项? [英] How to set memory for the VM in IntelliJ? Do I have to set Tomcat memory options separately?

查看:144
本文介绍了如何在IntelliJ中为VM设置内存?我是否必须单独设置Tomcat内存选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一些基准测试,我想知道如何为IntelliJ和Tomcat设置内存。

I'm doing some benchmarking and I want to know how to set memory for both IntelliJ and Tomcat.

在右下角我看到98M的147M in IntelliJ,那是为了什么?

In the bottom right corner I see 98M of 147M in IntelliJ, what is that for?

我怎么知道我是否已经为tomcat分配了足够的内存?

How do I know if I have allocated tomcat enough memory?

推荐答案

在其VM选项文件中为IntelliJ本身设置内存选项。

Set memory options for IntelliJ itself in its VM options file.


  • OS X: Contents / info.plist (嵌入在应用程序目录中)

  • Linux: bin / idea.vmoptions

  • Windows:(install dir /)bin / idea.exe.vmoptions 例如 C: \Program Files(x86)\ JetBrains\IntelliJ IDEA Community Edition 12.1.1\bin\idea.exe.vmoptions

  • OS X: Contents/info.plist (embedded in the app's directory)
  • Linux: bin/idea.vmoptions
  • Windows: (install dir/)bin/idea.exe.vmoptions for example C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 12.1.1\bin\idea.exe.vmoptions

从IntelliJ 12开始,对于OS X:

As of IntelliJ 12, for OS X:


  • 文件 / Applications应将/ IntelliJ IDEA.app/bin/idea.vmoptions 复制到〜/ Library / Preferences / IntelliJIdeaXX / idea.vmoptions

  • The file /Applications/IntelliJ IDEA.app/bin/idea.vmoptions should be copied to ~/Library/Preferences/IntelliJIdeaXX/idea.vmoptions

这是按 JetBrains'DOC-197

内存指示器显示已用/最大内存。

The memory indicator shows used/max memory.

你知道你是否已经分配了足够的内存,如果它没有用完,和/或没有由于大型GC而打嗝,和/或没有捶打交换。 Tomcat内存设置在Tomcat运行配置中配置,其中显示VM选项。

You know if you've allocated TC enough memory if it doesn't run out, and/or doesn't hiccup due to a large GC, and/or doesn't thrash swapping. Tomcat memory settings are configured in the Tomcat run configuration where it says "VM options".

这篇关于如何在IntelliJ中为VM设置内存?我是否必须单独设置Tomcat内存选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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