Hi, Besides what Dale said, which is true, I'd like to point out a couple of other additional things.
>Those memory spikes appear in my Web application for a long time. The odd When a "spike" appears "for a long time" it's not a spike: it's the steady state. >This is three pictures of the gc log. >http://my.sme.cn/jsp/main/memoryleak.png >http://my.sme.cn/jsp/main/memoryleak2.png >http://my.sme.cn/jsp/main/memoryleak3.png Please don't jump to determine it's a memory leak just because more memory is used. >I used HPjtune tool to watch the gc log. >System using windows 2000 server, 2*CPU, 2G memory, JSDK 1.4.2_05, tomcat >4.1.31, And >set -Xms1250m -Xmx1250m -server -XX:+UseParallelGC - >Xloggc:D:\tomcat\logs\gc.log So you're setting the heap size to a constant 1250MB. How can there be big jumps all over the place? >At first, I doubt if my app program has memory leak. But the application >only runs by JSPs and javabeans.(I abandon using DBCP pool and any thread >operation because of the memory leak.) I think simple JSPs can't cause the >memory spike. I have a monitor.jsp to show my application status. >http://my.sme.cn/jsp/main/monitor.jsp I bet your app is more likely than Tomcat to have a leak ;) Simple JSPs can cause memory "spikes," as can simple servlets. DBCP and threads do NOT necessarily cause increased memory usage. >The WebSite uses normally below 100M memory heap through my monitor.jsp. It >can run a few days, or a few hours before the spike appears. It is >irregular. I read the access_log and want to find answer. But I can't find >any clue. Perhaps it's high load causing the spike? That would be normal and expected. >The WebSite's hits is more than 200,000 per day. I try to use OptimizeIt 6 >profile to watch memory status, but OptimizeIt always exits after runs 2~3 >hours. I guess this program maybe need using progressive memory of system >to >log things and analyze those when I notice Optimizeit used 1.6G system >memory.(and OptimizeIt 6 profile only runs under tomcat 4.1.*! So I return >to tomcat 4.1.31) Yes, OptimizeIt, like other profilers, can routinely use an order of magnitude more memory than your app itself. >I don't know how to cause the thing and how to find solution. Any >suggestion >is appreciated. Thanks. Get a test system, put your app on it, run it with a profiler, and simulate load using a test tool of your choice, e.g. JMeter, ab, wget, grinder, whatever. Then see where memory is retained during your "spikes." Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
