Someday, I run something huge, and a window pop up said that heap memory out of memory, I set it to 2014M in that window, then click continue. Everything was fine.
But I don't like the number 2014, I want it 2048. So, I changed -Xmx option in idea64.exe.vmoptions (like below) and restarted idea. (According to this doc) However, nothing was changed, heap size was still 2014M.
-Xms512m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
Then, I changed all idea64.exe.vmoptions I could find, and restarted, and still failed.
OS: windows 10 64-bit
idea version: 2018.1
How can I change the heap size to 2048M ?
Please help, thanks.
update:
That day, I was debugging with some codes which encrypt some huge objects, and the popup showed just after I use copy value function.
I tried to change the heap size of IntelliJ Idea's JVM as the official document, but not working.
The heap memory statistic is here:
update 2:
The log:
2018-07-23 09:54:04,184 [ 224] INFO - #com.intellij.idea.Main - JVM Args: -Xms512m -Xmx2048m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djb.vmOptionsFile=C:\Users\huayu\.IntelliJIdea2018.1\config\idea64.exe.vmoptions -Didea.jre.check=true -Dide.native.launcher=true -Didea.paths.selector=IntelliJIdea2018.1 -XX:ErrorFile=C:\Users\huayu\java_error_in_idea_%p.log -XX:HeapDumpPath=C:\Users\huayu\java_error_in_idea.hprof
Newer versions of IDEA use a different file for vm options. Older versions used to use C:\Program Files\JetBrains\IntelliJ IDEA {version}\bin\idea64.exe.vmoptions but now these configurations exist in C:\Users{user}.IntelliJIdea{version}\config\idea64.exe.vmoptions.
You can get to this file from IntelliJ. On the Help menu, click Edit Custom VM Options. Then restart IDEA and it should update.
Note: It doesn't look like the value displayed in the bottom right will exactly match what you specify in the config file. Not sure why.
See also: How to increase the memory heap size on IntelliJ IDEA?
After Hours and hours searching.
On windows 10
Control Panel => System => Advanced system settings
System Properties => Advanced
Environment Variebles
_JAVA_OPTIONS -Xmx8192M
You changed the heap size of the project you were running within IntelliJ, not the heap size of IntelliJ itself, when you got to that popup.
You would set that in the run configuration for your project.
The startup options change the heapsize of IntelliJ itself, which is not shown on screen constantly.
I have just realised that the memory indicator which is showing the values are coming from 32bit vmoptions file while I'm running the 64 bit idea. And hence the indicator is not showing the correct values.
Related
I'm trying Kotlin's coroutines with official guide using IntelliJ IDEA on Mac OS. In this section there's an advice to use -Dkotlinx.coroutines.debug JVM option to get detailed log output. What I did is I opened 'Help/Edit custom VM options...' and in the opened idea.vmoptions file I added -Dkotlinx.coroutines.debug line.
idea.vmoptions content after edit:
# custom IntelliJ IDEA VM options
-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
-Dkotlinx.coroutines.debug
But after running the code again the output is:
[main] I'm computing a piece of the answer
[main] I'm computing another piece of the answer
[main] The answer is 42
Process finished with exit code 0
Whereas expected output is:
[main #coroutine#2] I'm computing a piece of the answer
[main #coroutine#3] I'm computing another piece of the answer
[main #coroutine#1] The answer is 42
What am I missing here?
The Help > Edit custom VM options... menu option lets you set the VM options for the execution of IntelliJ itself.
To set the options for your own application, you need to edit the Run/Debug Configurations. These can be found under Run > Edit Configurations... in the menu.
Selecting this option opens the following window which lets you set the VM options for your application(s):
Using Ubuntu, i have both intellij 2016 and intellij 2017. I configure idea64.vmoptions for both in the respective folder: ~/.IntelliJIdea2016.3/ and /.IntelliJIdea2017.2. for both i upgraded the memory size. while 2016 version reads this value (as i see in the memory indicator), 2017 versions doesn't. I tried everything.
this is idea64.vmoptions:
-Xms2128m
-Xmx2750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
Rather than attempting to find the correct file on the file system you can do this from within the IDE from the menu item:
Help > Edit Custom VM Options
This will present the vmoptions file which is actually in use allowing your to edit it within the IDE. Once you have completed your edit, just restart IntelliJ and you'll see the changes take effect.
More details in the docs.
1、You can set it from here:
2、Open the edit page:
3、Then restart, it will take effect:
Has someone experienced this?, what value would you suggest for Xmx?
Extra info: It is running in 32 bit (idea.exe)
That depends on the work that you do with IntelliJ (if you work much with larger files, then you should increase the memory more than if you only work with smaller files or projects). I have set Xmx to 2048 MB.
Ok, I managed to make it run with the following configuration in idea64.exe.vmoptions:
-Xms128m
-Xmx1512m
-XX:MaxPermSize=500m
-XX:ReservedCodeCacheSize=225m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
I switched over 64 bit (idea64.exe), the IDE starts, and seems that it has enough memory to load 4 projects with their web applications each.
I am getting "Could not reserve enough space for object heap" error when I am trying to start hybris server.
I have set
wrapper.java.additional.1=-Xmx1G
wrapper.java.additional.2=-XX:MaxPermSize=1024M
My machine is 64 bit 8GB RAM Windows
I faced the same problem once, The problem in my case was that too many other Applications were running on my system.
So go to the task manager and check the memory available use.
Close some applications and try running.
Also if you are using eclipse Then, In your eclipse.ini file (this is beside the eclipse executable), replace -Xmx256m with -Xmx1024m (or Xmx512m).
This is not compulsory but in certain cases it works.
If you are using some extension then,
Open YOURPATH/config/local.properties file.
Add the following entry:
config/local.properties
build.parallel=true
Save the file.
(In cases where we have multiple cores in the machine, we can tell hybris to utilize these by building in parallel and in certain cases this too works)
I too faced the same probelm. I followed below steps and set the max heap size to 1GB.
Add the following content to local.properties
tomcat.generaloptions=-Xmx4G -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}"
ant clean all
start hybrisserver
Reference
https://launchpad.support.sap.com/#/notes/0002437669
I've googled and tried all SO answers, but none seems to be working for me.
The CPU usage remains low when inactive, as soon as I start typing, it jumps and takes a few seconds to see what I'm typing. Should be some kind of inspection/intellisense, but disabling it makes IDE useless (IDE means intellisense to me), although I'm willing to give it a try and have already tried the below things, but nothing seems to be working for me.
I've tried the following things :
1. -Xms512m
-Xmx1024m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=256m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
2. Disabled Git & Subversion plugin
3. Disabled "Probable Bugs" in settings -> Inspection
4. Made sure that I'm running Idea64.exe and changing idea64.exe.vmoptions
5. Created a system variable IDEA_JDK_64 to point to JDK7Update60
6. Disabled "AutoPopupCodeCompletion" in Editor->CodeCompletion and changed "CaseSensitiveCompletion" to None.
7. Added {userdir}/.intellij and {project}/.idea to Anti-Virus scan exclusion
This is an old question but I just had similar issue and googling pops this page so it might help someone else in the future.
I am running IntelliJ IDEA 16.1 and writing javascipt was unbearably slow. At the end I tried File | Invalidate Caches/Restart which solved the issue.
Had a discussion with Intellij Support Team
The issue was with only large files (8k+ lines of .js code). Probably, because of system hardware limits.
When I worked with files having less lines of code, it behaved fine.