Thank you very much for your input gentlemen. Increasing PermGen is a great idea, because I do see my server giving me out of memory permgen error at least twice a day and now it makes sense why, I was thinking my -Xmx settings 1024m should take care of my needs for now and that was wrong, I set MaxPermSize=256m and the server seem to be fine for now, keeping my fingers crossed. Now regarding shared/lib directory I thought that every application loads its own copy of those libraries, but if its only one time load and since all my applications are identical copies (only data changes) I might as well move all my classes into shared, before I only had struts, hibernate jars and so on.... That wouldnt create any thread safety issues would it? Thanks again for your time, this helps a lot! Oleg
On 8/17/05, Peter Crowther <[EMAIL PROTECTED]> wrote: > > > From: Oleg [mailto:[EMAIL PROTECTED] > > I am trying to approximate the amount of memory my server > > will need running > > tomcat. I understand that a lot depends on how the appication handles > > resources, however at this point I am trying to figure out > > what will be the > > mimimum needed. In my case I have virtual hosting setup, with > > all hosts > > sharing the same libraries, so I have struts, hibernate,... > > all sitting in > > shared/lib directory of Tomcat. Would I be correct to > > estimate that Tomcat > > will atleast need > > > > n(number of users/applications) * mb(total size of shared/lib) > > As Chuck has already pointed out, no (but I'm going to try a slightly > different angle on it :-) ). Each class that is loaded from shared/lib > will be loaded by the Shared classloader, so you'll only have one copy > of the class in your JVM. Jars are compressed, so the sizes of the > loaded classes will be larger than the bytes occupied on disk; but not > all of the classes from a jar will be loaded, so the sizes will probably > be smaller. Note, however, that any classes in the webapp's WEB-INF/lib > *will* be loaded once per webapp. If you have large numbers of > applications, you may want to put more common libraries in shared/lib, > and you may also wish to increase the size of the permanent generation > (PermGen) in the JVM's memory model as this is where the classes are > stored. > > Your per-session and per-page data will dwarf the space required for > classes; and, as Chuck pointed out, the only way to find out these sizes > is to profile the app. This will also make sure that you're not going > to fall foul of any other performance limits, such as CPU use or disk > bandwidth. > > - Peter > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >