We have production Tomcat (6.0.18) server which runs with the following settings:
-server -Xms7000M -Xmx7000M -Xss128k -XX:+UseFastAccessorMethods
-XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port=7009
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -verbose:gc -XX:+PrintGC...
Hi,
Have a question about Sun GC. The Sun FAQ (old one for 1.4.2) says that the throughput collector does not use the MaxTenuringThreshold (MTT) parameter. Its used only for CMS.
http://java.sun.com/docs/hotspot/gc1.4.2/faq.html
I dont know how to verify this, but if its true, how does the throughput collector determine when to promote...
Out of interest - Does a default exist or is it different on each OS?
If it does, what are the defaults? Incredibly hard to find!
...
What is the minimum memory requirement for installing JRE and JDK?
I have the cheapest VPS Burstnet (512mb memory) and installed java.
When I type java, it says
$java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
When I type top, there is still arou...
I am getting the following jvm crash every few days running Tomcat 6.0.16 on java 1.6.0_07.
The effect is tomcat dies instantly.
Any ideas what this means?
An unexpected error has been detected by Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d889bb3, pid=4228, tid=8264
Java VM: Java HotSpot(TM) Clien...
Hi all.
We develop a server and we want to program congestion control into it.
What we want to do is detect when free heap is below a certain threshold and stop accepting new data until free memory goes up again.
Our first approach used runtime.freeMemory. This caused false positives as free heap went below the threshold before GC kicked...
We know that the object reference variable holds bits that represent a way to access an object.
It doesn't hold the object itself, but it holds something like a pointer or an address.
I was going through the Head-First Java (2nd edition) book and in the book it is written that
"In Java we don't really know what is
inside a refere...
There are several languages/runtimes atop the JVM: such as JRuby, Groovy, Jython, Clojure, Rhino, Scala, and so on...
How do these generate Java bytecode?
Are there standardized libraries for doing this?
How the generated bytecode gets executed?
(Or is my assumption wrong, and some of mentioned languages do not generate bytecode?)
...
I make a new ClassLoader and make it define a new Class, which means that new class should be in a new namespace, which it is, AFAIK. The strange thing is, when I call Class.getPackage on the new class, it returns the exact same object as returned by calling getPackage on any other class in my main namespace.
According to the JVM spec:
...
An application that we have recently started sporadically crashing with a message about "java.lang.OutOfMemoryError: requested 8589934608 bytes for Chunk::new. Out of swap space?".
I've looked around on the net, and everywhere suggestions are limited to
revert to a previous version of Java
fiddle with the memory settings
use client in...
Hi,
I added a field to Object class , as in :
class Object {
...
private Object _objInfo;
}
I changed java.lang.Object's source code and recompiled openjdk 6. I get the following exception when the VM boots:
Error occurred during initialization of VM
java.lang.IllegalStateException
at java.lang.Throwable.initCause(Throwable.j...
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...
Hi,
I have a web application that converts SVG files into swf ones.
In order to do so, there are 3 steps :
1 - Running through SVG Files in a folder
for (final File file : tFiles) {
final String fileName = file.getName();
final int nbEr = flashEngine.convert(fileName);
if (nbEr > 0) {
LOG.error("Error with SVG ...
The JVM -Xmx argument lets one set the max heap size for the JVM to some value. But, is there a way to make that value dynamic? In other words, I want to tell the JVM "look, if you need it, just keep taking RAM from the system until the system is out."
Two-part reason for asking:
First, the app in question can use a really wide range ...
What conditions would prevent the JVM from running a FULL Garbage Collection when the CPU is at 5% to 8% load?
I am seeing a constant shallow GC cycle, but not able to tune the JVM to want to run FULL GC.
Where can I go to find the conditions that the JVM says "I am too busy to run".
...
Hi,
I would like to specify amount of memory used when -XX:+HeapDumpOnOutOfMemoryError VM argument is used. Normally, I control the heap size using -Xmx<size> VM argument. But when I do that the out of memory error never occurs. Does anybody know a way to specify such a parameter so that when the heap size (or even the stack size) reach...
I frequently use jstat to obtain GC related statistics. However, there are times when I simply cannot obtain any of the statistics from a JVM. It just says that it cannot find the process id, even though its the correct id.
Digging slightly deeper, it seems to be related to the "/tmp/hsperfdata" related files. On servers that have this ...
I was watching this video here, where Robert Nicholson discusses P8, an implementation of PHP on the JVM. At some point he mentions that they aim to surpass native PHP in performance some time in the future.
He mentions JRuby and Jython, which started out slower than their native counterparts, but eventually surpassed them. Quercus, an...
I'm creating a Web Start application which would benefit from some of the newer JVM options (especially escape analysis, G1 garbage collector etc.)
At the same time, I would like the application to work gracefully on older JVMs that do not support these options.
Is there a good way of achieving this?
...
Hi,
It seems that the JVM uses some fixed amount of memory. At least I have often seen parameters -Xmx (for the maximum size) and -Xms (for the initial size) which suggest that.
I got the feeling that Java applications don't handle memory very well. Some things I have noticed:
Even some very small sample demo applications load huge a...