"Yuri Victorovich" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I tried to post this to linux.kernel but it seems to be
> read-only:
> ---
> I have an application that listens with select
> for many pipes. There are 100 pipes that actively
> receive data (~2 MB/sec total), 100 idle ones and
> one that receives short messages (8 bytes)
> once in a while. All these 201 being fed to "select"
> and then every one being checked with FD_ISSET.
>
> All pipes were created with "pipe" call except
> that last one that was created with "socketpair"
> (SOCK_DGRAM).
>
> I observe the problem: this last pipe receives
> messages with long delay as if they were buffered.
> I send them one-by-one from signal handler
> and they only being sensed by "select" later
> whole bunch at a time.
>
> If data rate on 100 busy pipes drops problem
> also disappears and 8-byte messages arrive
> instantaneously.
>
> Sounds like filehandle starvation symptom to me.
>
> Anyone experienced similar problem?
>
> Yuri.
Do you service all descriptors (including the socket) everytime select
returns? Also, try tweaking the TCP_NODELAY option for the socket using
setsockopt call.
|