fork test

2000-04-05 Thread Alexey N. Dokuchaev


Hello!

Me and a friend of mine decided to compare FreeBSD and Linux using this
little program (compiled with "gcc -lm")

Two identical machines run FreeBSD 4.0-SNAP 2214 and Linux Mandrake
7.0 kernel 2.2.13

--
#include math.h

double counter=0,counter2=32;

double
test()
{
return atan2(counter++,counter2+=counter*50);
}

int
main()
{
int t;
while((t=fork())0);
if(!t) while(1) test();
else perror("fork");
}
--
Well, after very short time, both boxes responded to console switchings
and things like that, but trying to run something like "ps", "w",
"uptime" put machine quite on hold (about 2 minutes). The thing is that
Linux finished runnig commands about 3 times faster than FreeBSD.  What
the heck does that suppose to mean?!  I thought FreeBSD whould kick linux
butt?

Please respond directly to me since I am not the member of this list.
Thanks.


Cheers,

  /* Alexey N. Dokuchaev, more commonly   |*/
  /* known as DAN Fe  | mailto:[EMAIL PROTECTED]   */
  /*  | ICQ UIN: 38934845  */
  /* Novosibirsk State University | http://inet.ssc.nsu.ru/~danfe/ */
  /* Scientific Study Center Computer Lab |*/

[Team Assembler] [Team BSD] [Team DooM] [Team Quake]

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS d-@ s+: a--- C++(+++) UBL$ P++$ L+
E-- W++ N++ o? K? w-- O- M V- PS PE Y+ PGP+
t+ 5+ X+ R- !tv b++ DI+ D+++ G++ e h !r !y+
--END GEEK CODE BLOCK--

Microsoft:  Where do you want to go today?
Linux:  Where do you want to go tomorrow?
FreeBSD:Are you guys coming or what?

A good conspiracy is unprovable.  I mean, if you can prove it, it means they
screwed up somewhere along the line.

Jerry Fletcher from Conspiracy Theory



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: fork test

2000-04-05 Thread Kris Kennaway

On Wed, 5 Apr 2000, Alexey N. Dokuchaev wrote:

 Well, after very short time, both boxes responded to console switchings
 and things like that, but trying to run something like "ps", "w",
 "uptime" put machine quite on hold (about 2 minutes). The thing is that
 Linux finished runnig commands about 3 times faster than FreeBSD.  What
 the heck does that suppose to mean?!  I thought FreeBSD whould kick linux
 butt?

FreeBSD spawned many more processes than Linux before it started being
unable to fork and was thus running many more live copies of the program?
You haven't really given/collected enough information to decide.

Kris


In God we Trust -- all others must submit an X.509 certificate.
-- Charles Forsythe [EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: fork test

2000-04-05 Thread Marco van de Voort

  Well, after very short time, both boxes responded to console switchings
  and things like that, but trying to run something like "ps", "w",
  "uptime" put machine quite on hold (about 2 minutes). The thing is that
  Linux finished runnig commands about 3 times faster than FreeBSD.  What
  the heck does that suppose to mean?!  I thought FreeBSD whould kick linux
  butt?
 
 FreeBSD spawned many more processes than Linux before it started being
 unable to fork and was thus running many more live copies of the program?
 You haven't really given/collected enough information to decide.

Linux 2.2.x still supports only 1024 processes I believe. Rumour goes that
2.4 supports 16384 processes, so poster should try a 2.3.99prex kernel.

P.s. this is one of the weirdest benchmarks I have ever seen :-)
Marco van de Voort ([EMAIL PROTECTED])
http://www.stack.nl/~marcov/xtdlib.htm



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: fork test

2000-04-05 Thread Michael Bacarella

  FreeBSD spawned many more processes than Linux before it started being
  unable to fork and was thus running many more live copies of the program?
  You haven't really given/collected enough information to decide.
 
 Linux 2.2.x still supports only 1024 processes I believe. Rumour goes that
 2.4 supports 16384 processes, so poster should try a 2.3.99prex kernel.

Vanilla Linux 2.2.x supports 512 processes, defined by NR_TASKS. 4090
is a hardware limit that can't be passed in 2.2.x

Linux 2.4.x will support an unlimited number of processes up to the point
of 256^sizeof(pid_t). Most people will probably run out of RAM before they
hit this limit.

Poster should screw benchmarks out of fear of holy war. :)

-MB



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message