Re: Possible problem with ACCEPT/CONNECT in

From: Vandoorselaere Yoann (yoann@mandrakesoft.com)
Date: Fri Apr 07 2000 - 05:27:30 EST


"Peter Zaitsev" <pz@spylog.ru> writes:

> Yes. This is to simulate many clients doing conect at the same time,
Clients doing many connect at the same time do it in an intelligent fashion.

> also I
> want to have the soures simple. That's wy it forks much.

You can do thing in a clean way and keep the source simple,
instead you're actually making a test program that you do not
even master.

bad excuse.

> The problem also
> repeated on 20 processes...

This is normal.
Correct your program and start to argue.

> Yes ! I have a number of processes trying to connect a server in a loop -
> just normal situation for my working server. The problem is then this is
> run other network no client nor server are loaded by CPU, network is not
> loaded much eather but connects take significant time sometims.

Please learn a thing : "to read & learn from what other people say"
I know that you want to reproduce a "normal working situation" for your server,
what i'm saying is that you're using a bad way to do it,
your test program itself is buggy.

> >
> > Your client program itself make the machine slow because it is badly
> > written, and you're benchmarking client & server on the same machine !
> > What did you expect ?
> >
> > Please do not blame the kernel for being a bad programmer.
>
> :) Could you please better read comments befor watching the source.

I've done.
 
> I do not serve anything So I do not need to fork as only thing I do is to
> cliose the socket..

You don't know how to write a server,
you're forking 200 time and start accept in each fork(),
which is the wrong way to do it...

I will not arg anymore, because you don't even appear to understand
why *your code* is completly wrong & fscked up.

Feel free to write me in private ( cause this is completly off topic ),
but before please do a search on altavista / deja.com

with +bsd +socket +programming

and try to learn from your mistake...

>
> Thanks a lot but originally I discovered this problem then palying with
> apache server which is not coded by me.

So send an email to the apache author,
they are best placed than you if there is really ( which i do not think) a bug.

> I didn't want to post anything then the simplest thing which could reproduce
> the problem.

You're not posting the easier way,
you're actually posting code which do nothing but bs.

--
                   -- Yoann,  http://prelude.sourceforge.net
     It is well known that M$ products don't call free() after a malloc().
     The Unix community wish them good luck for their future developments.

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



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:18 EST