libev Digest, Vol 28, Issue 3

vvvua at lost.in.ua vvvua at lost.in.ua
Tue Feb 16 13:23:39 CET 2010


On Tue, 16 Feb 2010 12:00:01 +0100, libev-request at lists.schmorp.de wrote:
> Send libev mailing list submissions to
> 	libev at lists.schmorp.de
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
> or, via email, send a message with subject or body 'help' to
> 	libev-request at lists.schmorp.de
> 
> You can reach the person managing the list at
> 	libev-owner at lists.schmorp.de
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of libev digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: sub milisec socket server write (Neeraj Rai)
>    2. Re: sub milisec socket server write (Marc Lehmann)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 15 Feb 2010 18:18:26 -0800 (PST)
> From: Neeraj Rai <rneeraj at yahoo.com>
> Subject: Re: sub milisec socket server write
> To: Marc Lehmann <schmorp at schmorp.de>
> Cc: libev at lists.schmorp.de
> Message-ID: <694311.89041.qm at web51301.mail.re2.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
> 
> 
> --- On Mon, 2/15/10, Marc Lehmann <schmorp at schmorp.de> wrote:
> 
>> From: Marc Lehmann <schmorp at schmorp.de>
>> Subject: Re: sub milisec socket server write
>> To: "Neeraj Rai" <rneeraj at yahoo.com>
>> Cc: libev at lists.schmorp.de
>> Date: Monday, February 15, 2010, 12:14 AM
>> On Sun, Feb 14, 2010 at 05:25:10PM
>> -0800, Neeraj Rai <rneeraj at yahoo.com>
>> wrote:
>> > There is a trade off between latency and cpu usage. If
>> we sleep 1ms after each queue drain, cpu usage is almost nil
>> on no activity, but latency is ~1ms.
>> > If sleep is omitted, the cpu usage is 100% crowding
>> out other procs on same box.
>> > Q1. is this the best way to do this ?

I think that it is possible to use sleep(0) system call.
In Linux kernel it helps to shedule the processes queue.


Volodymyr Skrypka.



More information about the libev mailing list