JBoss AS does not have a garbage collector. GC is handled entirely by the JVM and behaves in the standard JVM fashion. Have you analyzed the GC data that the JVM provides to determinbe the best heap size for your application?
Also, it would help if you gave the full set of options that you pass to the JVM.
Thanks for replay .
As you mention in your replay, GC is handled by JVM, then why should I get diffrence when I call GC from YourKit(I know this community is not for YourKit, sorry for that)?
I have use following parametrs which pass to JVM
My server system have only one processor so I didn't use -XX:+UseParallelGC
Am I supposed to guess the values you set for -Xms, -Xmx and -XX:MaxPermSize???????
First, setting -XX:+UseConcMarkSweepGC is not recommended because you have only one processor. In fact, I would not use the CMS garbage collector on any system with less than 4 prcoessors/cores. You might be able to get by with a dual processor/core system, but I don't recommend it. Also, youy need to feed the CMS garbage collector as much heap as possible: I would change to -Xms1024m.
Read these white papers to understand more about the garbage collection, then you might understand better why YourKit might show a drop in heap usage:
Java Garbage Collection Statistical Analysis 101
Java Garbage Collection Performance Analysis 201
Thanks for your valuable inputs.
This really helps me to work ahead on my OOM error issue.