spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / java / servletsguide / chap16 To page 1To page 2To page 3current page
[previous]

Java Servlets Developer's Guide

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Tune Your Servlet Container

The servlet container you are using may also provide you with opportunities for optimization. Since there are numerous servlet containers, and they are all quite different in the way they are managed and configured, I will simply provide you with some general suggestions of areas that you might be able to tune:

In addition to these general suggestions I would advise you to read the documentation for the servlet container you are using for other tuning parameters.

Tune Your Virtual Machine

Perhaps one of the easiest ways to boost the performance of your servlet container is to tune the Virtual Machine. In most cases, you can increase the initial size of the heap. But be careful: Using a larger heap size decreases the frequency of garbage collection by the VM, but increases the time that the garbage collector takes when it does run. The heap size is controlled by the –mx option, but you should check the documentation for the particular VM you are using before attempting to modify the size of the heap.

Summary

In this chapter, we have focused on ways to ensure that your servlet performance is at a level that keeps your users happy. There are lots of common performance pitfalls when using Java, such as String concatenation or synchronization, that can have a negative impact on your application. Simply being aware of these pitfalls, and how to work around them, can help you to write efficient servlets.

Once you have written your servlets, there are also ways to boost performance by tuning the servlet container you are using, as well as the underlying Virtual Machine.


home / programming / java / servletsguide / chap16 To page 1To page 2To page 3current page
[previous]

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

Created: July 31, 2002
Revised: July 31, 2002

URL: http://webreference.com/programming/java/servletsguide/4.html