Hi all,
I have just created a perl script that daemonizes itself and runs as a
process in the background (Hence daemon :) ). I just ran a TOP on my
server and noticed that the perl script uses 8.8% memory. and about 1%
CPU. Now the script continually runs through a while loop. Before I
try it would it be a good idea to have this while loop sleep for about
20 seconds (sleep 20;) and then have it run again. Would this place
less strain on the server?
Daemonize();
while (1) {
#Do stuff and put lots of strain on my server
}
OR
while (1) {
#Do stuff but after this make the while loop sleep for 20
seconds
sleep 20;
}
Would this make any difference. Or has any one done any thing like this
b4?
Kind regards,
Daniel Falkenberg
==============================
VINTEK CONSULTING PTY LTD
(ACN 088 825 209)
Email: [EMAIL PROTECTED]
WWW: http://www.vintek.net
Tel: (08) 8523 5035
Fax: (08) 8523 2104
Snail: P.O. Box 312
Gawler SA 5118
==============================
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]