tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Federico Tello Gentile" <>
Subject TOMAT slowing down a lot after a while
Date Mon, 23 Oct 2000 15:43:58 GMT
I'm using Tamcat 3.1 to build a web application, but I find it extremely
slow in my tests.

I have 5 servlets that send between 2 and 5 SQL statements to an Access
Database (using JDBC-ODBC) and forward at most 8 beans to a JSP page each.
The Beans are at worse a Vector with 16 small objects. I pass the beans in
the request object.

The first 7 to 10 page requests from the browser appear in less than a
second, but after that it slows down a lot, taking about 10 secs each page
(the same pages that took a second before).

I  see that the swap file grows on every request about 2 MB, it's initial
size is 64 MB and after 20 or so pages requested it's size is about 120 MB.

The machine I'm using to test is a Pentium 133 MHz, with 32 MB RAM and
Windows 98, J2SDK 1.3 with the standard configutarion.

I've tried:
Setting the initial heap size of the JVM to 8 MB and 32 MB with no change.
Setting the maximun heap size to 32MB and 8 MB with no effect.
Loading the Servlets at startup again with no change.
Loading the JSP pages at startup with the same result.
Using a thread pool (as shown in the Tomcat documentation), but nothing

Even if I call System.gc(); in one of the JSP pages the swap file continues
to grow without limit.
I print in the JSP page Runtine.getRuntime().totalMemory() -
Runtine.getRuntime().freeMemory() and the value is allways below 2 MB
(between 600KB and 1.600KB) on every JSP page call.
I don't create big objects, in fact I don't have any big underlying model,
just 5 Servelts that build the beans and pass then to the JSP pages.

I'd expect the pages to load slower at first (complation, and so) but they
load slower and slower due to the lack of memory. I imagine adding memory
won't change anything since after 20 pages requested the sawp file reaches
120 MB, I can only imagine if I had several users at the same time.

I hope you can give someadvice on the subject.
Any idea is wellcome.

Thank you.

View raw message