--- Cristian <[EMAIL PROTECTED]> wrote: > > ----- Original Message ----- > From: "Duan, Nick" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <users@tomcat.apache.org> > Sent: Monday, November 28, 2005 7:30 PM > Subject: RE: heap size problems (speed) [2] > > > > Were you using the right JVM? There were two JDK > download for LINUX > on > > Sun's web site. > > I have downloaded : J2SE(TM) Development Kit 5.0 > Update 5 > Linux self extracting file (although I think I > should have get the rpm). > > I've extrated it in a separate directory and set > JAVA_HOME in tomcat to > point to that dir. > > Does it make any difference other than the fact that > this way it is not > rpm compliant? > > > The main problem may be your AMD Duron processor > which has a very > small > > cache size (I believe it's about 512K). Once the > processor cache > > reaches its limit, increasing the JVM heap size > won't be very > effective. > > This is even worse for my AMD Duron > cache size : 64 KB > > but on the other machine I have : > cache size : 1024 KB > and still get the same results. > > Cristian > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > >
I don't think your CPU L caches are going to influence the issues you are seeing...not noticeably..not with todays hardware. Cristian is resizing the java heap to allow it to get larger than it was able before (default or the Tomcat default setting). In this case heap being the amount of memory the java process is going to be able to use for the process aside from the static space which can not be controlled by the heap setting being used. How much memory does your computer physically have Cristian? Are you also using -Xms512m? I'll wait to here about your memory first before making other comments on that. The next thing I'm going to ask deals with another issue we had on the list. Do you also write to the HashMap from your application? Are you reading and writing to this cache or your application loads this cached data at start up and it is merely read from that point on? If you are writing to this data you need to be sure to synchronize the HashMap because if you don't you can get into some serious problems with concurrency issues and HashMap resizing (synchronize reads and writes). If you load all of the data up then only read from the application then synchronizing the reads to the hash map won't matter (unless you allow reading while the loading is occuring). The next question would be: Even if only reading and you are are currently synchronizing the calls to this "cached" data are the operations long? If the operations to a synchronized resource are very long then other threads (requests in this case) will be delayed while trying to access the HashMap. Wade --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]