Re: Problems with kernel-2.2.19-6.2.7 from RH update for 6.2

From: kuznet@ms2.inr.ac.ru
Date: Thu Aug 23 2001 - 11:29:50 EST


Hello!

> > Where? httpd does not connect().
>
> For read/write. Although it is incorrect to compare as thttpd is serving =
> more=20
> than one connect.

It is even worse. Useless operation in data path. read/write will return
the error, if connection died in any case.

> > I see. If tuning is goal, it is right way. Amount of syscalls is the sa=
> me
> > as with alarm, but logic is cleaner.
>
> Logic with alarms will not work in multithreaded case.

I meaned _your_ logic is cleaner . :-)

> I assume that using SO_RCVTIME/SO_SNDTIME would be better in terms of=20
> performance.

Not very much. But code becomes simpler.

Select() is better sometimes, f.e. when program uses signals
(and glibc uses signals _internally_ when multithreaded, breaking lots
 of things, do you know this? :-)). In this case you need to raclulate
remaining time to restart poll/read/write, linux select returns it.

> layer to use sync IP...

What is "sync"?

> be (approximately)? if we assume that I have lots of connects which trans=
> fers=20
> small amount of data in each (1-2K).

It depends. The advantage of read/write with SO_*TIMEO is that
in all 100% of cases data arrive in time or you send immeadiately
and appear in right place and do not waste cache and cycles to exit from
select and to enter to read/write. Also, select() is pretty
suboptimal.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:58 EST