Servertec Performance
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
How To
Change Log
Future Plans
Knowledge Base
Documentation
Conventions
Command Line
Administrator
Localization
Programming
Security
Performance
Deployment
Server API
Servlet / JSP API
Xerces API
CGI
SSI
Servlets
Config Files
Log Files
Classes
Directory Tree
Examples
Legal
Contact Us

 

General
  • A word of warning to begin with, before going out and spending a lot of money and making a lot of changes, identify the performance bottlenecks and use the 80/20 rule to correct any performance bottlenecks.
  • Test Servertec Internet Server and software being deployed with a number of hardware platforms, operating systems and database engines.
  • Select a hardware platform, operating system and Java implementation that supports a Just-In-Time (JIT).

    Hardware

  • Select a hardware platform appropriate to the need. A good starting point is to look at what other sites are currently successfully running.
  • In general lots of memory is the key to a fast running site.
  • Processing power is not as important when serving static content and only becomes more important when serving dynamic data-driven content and on buy sites.
  • Servertec Internet Server is highly multi-threaded and would benefit from running on a multi-processor SMP platform or a multi-core system with an operating system and Java implementation that supports multiple processors or cores.
  • Install plenty of memory. For PC based sites a minimum of 256 MB and if possible install 512 MB or more.
  • Install sufficient processing power. For PC based sites a minimum of 1 GHz.
  • Install at least 100 Mbit network and if possible install a 1 G-bit network.
  • Install 5400 RPM IDE drives or better 7200 RPM and if possible RAID SATA or SCSI drives.
  • For PC based sites use mother boards whose bus speed are at least 266 MHz and if possible install 333 MHz or 400 MHz ones.

    In-house Network

  • A fast network connection is important to meeting the peek time demands. Install sufficient network infrastructure and acquire sufficient band-width.
  • If possible use redundant dedicated connections.
  • Use switches over hubs.
  • Use hardware load-balancing routers with fail-over technology that support web-sessions.
  • Avoid running behind a fire wall or proxy.

    Out-sourced Network

  • Dedicated hosting is normally better than shared or virtual hosting.
  • Avoid running behind a fire wall or proxy.

    Topology

  • Distribute processing over a number of computers.
  • Setup an n-tier environment. A group of computers responsible for transport of static content, another group for generating dynamic content and another group as database servers.
  • If possible install a number of machines in different geographic areas closest to audience.

    Software

  • Install and run only the software that is needed.

    Operating System

  • Install only the services/features/protocols that are needed.
  • Use software load-balancing with fail-over technology that support web-sessions.
  • Pre-allocate virtual memory, caches and database volumes and partitions.
  • If PC based install latest release of Microsoft Windows 2003.

    Database Engines

  • Install only the services/features/protocols that are needed.
  • Avoid over using database engines when properties or flat files will do.
  • When using databases use indexes wherever possible.
  • Use JDBC drivers that support connection pools and result set caching.
  • Avoid JDBC drivers go use JDBC-ODBC bridge or that go throw ODBC.

    Software Development

  • Use a software profiler to identify resource usage and performance bottlenecks.
  • When writing code focus on global and algorithm efficiency.
  • When optimizing code use 80/20 rule.
  • Use object pools.
  • Avoid over using database engines when properties or flat files will do.
  • When accessing a database use database connection pools.
  • As much as possible use Servlets. CGI, SSI and JSP are slower.
  • Use javax.servlet.ServletOutputStream instead of slower java.io.PrintWriter.
  • When writing Servlets use java.servlet.http.HttpServletResponse.setDateHeader() to set Date and Last-Modified in the response header and implement javax.servlet.http.HttpServlet.getLastModified().
  • If possible pre-compile Java Server Pages (JSP).

    Web Content

  • Test web site with both a broadband connection and modem connection.
  • Web content whether static or dynamic should be as small as possible.
  • Web pages should reference as few images as possible.
  • As a general rule web pages including all images should not exceed 30 KB.
  • As a general rule web pages should not include more than 5 images.
  • Where possible compress Web content, enable content-negotiation and define default_content_encoding and contnet_encodings in FileServlet Servlet definition.
  • Use GIF format for icons and simple line graphics and use JPG format for pictures.
  • When using GIFs reduce the number of colors as much as possible
  • When using JPGs compress images as much as is reasonable.
  • Interlace GIF images.

    Servertec Internet Server Configuration

  • If possible do not use the Administrator to monitor a workgroup.
  • Do not run with Debug enabled. Using Administrator from the Server form disable Debug.
  • Preload commonly used Servlets. Using the Administrator from the Servlets form edit commonly used servlets and set Preload to Yes.
  • If the client's hostname is not important then using the Administrator from the Server form disable DNS Lookup.
  • If servlet chaining is not being used then using the Administrator from the Server form disable Servlet Chaining.
  • Using the Administrator from the Server form change Input Buffer Size to an appropriate value.
  • Using the Administrator from the Server form change Output Buffer Size to an appropriate value.
  • Using the Administrator from the Server form change Maximum Header Length to a value not too much larger than is needed so that valid requests are not blocked.
  • Using the Administrator from the Server form change Maximum Header Count to a value not too much larger than is needed so that valid requests are not blocked.
  • Using the Administrator from the Server form change Maximum Content Length to a value not too much larger than is needed so that valid requests are not blocked.
  • Using the Administrator from the Server form change HTTP Server Protocol to the required HTTP protocol level.
  • If multilingual support is not needed disable Content Negotiation from the Server form using the Administrator.
  • If not needed do not set a Default Language from the Server form using the Administrator.
  • If not needed do not set a Default Country from the Server form using the Administrator.
  • If not needed do not set a Default Variant from the Server form using the Administrator.
  • If not needed do not set a Default Charset from the Server form using the Administrator.
  • If serving large text documents or html pages compress them using GZIP, enable Content Negotiation and define GZIP=.gz in Content Encodings from the Server form using the Administrator.
  • If not needed diable Send Vary from the Server form using the Administrator.
  • If not securing resources using ACLs then using the Administrator from the Server form disable Security Enabled.
  • Unless running behind a proxy server that does not support Keep Alive using the Administrator from the Socket form enable Keep Alive.
  • Using the Administrator from the Socket form allocate sufficient number of default Connections, but not too many.
  • If possible disable Wait On Full using the Administrator from the Socket form.
  • If possible leave Wait On Close as Dynamic in the Socket Administrator form.
  • If possible do not set Linger in the Socket Administrator form.
  • If possible leave No Delay as Dynamic in the Socket Administrator form.
  • Using the Administrator from the Socket form change Socket Send Buffer Size to an appropriate value.
  • Using the Administrator from the Socket form change Socket Recieve Buffer Size to an appropriate value.
  • If possible do not change Socket Source from Main in the Socket form from the Administrator.
  • If serving static content using the FileServlet then using the Administrator from the Servlets form set FileServlet cache_size parameter as large as reasonable.
  • If icons images are not needed in directory listings disable them by setting display_icons=n using the Administrator from the Servlet form for FileServlet.
  • When using the FileServlet to access directory listings do not sort listings using the Administrator from the Servlets form set sort=n for FileServlet definition.
  • If redirection to default pages can be used enable it by setting use_redirect=y using the Administrator from the Servlet form for FileServlet.
  • If access to directory listings are not required then using the Administrator from the Servlet form set directory_access=n for FileServlet.
  • If logging is not needed then using the Administrator from the Logger form disable Access Log, Event Log and Error Logs.
  • When logging access, events and errors the console is fastest, then the file system, then Servertec Persistent Object Store (POS) and finally any JDBC accessible database.
  • When using persistent sessions the file system is the fastest, then Servertec Persistent Object Store (POS) and finally any JDBC accessible database.
  • When monitoring a workgroup the file system is the fastest, then Servertec Persistent Object Store (POS), then any JDBC accessible database and finally eMail.
  • Choose appropriate values when configuring timeout and intervals. Choosing values that are too small or too large will most likely have a negative impact performance.

    Online Resources

  • Sun BigAdmin Portal: Optimizing Your Web Server

    Books

  • Capacity Planning for Web Performance : Metrics, Models, and Methods by Daniel A. Menasce, Virgilio A. F. Almeida
  • Capacity Planning for Internet Services by Adrian Cockcroft, Bill Walker
  • Professional Web Site Optimization by Michael Tracy, et al
  • Web Performance Tuning: Speeding Up the Web by Patrick Killelea, Linda Mui
  • System Performance Tuning by Michael Kosta Loukides, Mike Loukides

  • Optimizing Unix for Performance by Amir H. Majidimehr
  • Solaris 7 Performance Administration Tools by H. Frank Cervone, Frank H. Cervone
  • Sun Performance and Tuning: Java and the Internet by Adrian Cockcroft, et al
  • HP-UX Tuning and Performance: Concepts, Tools, and Methods by Robert F. Sauers, Peter S. Weygant
  • Accelerating Aix : Performance Tuning for Programmers and System Administrators by Rudy Chukran
  • AIX Performance Tuning Guide by Frank Waters
  • Sizing and Tuning of Windows NT by Curt Aubley
  • Microsoft(r) Windows(r) 2000 Performance Tuning Technical Reference by Irfan Chaudhry, John Paul Mueller

  • Java Performance Tuning by Jack Shirazi
  • Java (tm) Performance and Scalability, Volume 1: Server-Side Programming Techniques by Dov Bulka

  • Oracle Performance Tuning, 2nd Edition by Mark Gurry & Peter Corrigan
  • Oracle8i and Unix Performance Tuning by Ahmed Alomari

    Notes

    Some of the above suggestions may compromise security, may limit functionality and may add to development and deployment costs.

    Disclaimers

    The above sections on how to improve Servertec Internet Server performance are by no means complete, ordered or definitive and should only be used as a starting point.

    Web Resources or Books listed are not to be taken as an endoursement or recommendation and are by no means complete, ordered or definitive and should only be used as a starting point.

  •  top of page
    Copyright © 1998-2005 Servertec. All rights reserved.
    Privacy Statement.
    Last Modified: Sun Sep 04 14:57:18 EDT 2005