I'm using Mac OSX 10.9 and Intellij Idea 13 on a decked out machine (7i processor, 16GB RAM, 64 bit, etc.). I have things working well; however, it seems to me that Intellij is running pretty slow (approx. 5 mins to boot up, almost a full 2 minutes to compile a system out print line class, etc.). As a frame of reference I have looked through numerous posts and have landed on the configurations below. My question is this. Does anyone else use a similar set up and have it running quicker? If so, what modifications have you made to your environment to speed things up. Thanks in advance for any help.
Java Version:
Switched from jdk1.6 to jdk1.7
idea.vmoptions:
-ea
-server
-Xms1g
-Xmx1g
-Xss16m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+DoEscapeAnalysis
-XX:+UseCompressedOops
-XX:+UnlockExperimentalVMOptions
-XX:+UseConcMarkSweepGC
-XX:LargePageSizeInBytes=256m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
-XX:ParallelGCThreads=8
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+DisableExplicitGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+PrintGCDetails
-XX:+PrintFlagsFinal
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:CMSInitiatingOccupancyFraction=60
-XX:+CMSClassUnloadingEnabled
-XX:+CMSParallelRemarkEnabled
-XX:+UseAdaptiveGCBoundary
-XX:+UseSplitVerifier
-XX:CompileThreshold=10000
-XX:+UseCompressedStrings
-XX:+OptimizeStringConcat
-XX:+UseStringCache
-XX:+UseFastAccessorMethods
-XX:+UnlockDiagnosticVMOptions
info.plist (modification):
<key>LSArchitecturePriority</key>
<array>
<string>x86_64</string>
</array>
<key>JVMVersion</key>
<string>1.7*</string>
I strongly suggest you not to use all these VM options (especially those controlling garbage collector) unless you actually measure they will improve performance.
Please report reproducable performance problems as described here https://intellij-support.jetbrains.com/entries/29983118-Reporting-performance-problems
Here's the scoop. There is a lot of stuff out there about changing the heap size, garbage collectors and what not. It may not be the root cause of your problem. Be sure to understand what you are setting in your vmoptions file as several suggestions aren't really supported any longer. I worked with the folks at IntelliJ going back and forth with log files and what not and it boils down to this. Check your anti virus. After adjusting my anti-virus, the following settings have IntelliJ screaming. Please note that this was the cause to my individual problem; so be sure to check your log files because that is where I started to find answers.
JDK 1.6
.vmoptions is running in the /Application/IntelliJ13/bin:
-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCompressedOops
*notice that you don't need to allocate huge amounts of system resources. If you set up your system correctly it isn't needed.
Idea.plist:
<key>LSArchitecturePriority</key>
<array>
<string>x86_64</string>
<string>i386</string>
</array>
<key>JVMVersion</key>
<string>1.6*</string>
I know it is simple but it works.
Related
How can I make IDEA to run faster in Ubuntu? I am running it in a i7 thinkpad with 6 gigs of RAM.
Disable all unused plugins for example Struts 2, Subversion Integration, UI Designer if you don't have deal with them.
Also increase memory heap, for that I suggest you check following links:
Tuning IntelliJ IDEA
JetBrains' new intelliJ IDEA 13 slow?
help -> edit custom vm options -> change everything to:
--server
-Xms1024m
-Xmx1024m
-Xmn256m
-XX:MetaspaceSize=256m
-XX:ReservedCodeCacheSize=2g
-XX:SoftRefLRUPolicyMSPerMB=50
-Xverify:none
-XX:PermSize=128m
-XX:+UseCompressedOops
-XX:+UseG1GC
-XX:+UseNUMA
-XX:MaxMetaspaceSize=1024m
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:CICompilerCount=2
-ea
-Dsun.io.useCanonPrefixCache=false
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-Dide.no.platform.update=true
-Djdk.attach.allowAttachSelf=true
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
Am new to tomcat server. I need to configure the server.
Specification:
OS : Linux unknown, amd64/64 (8 cores)
RAM : 4GB
Server : Tomcat7
JAVA : OpenJDK Runtime Environment, 1.6.0_24-b24
JVM : OpenJDK 64-Bit Server VM, 20.0-b12, mixed mode
What are all the option i need give in setenv.sh file. Currently i give the option like below,
export CATALINA_OPTS="-Xms512M -Xmx1024M -XX:PermSize=64M
-XX:MaxPermSize=512M -XX:MaxNewSize=1024m
-XX:NewSize=1024m -XX:+UseParNewGC
-XX:TargetSurvivorRatio=90 -XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled -XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70
-XX:+ScavengeBeforeFullGC
-XX:+CMSScavengeBeforeRemark
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false"
These option are enough or i need modify or add any option. Till now am using default option(in default option server getting down after one day). please help me to configure production server.
If you are sure your web-app didn't generate that error, you could try to read this: Tomcat Wiki and then you can increase the PermGen
I installed youtrack. Begin to adjust. And my message is shown:
"Not enough permanent generation memory. Please, refer to
documentation on how to increase it."
I went to the documentation. Sought there, tried to register at startup
exec $JAVA_HOME -Xms512m -Xmx1024m -jar $JAR"youtrack.jar" $PORT >> $LOG 2>&1 &
tried to set parameter.
java -XX:PermSize=1024m -XX:MaxPermSize=1024m -jar /usr/local/youtrack/youtrack.jar 8112
Still does not work. I use Ubuntu Server 10.04
This has worked for me:
java -XX:MaxPermSize=150m -Xmx512m -Djava.awt.headless=true -jar youtrack-<version>.jar 8080
JVM flag that controls PermGen size is -XX:MaxPermSize. Try to modify startup script for youtrack like this:
java -XX:MaxPermSize=1024m -Xmx1024m -jar /usr/local/youtrack/youtrack.jar 8112
Although, be advised that this may not work on Windows because Tomcat loves ignoring startup scripts. You may need to specify these JVM flags in Windows service properties window.
Or maybe a little bit fewer than 1024m, not sure you really need that much.
I'm trying to run several tools on a Windows Tomcat server . The server starts fine, and I can also see the manager page of Tomcat. But when I open a tool, an "OutOfMemoryError: PermGen space" occurs. I tried a lot with setting the MaxPermSize in my catalina.bat, this is my CATALINA_OPTS:
set CATALINA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms64m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"
When I run JVisualVM next to my Tomcat server, I can see that the arguments are picked up well:
But when I go to the monitor tab and check the PermGen, the max is 67mb instead of the 512 that I set my CATALINA_OPTS. So the arguments are set, but Tomcat ignores them..
I tried fixing this problem for a couple of hours already, but without success..
Anyone?
Remove the "" in the set and you are fine... Don't know why, yet. But that's the answer
set CATALINA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms64m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
-- edit
Btw, I think you want the UseConcMarkSweepGC as well, otherwise the other 2 CMS parameters won't do a thing (and one of the 2 is only needed, depening on the version of the JVM)
See
What does JVM flag CMSClassUnloadingEnabled actually do?
-- edit 2
This question was also asked for tomcat6 here: https://serverfault.com/questions/64894/setting-catalina-opts-for-tomcat6-on-windows-doesnt-work
Too bad the blogger doesn't explain why you don't need to use quotes in windows.
http://javahowto.blogspot.nl/2006/06/6-common-errors-in-setting-java-heap.html
But I think it's because with the quotes it's seen as one big argument. The only thing that I don't understand is why the jvisualvm pretends you set it correctly. But I guess the display of the arguments doesn't actually look at how it's set in the JVM, but only formats the arguments nicely.
I'm wrote simple jRuby scriptlets support in my tomcat 7 java application. If I invoke page, that using jRuby first time, it loads about 3-7 seconds. Next time it loads faster. But, after some time jRuby unloading from memory, and after request I'm again wait 3-7 seconds.
Does exists any methods to always keep jRuby in memory withouth unloading?
PS. Current tomcat run options:
-Xmx2048M -Xms2048M -XX:ParallelGCThreads=8 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -Xnoclassgc -XX:UseSSE=3 -XX:PermSize=512m -XX:LargePageSizeInBytes=4m
I'm using Oracle java 6u26.