garbage collector - controlling it

The main performance problem on our website right now is from the garbage collector. Yes, our site is very 'thick', but the gc locks out other threads for 10 seconds or so regularly, and once a day or locks it up for several MINUTES. The main problem is that we have a few very large objects that never go away, but the gc still has to occasionally scan them.

I developed a way to put the two GarbageCollector threads (per vm) into the lowest priority. I've seen documentation that this is where they are supposed to be anyway, but they are really at the normal level with everything else. This works great on NT, but only works ok on Solaris. On NT, the gc still pegs the cpu, but other threads are almost unnaffected.

Anyway, my bosses are concerned about this fix, wondering what negative impact it will have or if the gc won't get enough time or whatever.

I just wondered what you all think of this fix. Has anyone else tried it?

Also, does anyone know of a way to tell the gc not to every scan certain objects?

[1071 byte] By [ddurnell1] at [2007-9-26 1:20:21]
«« Commapi
»» thread
# 1
check out this page from Sun... it may give you an idea or three... http://java.sun.com/docs/hotspot/gc/index.html
DragonMan at 2007-6-29 0:54:20 > top of Java-index,Core,Core APIs...
# 2

You can also try the incremental and concurrent garbage collectors. These are enabled with the -Xincgc and -Xconcgc options to the java command, respectively. They may have lower performance overall, but generally have much shorter GC pause times.

Of course, don't forget the top tip for improving GC performance is always not to create unnecessary objects!

schapel at 2007-6-29 0:54:20 > top of Java-index,Core,Core APIs...
# 3

Unfortunately, I can't use -incgc or -concgc. We have to use Websphere and it requires a special ibm vm, so I can't even use hot spot.

Actually, creating new objects isn't the problem. Its the big objects that hang around that increase the scan time and cause the problem. Creating and destroying objects is cheap in comparison?

ddurnell1 at 2007-6-29 0:54:20 > top of Java-index,Core,Core APIs...
# 4
Hi,You might want to try the resource analyzer for weblogic. It claims to collect all kind of information, including from the runtime environment. http://www-4.ibm.com/software/webservers/appserv/doc/v35/ae/infocenter/was/atsepm02.html
leukbr at 2007-6-29 0:54:20 > top of Java-index,Core,Core APIs...