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
ActiveState Debuts Open Source Business Suite
Salesforce Offers Visual App Builder
Codesion Steps Out From CVS's Shadow

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]


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Use Web Caching to Make Your Web Site Faster · Creating an Online Shopping Cart Mechanism in PHP · Log JavaScript Errors Using an AJAX-driven Web Service
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Configuring Granular Settings for a Database Level Audit · The Perils of a Web 2.0 Transition on Your Business Processes · Facebook Redesigns Site —Again — Nears 400M Mark

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

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