Scott Johnson wrote: > > Hello, > > We've got an application that is replicated for clients, each > replication runs in its own context. We're running jdk1.4.1, RH7.2, > Tomcat 4.0.6 > > Even though the application itself can run fine on 10mb RAM, as each > context initializes, EVERY thread allocates more memory until we get > 20-30 contexts up with each context taking 60-90mb RAM: > > An example process output will have one entry like this for every > context: > root 2900 0.0 6.6 257624 68556 pts/1 S 18:32 0:00 > /usr/java/jdk1.4.1_01/bin/java -Xmx10m > -Djava.endorsed.dirs=/usr/java/tomcat/bin:/usr/java/tomcat/common/lib > -classpath > /usr/java/jdk1.4.1_01/lib/tools.jar:/usr/java/tomcat/bin/bootstrap.jar - > > As you can see, the -Xmx... argument is of no effect as these processes > are taking 68mb. > > For us the optimal solution would be to have a single process handling > all of the contexts, or have each context limited to 10mb. > > I've searched for a configuration to allow the former, and the Xmx arg > isn't working on the latter. Does anyone have any ideas?
Under linux, the distinction between threads and processes is fairly small - and ps doesn't (in that version) display threads differently. What you _actually_ have here are threads - but only a single process. The memory usage you see on each of these threads is actually shared across all of the threads for that JVM (the JVM is a single process). So this isn't really a problem - you have 70 megs (or whatever) used _in total_ by the JVM, across 20-30 threads. Michael -- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>