lkml.org 
[lkml]   [1997]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: InfoWorld web server shootout
    On Thu, 10 Jul 1997, Alan Cox wrote:

    > > On different procesors? I understand that threads context switch takes
    > > less time, but that also requires additional processing for
    > > syncronization. With SMP there will be less context switches, so advantage
    > > will decrease while overhead remains the same.
    >
    > With SMP your "single looping task" model should indeed be one task per
    > CPU, seeking to have each CPU running one task and never switching

    This is what I'm trying to make possible -- never or rarely switching
    task on every CPU that does all "heavy" looping processing, receiving
    requests from "main" server task and replying directly to clients if it's
    file sending or, if it's a processing task, to the main server where
    its output is buffered, so task can receive new request before output is
    sent to the client.

    > > INADDR_ANY), and it's possible to do use multiple accept()'ing threads on
    > > one port if they are syncronized to avoid simultaneous accept()'s. But
    >
    > You can do the simultaneously. Linux, BSD and everything else except for
    > some buggy code (Linux 1.0, Solaris 2.4) handle that happily.

    At least on FreeBSD it worked fine, but caused a significant performance
    loss because of simultaneous awakening of accept()'ing tasks even though
    for all tasks but one accept() failed when only one client connected at
    the time. In FreeBSD it's changed in 2.2.x, but I haven't looked in Linux
    code that handles it, and don't know if Linux suffers from the same
    problem.

    --
    Alex


    \
     
     \ /
      Last update: 2005-03-22 13:39    [W:0.019 / U:31.556 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site