Free Books / Computers / Practical mod_perl / books


previous page: 1.2.2. CGI Scripts Under the Forking Modelpage up: Practical mod_perl | by Stas Bekman and Eric Choletnext page: 1.3. The Development of mod_perl 1.0

1.2.3. Performance Drawbacks of Forking

Search

Titles
  • Animals
  • Architecture
  • Arts
  • Business
  • Computers
  • Crafts
  • Finance
  • Flora and Plants
  • Cooking
  • Gardening
  • Health and Healing
  • History
  • Home Improvements
  • Languages
  • New Age
  • Novels
  • Real Estate
  • Reference
  • Religion
  • Science
  • Society
  • Sports
  • Travel
  • Outdoors
  • Site Listing

Discover
  • Find Articles
  • Travel Articles
  • FAQ Help Tutorials






















Description

This section is from the "Practical mod_perl" book, by Stas Bekman and Eric Cholet. Also available from Amazon: Practical mod_perl

There are several drawbacks to mod_cgi that triggered the development of improved web technologies. The first problem lies in the fact that a new process is forked and a new Perl interpreter is loaded for each CGI script invocation. This has several implications:

  • It adds the overhead of forking, although this is almost insignificant on modern Unix systems.

  • Loading the Perl interpreter adds significant overhead to server response times.

  • The script's source code and the modules that it uses need to be loaded into memory and compiled each time from scratch. This adds even more overhead to response times.

  • Process termination on the script's completion makes it impossible to create persistent variables, which in turn prevents the establishment of persistent database connections and in-memory databases.

  • Starting a new interpreter removes the benefit of memory sharing that could be obtained by preloading code modules at server startup. Also, database connections can't be pre-opened at server startup.

Another drawback is limited functionality: mod_cgi allows developers to write only content handlers within CGI scripts. If you need to access the much broader core functionality Apache provides, such as authentication or URL rewriting, you must resort to third-party Apache modules written in C, which sometimes make the production server environment somewhat cumbersome. More components require more administration work to keep the server in a healthy state.

 

Continue to:

  • prev: 1.2.2. CGI Scripts Under the Forking Model
  • Table of Contents
  • next: 1.3. The Development of mod_perl 1.0

Books by Stas Bekman:

Tags

practical mod_perl, modperl, Apache, perl, cgi, html, scalability, free, open source, OSS, squid, high availability, linux, unix, web, www, webserver, admin, book, webmaster, tools, modperl guide, docs, documentation, help, script, eric cholet, stas bekman, performance, speed, choice









TOP
previous page: 1.2.2. CGI Scripts Under the Forking Modelpage up: Practical mod_perl | by Stas Bekman and Eric Choletnext page: 1.3. The Development of mod_perl 1.0

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Us ] [ Search ]

Last modified Fri Jul 18 13:32:17 2008