Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

(MeowChow) Re2: Non-linear sub-routine launching

by MeowChow (Vicar)
on Apr 04, 2002 at 03:24 UTC ( #156552=note: print w/replies, xml ) Need Help??

in reply to Re: Non-linear sub-routine launching
in thread Non-linear sub-routine launching

One word of warning - spawning too many children too fast can saturate your network so don't write a Denial of Service hack on your own servers!

Are you sure? I seriously doubt that a server could fork off processes at a rate fast enough to saturate a decent network, assuming that all each process does is send normal pings once every few seconds.
               s aamecha.s a..a\u$&owag.print
  • Comment on (MeowChow) Re2: Non-linear sub-routine launching

Replies are listed 'Best First'.
Re: (MeowChow) Re2: Non-linear sub-routine launching
by tachyon (Chancellor) on Apr 04, 2002 at 05:56 UTC

    As you correctly note with a ping of 512 bits (32 bytes each way) I agree it would seem very unlikely that you could spawn processes fast enough to cause problems (even on a narrow 10Mbps network you expect a good 3Mbps before you get collision problems so you would need to spawn over 6,000 processes in a second if they all made a single ping). However once someone discovers the awesome power of fork() it is necessary to consider the potential problems. For instance if you used the default 4 x 32 byte ping instead of a single ping you only need 1,250 odd processes.... I have some vague recollection of bringing a network to a standstill with an ill considered forking script - admittedly each process was sending more data than a simple ping. Another consideration is how many processes you spawn. You certainly can potentially spawn enough to bring a server to a grinding halt.




Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156552]
[Corion]: Meh... For bringing Perl into the Enterprise, I need to learn more about GSSAPI :-(

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2018-06-21 13:28 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (118 votes). Check out past polls.