jeffk at tenetwork.com
Tue May 13 21:16:01 New Zealand Standard Time 1997
At 07:16 PM 5/13/97 PST8PDT, you wrote:
>>(FWIW, someone mentioned that process context switching was
>>expensive. This is true, but your server is going to be switched out
>>anyways, as it's unlikely that nothing else is running on the machine
As JL poinetd out its EQUALLY unlikely that you have 500 system processes.
But if you spwan a process per user you will get tehre pretty good.
Three snickers bar don't cost me much money... 500...
>Context switching is cheap if it does not become a significant part of
>your total process expense (obviously). Run a single process, or even
>just a couple/few processes and is stays cheap. Start running one
>process for every connection or something else equally silly and of a
>sudden context switches start becoming a major fraction of the total
>expense of running your system.
>Wanna try something?
>Write a little program (shell script will do fine) that does nothing
>but print out numbers and delay a couple seconds every now and then.
>Run a couple copies. They'll run very nicely and very rapidly, The
>price of context switching between the simultaneously executing copies
>is small. Watch your CPU utilisation and it should stay quite low.
>Now start up 300 instances of this little trivial program and watch
>your system crawl into the drain. Why? The price of context
>switching between your programs suddenly became a significant
>percentage of the total work your CPU was doing. (Graciously ignoring
>swap, RAM etc aspects that also chime in here).
>J C Lawrence Internet: claw at null.net
>(Contractor) Internet: coder at ibm.net
>---------------(*) Internet: clawrenc at cup.hp.com
>...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...
More information about the MUD-Dev