Hi Mark,
Aloha. In an attempt to get myself off the DeadHorseSociety I ran some load test on webMethods IS 6.1 running IBM jvm 1.3.1 on Windows 2000 (my local box, couldn’t get any of our development boxes to set up this test)
I ran a simple load test (with and without GC scheduled) which simply invokes a web service; I also set up a separate scheduler which logs available memory by invoking WmRoot Svc getResourceSettings.
Generally I have GC scheduled to run on production instances every 5 min but for this load test, I reduced it to run every minute.
Case 1 : (With GC Scheduled @ 1 minute)
The Available memory starts with 86%, reduces to 80% to 73%, GC kicks in, the available memory bumps up to 86%… and this cycle continues.
2004-08-16 18:06:22 EDT I: 86 % (338610 KB)
2004-08-16 18:06:23 EDT I: 86 % (337663 KB)
2004-08-16 18:06:47 EDT I: 81 % (317329 KB)
2004-08-16 18:06:48 EDT I: 80 % (316286 KB)
2004-08-16 18:07:16 EDT I: 74 % (290402 KB)
2004-08-16 18:07:21 EDT I: 73 % (285571 KB)
2004-08-16 18:07:22 EDT I: 73 % (285295 KB)
2004-08-16 18:07:23 EDT I: 86 % (338837 KB)
2004-08-16 18:07:24 EDT I: 86 % (338717 KB)
Thus in this case, the memory never goes below 73%;
Case 2 : (Without GC Scheduled)
The Available memory starts with 83%, periodically/gradually reduces to 52% to 27% to 6% to 1%. When the available memory is @ 1%, GC automatically kicks in, and the available memory bumps up to 83%… and this cycle continues. Here are the logs for it. Notice, that available memory was at 1% for about 3 seconds.
2004-08-16 17:30:24 EDT I: 83 % (324618 KB)
2004-08-16 17:30:25 EDT I: 82 % (324590 KB)
2004-08-16 17:30:28 EDT I: 52 % (204892 KB)
2004-08-16 17:30:31 EDT I: 27 % (105191 KB)
2004-08-16 17:31:59 EDT I: 6 % (22876 KB)
2004-08-16 17:32:01 EDT I: 5 % (21199 KB)
2004-08-16 17:32:05 EDT I: 4 % (17689 KB)
2004-08-16 17:32:10 EDT I: 3 % (13038 KB)
2004-08-16 17:32:14 EDT I: 2 % (9471 KB)
2004-08-16 17:32:19 EDT I: 1 % (4885 KB)
2004-08-16 17:32:20 EDT I: 1 % (4051 KB)
2004-08-16 17:32:21 EDT I: 1 % (3224 KB)
2004-08-16 17:32:22 EDT I: 83 % (326800 KB)
2004-08-16 17:32:23 EDT I: 83 % (325678 KB)
2004-08-16 17:32:25 EDT I: 82 % (323926 KB)
This definitely proves that GC works. There is no need specifically to schedule GC. This vindicates your position on this issue (needless to say that we never had any doubt about your position on this or on IBM jvm programmers to implement GC correctly!!)
But I wonder if during that 3 second time window, the IS receives several http invokes to a particular svc, which say is memory intensive code. Will IS throw OutofMemory exceptions or not? Will it possibly be much slower than normal response from IS?
I have no idea. What are your thoughts on that? I will see if I can simulate these conditions somehow and run some load test to prove either ways?
Meanwhile, I continue to have GC scheduled on my IS instances making available memory on the server even out over a period of time. In the above instance, @ 86%.
One other point to note, that even if I don’t have the load test running (with GC disabled) and a scheduler to log available memory (making the server virtually idle), the memory keeps sinking to 1% eventually to rise to 83%.
Hope all this throws some light on the issue.