Performance of HTTP and CGI

Abstract

This paper reports a series of performance experiments investigating the performance of an HTTP server (CERN HTTPD version 3.0, on an HP 715 running HPUX 9.01). The objective was to learn what parts of the server consume the most CPU time, and thus on what aspects implementors should concentrate to improve performance. This is particularly important for heavily loaded commercial servers.

These results show that for high performance, better encoding of HTTP header information is needed: ASCII headers are great for debugging, but make for inefficient parsing.

Although the fork/exec model of execution enforces stateless interaction, higher performance would be achieved by having a threaded server.

Instead of using CGI to extend the functionality of the server and gateway to other applications, it would be better to define extension HTTP methods. In this model the server could send an HTML form which invoked an extension HTTP method rather than overloading GET and POST to launch a CGI program. The extension HTTP method would be executed as a thread inside the server.

Threads alone are not sufficient for high performance, because parsing HTTP headers is CPU bound and will significantly impact the performance of a heavily loaded server.


Next ANSA home page

Contents


Nigel Edwards <nje@ansa.co.uk>, Owen Rees <rtor@ansa.co.uk>