Hi,

First of all, you all are doing a great job on php :) You make my life as a
webdeveloper a hell of a lot easyer!

And now some questions I dont know shit about...

I'm writing some background scripts in php. A little she-bang to php and my
sysadmin tasks become a lot easyer and automated with the use of php code.
The last week I even tried to fork my code into a nice daemon process. This
all worked nicely but i still have some questions... (please thread-em-up if
you like):

I use a old Pentium 200 box to develop...

Linux leffe 2.2.19 #1 Wed Apr 25 11:10:27 CEST 2001 i586 unknown
model name      : Pentium MMX
cpu MHz         : 199.741
bogomips        : 398.95

             total       used       free     shared    buffers     cached
Mem:         63028      49928      13100      23740       3056      26088
-/+ buffers/cache:      20784      42244
Swap:       136512     103388      33124

I run mysql, apache (compiled in php), postfix and php as cgi for scripting
on the box. In a idle state (98% of the time, even when im developing) the
box has a load of .05 average... no real harm here...

When i try to do ugly things in php the problems emerge:

* after i fork my code with pcntl-fork the load goes up to 3 to 8... i dont
think this is normal for a non-busy machine... after about 5 seconds the
load will drop below 1 and eventualy return to normal with the daemonised
php app still running...

* when i strace my php scripts i see that a lot of time is consumed reading
mibs files for snmp... if i dont use snmp functions in my code, why are
those files read?

* for a php daemon which i want to have running 24x7 i made a 'reload'
function which includes a file with strings which i use to generate 'lambda'
style dynamic functions... when i want to reload my (updated) functions i
only have to send a signal to my daemon and the file is included again, and
a predefined list of variable functions is refeshed by generating new lambda
functions. the real problem here is: i cant unset a lambda function so every
refresh the memory usage of the daemon increses... can you fix this? :P

i know php is not the most superb language to do the things i want to do and
especialy not the fastest... but i hate programming a unforgiving language
as C(++) or a messy language as perl... :)

tnx for any reply and if none i still can live with the fact i abuse php for
more that it is build for

with kind regards,
Joffrey van Wageningen

--
.-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]--------------
| Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue
| PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863
| * We demand guaranteed rigidly defined areas of doubt and uncertainty.
|                                                       -- Douglas Adams


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to