hi Reynir, That is a lot of information u hv given..Thanx for that. But my problem is that i cannot change the code at this stage as it is already in production. So can you tell me if some of these things are possible by just editing some of the configuration files like server.xml etc. The jasper part i think i can do, coz i hv d/l the jar files. I did that, restarted tomcat and my application, but it just bombed, i get exceptions on the TC console BuildException, and later after placing ant.jar in another place (there are 2 libs, common and server) it gives me JSPException, .. of course i am testing this out on my local m/c.
tell me if there are any other ways pls. -anoop -----Original Message----- From: Reynir Hübner [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 7:35 PM To: Tomcat Users List Subject: RE: how to make tomcat faster well to install jasper from the 4.1.7 you only need to take 2 or 3 jar files and replace the old ones in tc 4.0.4. the jar files are from tc.4.1.7 : common/lib/jasper-compiler.jar common/lib/jasper-runtime.jar common/lib/commons-collections.jar and if I remember it correctly I also moved the : common/lib/ant.jar to my tc.4.0.3 installation. I am sorry but I will not explain connection pooling here, as it's been done serveral times and you can search the mail-archive for information on that matter, I use a pool from www.bitmechanic.com, but there are several others available. Even sometimes a pool is distributed with the JDBC driver, I'm not sure about the free one from microsoft, but it might have some pooling implemented. Caching is something you need to implement into your jsp-pages, it's usually done by using cache-tags that implement "fine-grain-cacheing", this will make you able to decide for how long each segment of your response is cached. I've been using OSCache, from www.opensymphony.org, there is also a cache-taglib in the jakarta domain. My guess is if you do this, your application will get 5 times faster than it is right now.... maybe even alot more depending on how you do it. About the System.out.println, you should just implement Log4j logging, it's powerfull, and easy to use. There are many things you could look at, for example, if you are using HashMaps alot, you might find it alot faster to use FastHashMap, or if you are using Vectors alot you might find it faster to use/iterate through LinkedLists, if you are using out.write alot, you might want to make use of StringBuffer, append to it while rendering the jsp, and only writing that to the response (one out.write instead of many.. it should be a little bit faster). For benchmark-testing I've used both jmeter and "Microsofts Web-Application Stress Tool", and here I recomend the MS tool, it's very powerfull, and gives you good reports. hope it helps - [EMAIL PROTECTED] > -----Original Message----- > From: Anoop Kumar V [mailto:[EMAIL PROTECTED]] > Sent: 13. júlí 2002 13:51 > To: 'Tomcat Users List' > Subject: RE: how to make tomcat faster > > > hi, > > OK..maybe i shd hv included that in my first message..anyway its here. > > This application has considerable database work with a few > reports thrown in > here > and there. I have just one servlet, remaining are all jsp's > (about 50 jsp's) > and about 25 beans and other class files(MVC). I use MS-SQL > Server as the > database. > no connection pooling.. as i felt the number of users are too > small(100 - > 250 > at peak time) and yes, every request fetches info from the > database. So i > guess > i need to know how to enable connection pooling. > Also the cache part.. there are some entries in server.xml > which seem to say > "save session on restart", but i was not sure so i hv left > them alone. So > tell me how > can i enable cache too. > There is hardly any static content in my application, and > what i meant was a > relative > slow down compared to when Tomcat was stand-alone (or with > Apache). Yes, > even i am using > AJP1.3 connector with isapi_redirector.dll filter. > About System.out.println...yes i had quite a bit until now.. > which i hv > removed.. but > i do not see much of a performance improvement (need to check > at peak time, > again). > Need some more pointers regarding jasper, does it coem > along with tomcat, > and how > to set it up. (is it similar to Jikes?) > > -anoop > > -----Original Message----- > From: Reynir Hübner [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 13, 2002 6:16 PM > To: Tomcat Users List > Subject: RE: how to make tomcat faster > > > Hi, > > please inform us of what kind of work you are doing with > tomcat, are you > requesting informations from databases for every request, are > you using > connection pooling, are you using cache, are using jsp alot ? > There may be many places you can optimize performance in your > application > just as well as increase tomcat performance. > One thing I did to increase performance with t.c.4.0.4 was to > use the Jasper > from 4.1.7. Because the threshhold of my application is in > jsp-rendering > time, and the tags my jsp pages use, this increased > performance about almost > 100%. > Using IIS, if it's correctly configured should help alot, as > it will deliver > all static documents, such as jpegs, gifs, html etc, and take > the load of > delivering this away from tomcat, so tomcat will only need to > handle the > jsps and servlets. > If IIS is slowing down the whole thing, IIS is either wrongly > installed, or > the connector. I've used AJP connectors along with the > isapi_redirect.dll > filter. > Remember also, system.out.println logging can slow everything > down a bit, so > try to do the least of that.... > > but for starters, you should try using the jasper2 from > tc.4.1.7, it really > works well. > > > -reynir. > > > > -----Original Message----- > > From: Anoop Kumar V [mailto:[EMAIL PROTECTED]] > > Sent: 13. júlí 2002 12:11 > > To: 'Tomcat Users List' > > Subject: how to make tomcat faster > > > > > > hi, > > > > i have been developing using Tomcat 4.0.1.. and i hv had no > > problems about > > that. > > > > Now i have moved all my applications on to the production > > server, where > > hopefully i > > wdnt be making any more changes. But i want to make Tomcat > > respond faster to > > requests. > > Obviously the production environment shd be different from > > the development > > one..so > > can someone detail me on what changes i can make to make > > Tomcat quicker to > > respond. > > > > Thanx in adv, > > -anoop > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>