Of course it will be slower - it is doing extra copies.
Threading is only helpful if you are serving pages that block on I/O
and are not using CGI.  Nothing magic about threads - they always
add overhead.  If you have a multi-processor then you can get better
throughput, but again only if you have pages that block on I/O
(e.g., databases) and are not using CGI.

With Tcl 8.4 we'll be able to pass the socket channel to worker threads
and so *reduce* but not eliminate the overhead of using threads.

>>>"David LeBlanc" said:
 > Hi Brent;
 > 
 > Using Windows NT 4.0sp6a on a dual pentium pro 200mhz with 256mb, and both
 > the server and the test shell on the same box, I got the following values
 > from torture.tcl:
 > 
 > % Iterate ticktick 8015 1000 index.html
 > Starting 1000 fetches
 > 0
 > 129.766 sec 7251036 bytes 1000 fetches
 > 129.766 ms/fetch
 > 55877.780004 bytes/sec
 > 7.70617881417 fetches/sec
 > 7251 bytes/fetch
 > 
 > This is slower then the speed of the single threaded server:
 > % Iterate ticktick 8015 1000 index.html
 > Starting 1000 fetches
 > 0
 > 111.531 sec 6559068 bytes 1000 fetches
 > 111.531 ms/fetch
 > 58809.3713855 bytes/sec
 > 8.96611704369 fetches/sec
 > 6559 bytes/fetch
 > 
 > I have no idea why the number of bytes per fetch is different, it is the
 > exact same page.
 > 
 > Regards,
 > 
 > Dave LeBlanc
 > 

--      Brent Welch     <[EMAIL PROTECTED]>
        http://www.scriptics.com
        Scriptics: The Tcl Platform Company


Reply via email to