Posted by mpiercejava
on November 4, 2005 at 2:59 PM PST
I work for a company that maintains a moderately large ecommerce site. We keep a large group of objects (user sessions) alive for several hours each. They eventually get moved to the old generation heap. By the end of the day the old generation is bloated with live sessions, and full garbage collections take 15 or 30 seconds during which our website is frozen. We do not call System.gc(), but many of the open source jars we use do. We could turn explicit garbage collection off, but then the old generation would continue to grow until it did one large collection that might take minutes, which we obviously want to avoid. Ideally one full garbage collection would get run every day at something like 5:00 in the morning.
In looking through java documentation, the concurrent mark sweep collector or the incremental collector look like they are made for this problem, but we find that we get terrible throughput when running either.
This whole thing seems like it would be a common problem. How has it been dealt with?