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 Wed, 17 Mar 2010 16:07:04 +0100
Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:

> On Wed, Mar 17, 2010 at 12:50:51PM +0000, Sad Clouds wrote:
> > [...]
> > I profiled a simple event driven server, with 5000 simultaneous
> > connections. About 80% of the time was spent in write() system call.
> 
> What makes you think that a syscall writing the same data to multiple
> descriptors would be faster ?
> My guess is that the time is not spent in the syscall code itself,
> but in the socket code (or TCP). 

I don't know how much improvement it would make, but I thought it would
cut down on context switching. Same reason why single writev() performs
better than multiple write().


Home | Main Index | Thread Index | Old Index