-
1. Re: How to Force GC in JBoss 7.2 after every 30 min.
welle Dec 10, 2013 8:16 AM (in response to anelsonwilson)Not really, but you can call System,gc() to "hint" the JVM to perform a garbage collection from scheduled SLSB.
BUT I DO NOT UNDERSTAND WHY YOU WOULD DO THAT!
-
2. Re: How to Force GC in JBoss 7.2 after every 30 min.
wdfink Dec 10, 2013 9:02 AM (in response to anelsonwilson)As Anders Welen said there should be no need to force GC in a server environment.
In my experience that only force unwanted fullGC's.
You might explain why you mean you need it. Often a well tuned GC is the better solution.
-
3. Re: How to Force GC in JBoss 7.2 after every 30 min.
anelsonwilson Dec 10, 2013 11:30 AM (in response to wdfink)I have found on the server that due to some reason the heap stack is overflowing.Frequently the JBoss 7.2 server is giving out of memory exception.Thus I thought to implement force GC in JBoss.So I have decided to run GC every 30 min to overcome this problem
Any suggestion will be helpful.Thanking you.
-
4. Re: How to Force GC in JBoss 7.2 after every 30 min.
anelsonwilson Dec 10, 2013 11:32 PM (in response to anelsonwilson)I have tried the following:-
-Dsun.rmi.dgc.server.gcInterval=3600000 inside domain.xml
And its working. Any suggestion will be helpful.Thanking you.
-
5. Re: How to Force GC in JBoss 7.2 after every 30 min.
anelsonwilson Dec 11, 2013 2:00 AM (in response to wdfink)Thanks.
As you mentioned that:- a well tuned GC is the better solution.
Can you please help me how to tune GC.
-
6. Re: How to Force GC in JBoss 7.2 after every 30 min.
wdfink Dec 11, 2013 4:41 AM (in response to anelsonwilson)Hi Nelson,
GC tuning is a ongoing job as it is wired to the application and throughput.
You need to understand how the JVM meap management work and tune the GC parameter to work with your applicaiton.
Often you can not say that more heap-space will help, you can run an application with a huge throughput with less than 1.5GB heap in a 32bit VM.
A good stating point will be Tuning Garbage Collection Java6
-
7. Re: How to Force GC in JBoss 7.2 after every 30 min.
anelsonwilson Dec 11, 2013 11:32 PM (in response to wdfink)Thank You very much Wolf-Dieter Fink.
-
8. Re: How to Force GC in JBoss 7.2 after every 30 min.
erasmomarciano Dec 20, 2013 5:56 AM (in response to anelsonwilson)You can create a script with jmap
http://docs.oracle.com/javase/7/docs/technotes/tools/share/jmap.html
You have to run your script after 30 minute