This Howtos posted under: Apache, Open Source | Total Visitors Till Now: 679

Requirements for running an Apache Web server

Before displaying the Powered by Apache logo on your Web server, you want to
make sure your Web server has enough “power” to run it.

Fortunately, Apache does not require massive computing resources to run. It runs
fine on a Linux system with 5 to 12MB of hard disk space and 8MB of RAM.
However, just being able to run Apache is probably not what you had in mind. Most
likely, you want to run Apache to serve Web pages, launch CGI processes, and take
advantage of all the wonderful stuff that the Web has to offer. In that case, you want
disk space and RAM size figures that reflect your load requirements. You can go
about this in two ways: you can ask someone who runs a similar site with Apache
and find out what type of system resources they’re using; or, you can try to figure
out your realistic needs after you’ve installed Apache on your system.

In the latter case, you can use system utilities such as ps, top, and so on to display
memory usage by a particular Apache process. You can then determine the total
memory needed by multiplying a single process’s memory usage by the total
number of Apache processes that will be running at peak hours (see the
MaxSpareServers directive in Chapter 4). This should give you a reasonable estimate
of your site’s RAM requirements for Apache. If you plan to run several CGI
programs on your Apache server, you have to determine memory usage for these
programs as well, and take this additional need into account. One of the ways you
can determine your CGI program memory requirements is run the CGI program and
use the top utility to watch how much memory it uses and then multiply that
amount of memory by the number of CGI requests you need to be able to fulfill
simultaneously.

The disk requirements for Apache source or binary files shouldn’t be a concern
with most systems because Apache binaries take no more than 1MB of space and
the source file is about 5MB. You should really pay attention, however, to the log
files that Apache creates, because each log entry takes up approximately 80 bytes
of disk space. If you expect to get about 100,000 hits in a day, for example, your
Apache access log file may be 8,000,000 bytes. In Chapter 8, you’ll learn how to
rotate the log files by emptying or archiving the log file and replacing it with a
new one.

Finally, consider whether you have appropriate bandwidth for running a Web
server. Estimating bandwidth requirement is not an easy task but you can come up
with ballpark figures by doing a bit of math. Here is what you will need:

The average Web page size for your Web site: If you don’t know this already,
you can run the following command in your document root directory to find
out the average size of your Web pages:

find path_to_doc_root -type f -name “*.html” -ls | \
awk ‘BEGIN{ FILECNT = 0; T_SIZE = 0;} \
{ T_SIZE += $7; FILECNT++} \
END{print “Total Files:”, FILECNT, \
“Total Size:”, T_SIZE, \
“Average Size:”, T_SIZE / FILECNT;}’

Don’t forget to replace path_to_doc_root with the actual document root directory
of your Web site. For example, for a Web site with document root /www/
mysite/htdocs, the above script returns the following output:
Total Files: 332 Total Size: 5409725 Average Size: 16294.4

The number of average size Web pages you can serve (assuming that
Apache has no bottlenecks of its own and totally ignoring the bandwidth
utilized by incoming requests): For example, say you have an ISDN
(128Kbits/sec) connection to the Internet and your average file size is 16K.
Because 128 kilobits per second = 128/8 kilobytes per second = 16 kilobytes
per second, you can send one average size file per second. If you include the
other overhead, such as bandwidth needed for the inbound request traffic,
you probably cannot service a request per second. In this case, network
overhead becomes a big bottleneck if you wanted to allow N (where N > 1)

simultaneous users to connect to your Web site. For example, if you have an
ISDN connection and want to service 12 simultaneous users per second when
the average file size is 16K, you need 12 × ISDN (128 Kbps) connections, which
is a T-1 (1.53 Mbps).

Coolsearchinfo - A free Social Bookmarking Site

Liked this article? To continue getting our latest free Howtos and Tutorials,
you can also grab the RSS feed or Subscribe to Techgurulive by Email

Not Getting



Related posts
  • How to get Apache Server Live Status
    It is very Important to get Apache server status. it will help you to identify that what is happening inside your web server. The Status module allows a server administrator...
  • How to Test Apache Installation
    Installation is not complete until you test it. You can test your Apache installation in a variety of ways. I test the installation in two ways. First, I check the...