Re: the memory puzzle me....
On 24/11/2010 05:47, Caldarale, Charles R wrote: From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me by the way, do you know *any tool that can monitor the permanent generation*, such what's now resident in the perm gen? I presume you mean on Windows, since you already found one for Linux. I suspect the more sophisticated profilers like YourKit will do it, but I'm not sure. Others on the list use YourKit regularly, so they might be able to be more definitive when they wake up in an hour or two. Yep. It shows used, current and max for each memory pool. It doesn't explicitly break down objects by pool but if you work on the basis all the class objects are in permgen then you have all you need (list of class objects and their size). Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the memory puzzle me....
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 11/24/2010 12:47 AM, Caldarale, Charles R wrote: I suspect the more sophisticated profilers like YourKit will [show PermGen details], but I'm not sure. Others on the list use YourKit regularly, so they might be able to be more definitive when they wake up in an hour or two. I fired-up YourKit to see what I could find out through the memory inspection tools. I can't find anything specifically about PermGen in the live view, nor in a memory snapshot which lets you do much more interesting things without the confusion of everything changing all the time :) I wasn't able to find anything else other than a graph for non-heap memory. There is help on object generations but that actually has nothing to do with the heap generations that the GC uses. If anyone can tell me how to inspect the heap generations with YourKit, I'd certainly like to hear it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkztdKgACgkQ9CaO5/Lv0PBMQQCgkM3MAkP6TE7lgFGfAR4F+GXT jtIAnifQbMga1SpczL9iq5RZAnPtytvE =84xV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: the memory puzzle me....
From: xu cheng [mailto:xcheng@gmail.com] Subject: the memory puzzle me I oberved the heap of the jvm which runs tomcat without deploying any webapp. and it's some kind like this /|/|/|/|/|/| That's called a sawtooth pattern, and is what you should be seeing. when the used heap goes up, there is a memory use of the heap, maybe allocation for the new class instances, and when it goes down , there is a gc, am I right? Yes; the GC you're seeing is very likely what's called a minor GC, which cleans out only the young generation, which is where nearly all objects are created and the vast majority die. A major GC will process not only the young generation, but also the tenured (old) and so-called permanent ones. (Note that most things in the perm gen space are not actually permanent, and not necessarily even long-lived.) but I didn't deploy any app on the tomcat. I'm just wondering what is using the memory? Tomcat has numerous background threads doing such things as waiting for connections from clients, checking for webapp deployments, monitoring changes to deployed webapps, etc. All of these are creating a few objects for very short periods, over and over. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the memory puzzle me....
thanks, by the way, the permanent generation is also collected by major gc? and what will trigger a gc in the permanent generation best regards 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com From: xu cheng [mailto:xcheng@gmail.com] Subject: the memory puzzle me I oberved the heap of the jvm which runs tomcat without deploying any webapp. and it's some kind like this /|/|/|/|/|/| That's called a sawtooth pattern, and is what you should be seeing. when the used heap goes up, there is a memory use of the heap, maybe allocation for the new class instances, and when it goes down , there is a gc, am I right? Yes; the GC you're seeing is very likely what's called a minor GC, which cleans out only the young generation, which is where nearly all objects are created and the vast majority die. A major GC will process not only the young generation, but also the tenured (old) and so-called permanent ones. (Note that most things in the perm gen space are not actually permanent, and not necessarily even long-lived.) but I didn't deploy any app on the tomcat. I'm just wondering what is using the memory? Tomcat has numerous background threads doing such things as waiting for connections from clients, checking for webapp deployments, monitoring changes to deployed webapps, etc. All of these are creating a few objects for very short periods, over and over. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: the memory puzzle me....
From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me the permanent generation is also collected by major gc? Correct. what will trigger a gc in the permanent generation When either the tenured or the permanent generation is full, someone calls System.gc(), or you click the Perform GC button in JConsole (or its equivalent in other profilers). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the memory puzzle me....
thanks very much you help me alog by the way, do you know *any tool that can monitor the permanent generation*, such what's now resident in the perm gen? I know that in the linux the jmap -permheap pid will display something, like this class_loaderclassesbytesparent_loaderalive?type bootstrap11874691664 null liveinternal 0x84747550118080x846017d8dead sun/reflect/delegatingclassloa...@0x937f35f8 0x84685ee0118000x846017d8dead sun/reflect/delegatingclassloa...@0x937f35f8 0x84686030117920x846017d8dead sun/reflect/delegatingclassloa...@0x937f35f8 0x84686210117920x846017d8dead sun/reflect/delegatingclassloa...@0x937f35f8 it seems useless for me actually (I 'm new learning about this) cos the permanent gen occupy about 20MB and jmap list about 10 live class with 30 dead ones, I was confused with this I used some other profiler tools but they just show* how much* perm gen was used, but not *what they are used for* thanks best regards 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me the permanent generation is also collected by major gc? Correct. what will trigger a gc in the permanent generation When either the tenured or the permanent generation is full, someone calls System.gc(), or you click the Perform GC button in JConsole (or its equivalent in other profilers). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: the memory puzzle me....
From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me by the way, do you know *any tool that can monitor the permanent generation*, such what's now resident in the perm gen? I presume you mean on Windows, since you already found one for Linux. I suspect the more sophisticated profilers like YourKit will do it, but I'm not sure. Others on the list use YourKit regularly, so they might be able to be more definitive when they wake up in an hour or two. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the memory puzzle me....
thanks!!! you really help me a lot! someone knows how to figure out how much permanent gen my vm is using? 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me by the way, do you know *any tool that can monitor the permanent generation*, such what's now resident in the perm gen? I presume you mean on Windows, since you already found one for Linux. I suspect the more sophisticated profilers like YourKit will do it, but I'm not sure. Others on the list use YourKit regularly, so they might be able to be more definitive when they wake up in an hour or two. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the memory puzzle me....
I got it jmap -heap will print many things 2010/11/24 xu cheng xcheng@gmail.com thanks!!! you really help me a lot! someone knows how to figure out how much permanent gen my vm is using? 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me by the way, do you know *any tool that can monitor the permanent generation*, such what's now resident in the perm gen? I presume you mean on Windows, since you already found one for Linux. I suspect the more sophisticated profilers like YourKit will do it, but I'm not sure. Others on the list use YourKit regularly, so they might be able to be more definitive when they wake up in an hour or two. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the memory puzzle me....
You should check out jvisualvm which comes with any recent HotSpot JVM. I don't have a copy available on the laptop I'm on right now, but by looking at the screenshots, it looks like it shows the permanent generation: http://wiki.oracle.com/page/How+to+use+JConsole,+JVisualVM+or+VisualVM+with+Oracle+Application+Server Blair On Nov 23, 2010, at 9:54 PM, xu cheng wrote: thanks!!! you really help me a lot! someone knows how to figure out how much permanent gen my vm is using? 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me by the way, do you know *any tool that can monitor the permanent generation*, such what's now resident in the perm gen? I presume you mean on Windows, since you already found one for Linux. I suspect the more sophisticated profilers like YourKit will do it, but I'm not sure. Others on the list use YourKit regularly, so they might be able to be more definitive when they wake up in an hour or two. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the memory puzzle me....
hi: thanks for replying the jvisualvm does show the capacity and the used of the perm gen that the vm use *currently* but not the size of the vm* configuration*: PermSize and MaxPermSize in my opinion , the MaxPermSize is the size that the perm gen is *allowed to expand to*, and the PermSize is the size that allocated when the vm*initially *started. and the capacity is the size that allocated to the vm* currently*. am I right? thanks by the way, I connect to a server remotely , there is only character interface for me best regards 2010/11/24 Blair Zajac bl...@orcaware.com You should check out jvisualvm which comes with any recent HotSpot JVM. I don't have a copy available on the laptop I'm on right now, but by looking at the screenshots, it looks like it shows the permanent generation: http://wiki.oracle.com/page/How+to+use+JConsole,+JVisualVM+or+VisualVM+with+Oracle+Application+Server Blair On Nov 23, 2010, at 9:54 PM, xu cheng wrote: thanks!!! you really help me a lot! someone knows how to figure out how much permanent gen my vm is using? 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com From: xu cheng [mailto:xcheng@gmail.com] Subject: Re: the memory puzzle me by the way, do you know *any tool that can monitor the permanent generation*, such what's now resident in the perm gen? I presume you mean on Windows, since you already found one for Linux. I suspect the more sophisticated profilers like YourKit will do it, but I'm not sure. Others on the list use YourKit regularly, so they might be able to be more definitive when they wake up in an hour or two. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org