1. I wrote the tcp client which forks 100 times.
Each subprocess holds on pause(...) waiting for signal.
Afer receiving SIGHUP it continues and
a) connects to the server
b) sends 10 bytes
c) receives data form sockets
d) closes the sock
2. On the other side (another host) I wrote the server which does the following:
a) prepares listening socket
b) calls epoll_create(...) and epoll_ctl(...,EPOLL_CTL_ADD, listening_sock,...)
c) starts the infinite loop where the rest of tcp connetion(s) is done using epoll_wait(....)
The whole server code is similar to the sample from
http://zhoulifa.bokee.com/6081520.html with translation from:
http://translate.google.com/translat...m/6081520.html
The problem is that at the client host I can see a lot of sockets with 'SYN_SENT' status
but on the server side after fast receving (and servicing) about 40 requests the server "sometimes" handles the next one(s).
"Sometimes" means 2-3 requests per seconds.
If I decrease the number of forked clients to 10 averything is ok.
I'm am stuck now. I don't know where to look the reason...