jvm-arguments

Starting memory allocation for JVM.

I'm beginning use the -Xmx option on the java command to allow my processes to use a little more memory (256Mb, though I think I'm currently using less than 128Mb). I've also noticed the -Xms option for starting memory, with a default value of 2Mb. What should I set this value to and why? Reference: Java ...

Duplicated Java runtime options : what is the order of preference ?

Considering the following command line java -Xms128m -Xms256m myapp.jar Which settings will apply for JVM Minimum memory (Xms option) : 128m or 256m ? ...

Increasing the JVM maximum heap size for memory intensive applications

I need to run a Java memory intensive application that uses more than 2GB, but I am having problems to increase the heap maximum size. So far, I have tried the following approaches: Setting the -Xmx parameter, e.g. -Xmx3000m. This approaches fails at the creation of the JVM. From what I've googled, it looks like that -Xmx must be less ...

Which memory related Tomcat JVM startup parameters are worth tuning?

I'm trying to understand the fine art of tuning Tomcat memory settings. In this quest I have the following three questions: Which memory related JVM startup parameters are worth setting when running Tomcat? Why? What are useful rule-of-thumbs when fine-tuning the memory settings for a Tomcat installation? How do you monitor the memory...

What does JVM flag CMSClassUnloadingEnabled actually do?

Hi I cannot for the life of me find a definition of what the Java VM flag CMSClassUnloadingEnabled actually does, other than some very fuzzy high-level definitions such as "gets rid of your PermGen problems" (which it doesn't, btw). I have looked on Sun's/Oracle's site, and even the options list doesn't actually say what it does. Base...

Does the -server flag affect Tomcat behaviour (as opposed to performance)

Hi I know that the -server JVM flag causes the JVM to use the Server VM rather than the Client VM, however, according to some internal documentation at my workplace, the presence/absence of this flag causes Tomcat to do/not-do on-the-fly JSP compilation. Not knowing Tomcat that well, does anyone know if this is the case? My guess is th...

Java VM tuning - Xbatch and -Xcomp

Hi I am looking at the JVM configuration options for running Alfresco, mainly this document on the Alfresco Wiki. One of the recommendations is to use the JVM flags -Xcomp and -Xbatch. The justification of this is: If you wish to have Hotspot precompile the classes, you can add [-Xcomp and -Xbatch]. This will, however, significantly...

who is the owner of JVM?

hi, Lot of Mobile devices are coming with JVM with its OS(for example Nokia,sony ericcson).will all devices have same JVM? are all JVMs owned by sun micro systems? has device manufacturer paid for it to sun micro sytems? suppose If i want to creat my OWN JVM, I have to pay to sun micro sytems and get permission from SUN(ORACLE)? If it is...

Is there something like "-XX:OnError" or "-XX:OnOutOfMemoryError" in IBM JVM?

There are two following options in Java HotSpot VM Options: -XX:OnError="<cmd args>;<cmd args>" Run user-defined commands on fatal error. (Introduced in 1.4.2 update 9.) -XX:OnOutOfMemoryError="<cmd args>; <cmd args>" Run user-defined commands when an OutOfMemoryError is first thrown. (Introduced in 1.4.2 update 12, 6) As far as...

Why do you need to specify the Java heap size?

I have always wondered, why does Java require you set the heap size manually? I was under the impression that programs written in other languages would just allocate as much memory as needed as the program run until the OS could allocate no more. In the Java world we need to set the heap, stack, and permgen size. While this is simple ...

Adding eclipse jvm arguments to version control

Hi, In our eclipse project we have some jvm arguments that are required for the project to work. The project is connected to clearcase for version control. How can we add the jvm arguments to version control so new developers will have them set up when they join the project (or have the rest of the team updated when someone makes a cha...

CMSPermGenSweepingEnabled vs CMSClassUnloadingEnabled

Hi I've kind of asked this question before, but this time it's slightly different! If I start a Java VM with the -XX:+CMSPermGenSweepingEnabled flag set, the following message is printed: Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future The -XX:+CMSPermGenSweepingEnabled flag is often used t...

Jvm settings on the server side

Hello! About to choose hosting service for a website written in GWT with Java on the server side. Does anyone have some good guidelines for JVM mem settings. Some hosting services are limiting JVM memory. I was told one JVM per CPU core but what about mem settings? Best regards, Niclas Lindberg ...

how to catch OutOfMemoryError in JVM and run a script if it's caught?

Hi, I have a program that sometimes throw OOME, I understand that there is a flag in the JVM options that I can set and whenever a certain Error/Exception appears (such as OOME) it calls a script I wrote. The script will give the user a notification and will call a the program with a different argument so it won't get OOME again. does ...

Java: option -Xms is not applied immediately?

I execute the following command: java -Xms1024M -Xmx1024M mypackage.MyClass I expect that resources are captured by JVM immediately, but in fact my resource manager is showing that 7.2M was captured by JVM. Does anybody know what is the reason? PS: The documentation (man java) says about the option the following: -Xmsn Specify the...

JVM / ColdFusion "The system cannot find the file specified" LCK errors

I am a Coldfusion wiz, but my JVM error logs are filling up with the following types of errors. Could someone shed some light on these for me and how to fix? Much appreciated. Searched for an hour everywhere and found no good answer or much of any reference. That LCK part has me baffled, as the actual cfm file does indeed exist. 10/...