tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Writing to multiple descriptors with one system call
On Thu, 18 Mar 2010 21:36:47 +0100
Jean-Yves Migeon <jeanyves.migeon%free.fr@localhost> wrote:
> Pretty much all servers use the accept loop thing and fork/pthread right
> after, but this was not my point.
High performance non-single-threaded servers often maintain a pool of
persistent processes or threads which accept(2) concurrently, either in
blocking mode or with polling (generally polling to allow listening to
multiple addresses/interfaces). But indeed this doesn't change much
for this thread...
> Having 80% system time passed in write() calls is not negligeable, but
> if you send the data byte after byte, I hardly see why it would be the
> syscall's fault here. You will have to assess that the overhead does
> indeed come from the context switch, and not by queuing up packets for
> the PHY, block I/Os, or moving data around the IP stack. There is a big
> mess behind a write(2), and the context switch is just one small part of
> it. Instrument. "You can't control what you can't measure."
Agreed
--
Matt
Home |
Main Index |
Thread Index |
Old Index