Use poll() instead of select()

Jaime Torres kde-optimize@mail.kde.org
Thu, 30 Jan 2003 11:50:25 +0100


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2C84D.65055340
Content-Type: text/plain;
	charset="iso-8859-1"

> On 30 Jan 2003 at 11:28, Lubos Lunak wrote:
> 
> > On Thursday 30 of January 2003 11:15, Jaime Torres wrote:
> > > Hello,
> > >
> > >   I have done a small test with the very recent kde 3.1 on a
> > > linux-i686-2.4.20.
> > >
> > >   I have readed in 
> http://www.kegel.com/dkftpbench/Poller_bench.html
> > >   that poll() is faster than select() on Linux,*BSD and I 
> thinked that also
> > > in comercial unixes, but I know that poll() is simpler to use than
> > > select().
> > 
> >  From the URL:
> > (for 100 fds)  
> >  call       microseconds
> >  select  54
> >  poll     50
> 
> Isn't that data little too old? 2.2.14 is really old.

And, also this data is for 100 file descriptors, while KDE libs normally
uses 1 or 2.

> Anyway how many connections does DCOP server entertains? Even 
> if it is a high 
> cost operation, if it is not getting hit pretty frequently, 
> then it should be 
> OK. Isn't it?

Yes, it is OK, although I do not know how frecuently DCOP is called in a
normal session.

But, imagine kio/kio/slavebase, this one is used frecuently.
 
> Bye
>  Shridhar
> 
> --
> Abstainer, n.:	A weak person who yields to the 
> temptation of denying himself a	
> pleasure.		-- Ambrose Bierce, "The Devil's Dictionary"
> 
> _______________________________________________
> Kde-optimize mailing list
> Kde-optimize@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-optimize
> 

------_=_NextPart_001_01C2C84D.65055340
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: Use poll() instead of select()</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>&gt; On 30 Jan 2003 at 11:28, Lubos Lunak =
wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; On Thursday 30 of January 2003 11:15, =
Jaime Torres wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; Hello,</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt;&nbsp;&nbsp; I have done a small test =
with the very recent kde 3.1 on a</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; linux-i686-2.4.20.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt;&nbsp;&nbsp; I have readed in </FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://www.kegel.com/dkftpbench/Poller_bench.html" =
TARGET=3D"_blank">http://www.kegel.com/dkftpbench/Poller_bench.html</A><=
/FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt;&nbsp;&nbsp; that poll() is faster =
than select() on Linux,*BSD and I </FONT>
<BR><FONT SIZE=3D2>&gt; thinked that also</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; in comercial unixes, but I know that =
poll() is simpler to use than</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; select().</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; From the URL:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; (for 100 fds)&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; =
call&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; microseconds</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; select&nbsp; 54</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; poll&nbsp;&nbsp;&nbsp;&nbsp; =
50</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Isn't that data little too old? 2.2.14 is =
really old.</FONT>
</P>

<P><FONT SIZE=3D2>And, also this data is for 100 file descriptors, =
while KDE libs normally uses 1 or 2.</FONT>
</P>

<P><FONT SIZE=3D2>&gt; Anyway how many connections does DCOP server =
entertains? Even </FONT>
<BR><FONT SIZE=3D2>&gt; if it is a high </FONT>
<BR><FONT SIZE=3D2>&gt; cost operation, if it is not getting hit pretty =
frequently, </FONT>
<BR><FONT SIZE=3D2>&gt; then it should be </FONT>
<BR><FONT SIZE=3D2>&gt; OK. Isn't it?</FONT>
</P>

<P><FONT SIZE=3D2>Yes, it is OK, although I do not know how frecuently =
DCOP is called in a normal session.</FONT>
</P>

<P><FONT SIZE=3D2>But, imagine kio/kio/slavebase, this one is used =
frecuently.</FONT>
<BR><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>&gt; Bye</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp; Shridhar</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; --</FONT>
<BR><FONT SIZE=3D2>&gt; Abstainer, =
n.:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A weak person who yields =
to the </FONT>
<BR><FONT SIZE=3D2>&gt; temptation of denying himself =
a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; pleasure.&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Ambrose Bierce, &quot;The =
Devil's Dictionary&quot;</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; =
_______________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; Kde-optimize mailing list</FONT>
<BR><FONT SIZE=3D2>&gt; Kde-optimize@mail.kde.org</FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://mail.kde.org/mailman/listinfo/kde-optimize" =
TARGET=3D"_blank">http://mail.kde.org/mailman/listinfo/kde-optimize</A><=
/FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2C84D.65055340--