Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 926

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<HTML
><HEAD
><TITLE
>How to benchmark a web server</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="Caudium HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Customizing your server"
HREF="customizing.html"><LINK
REL="PREVIOUS"
TITLE="How to run Caudium as a non-privileged user; How to secure Caudium"
HREF="secure.html"><LINK
REL="NEXT"
TITLE="How to tune your system for best Caudium performances"
HREF="tune.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Caudium HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="secure.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 5. Customizing your server</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="tune.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="benchmark">5.2. How to benchmark a web server</H1
><P
>&#13;      First, benchmarking a web server is not an easy thing. To benchmark a 
      web server the time it will take to give a page is not important: you don't
      care if a user can have his page in 0.1 ms or in 0.05 ms as nobody can have 
      such delays on the Internet.
    </P
><P
>&#13;      What is important is the average time it will take when you have
      a maximum number of users on your site simultaneously.  Another
      important thing is how much more time it will take when there
      are 2 times more users: a server that take 2 times more for 2
      times more users is better than another that take 4 times more
      for the same amount of users.  If you run more than a web server
      on your computer, you will also want to look at the load average
      and CPU time of your system. Here is a typical output of the
      command <B
CLASS="command"
>uptime</B
>:
    </P
><P
>&#13;      <TT
CLASS="computeroutput"
>&#13;        22:39:49 up  2:22,  5 users,  load average: 0.01, 0.01, 0.00
      </TT
>
    </P
><P
>&#13;      And an extract from the top(1) man page:
    </P
><P
>&#13;      <SPAN
CLASS="QUOTE"
>"
	The load averages are the average number of process ready to run during 
	the last 1, 5 and 15 minutes
      "</SPAN
>
    </P
><P
>&#13;      So the lower your load average is, the better for the other
      programs on your machine.
    </P
><P
>&#13;      Now comes the next problem: how can you stress your web server with a maximum 
      number of connections when your client (the machine making the request) will
      usually not be able to cope with the server and with the number of users you 
      have. 
    </P
><P
>&#13;      To do this, increase the number of sockets you can have on your
      system. Under some systems it is 1024, which is too low, see
      <A
HREF="tune.html"
>Section 5.3</A
> for more information.  The
      next thing to do is to have a good client program written with
      threads and non-blocking sockets.  If you use a multi-fork
      program on a single client, it will never cope with any web
      server. It is also good to have several clients stressing the
      server together.

    </P
><P
>&#13;      Last, if you want to compare two web servers, be sure that they are on the
      same hardware, OS, and network. The same holds for the client(s).
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="secure.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="tune.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>How to run Caudium as a non-privileged user; How to secure Caudium</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="customizing.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>How to tune your system for best Caudium performances</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>