*BSD News Article 51445


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!howland.reston.ans.net!newsfeed.internetmci.com!news.mathworks.com!uunet!in2.uu.net!world!indra.com!coopnews.coop.net!news.coop.net!csnews!boulder!apuzzo
From: apuzzo@snake.colorado.edu (Tony Apuzzo)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: "An HTTP software server can pummel a CPU..."
Date: 14 Sep 1995 17:57:33 GMT
Organization: /usr/local/news/lib/organization
Lines: 47
Message-ID: <439qed$rdm@lace.Colorado.EDU>
References: <gary-1309951409030001@bhb17.acadia.net> <438u8f$cok@kadath.zeitgeist.net>
NNTP-Posting-Host: snake.colorado.edu

In article <438u8f$cok@kadath.zeitgeist.net>,
Amancio Hasty, Jr. <hasty@rah.star-gate.com> wrote:
>gary@first.acadia.net (Gary Robinson) wrote:
>>Hello,
>>
>>From an InfoWorld 6/19/95 article:
>>
>>"An HTTP software server can pummel a CPU, because there's no mechanism in
>>any existing server to control the amount of processor time allotted.  Ten
>>users doing SQL questies, for instance, might bring the system to a
>>standstill while users trying to receive static pages wait."
>
>Yeap , this is very true for OSes which don't have priority pre-empted
>scheduling. For instance, right now I am running a simple program which
>has a tight loop just chewing up the cpu while I am typing this.
>Wait let me start five more copies...
>So much for InfoWorld.
>
>Curious which OS was the article referring to ?
>
>	Tnks,
>	Amancio

You're missing the point Try this instead:

   sh$ for i in 1 2 3 4 5 6 7 8 9 0
   > do
   > find / -type f -exec grep slow '{}' \; 2>&1 >/dev/null &
   > sleep 5
   > done

This is a more realistic (though still pretty poor) simulation of 10 users
doing complex SQL queries.

This type of thing can only happen if your HTTP server is serving pages
that support search engines.  If you have other users trying to get regular
pages (html code, .gif's, etc.)  they will be *significantly* delayed while
this is going on.  It is possible to avoid problems like this through load
balancing, or running the SQL on another machine, etc.  I think Infoworld's
point was that it is easy to slow an otherwise capable HTTP server to a
crawl if you aren't careful.

-Tony
-- 
*                                                         
* Be a non-conformist like me and don't use a .sig at all.
*