I’m looking for a free lamp tool to follow up the high customer process.
I mean, I’d like to know who on the server is consuming a lot of CPU/MEMORY
Some customers have bad php or cgi programs and I’d like to know which customer and which process are higher consumer.
For example sometimes I may see in nodeworx a cpu near 100 and an average between 50-70. But the loadaverage has an average under 1 and sometimes has pick up to 10.
When it goes up to 10 I’d like to knwo who (process and account) is doing that.
Do you know a tool for this ? do I have to pgm my own tool ?
If the php script is running through apache on the non-iworx part of your system you will simply see that it’s the apache user who is causing the problems. If it’s a php script run by iworx-cp it could either be the iworx user or root as iworx-cp does run some procs as root for obvious reasons. Setting up process accounting will get you the general info you need pascal and if it’s iworx then it may be the cron jobs so at least you can narrow it down ot the time of day the problems occur and work from there.
If I understand well, if I’d like to use it I have to compile Apache with the Perchild MPM. (not worker or prefork).
The pbm with perchild is he starting every virtual host in a separate instance, which is wasting memory*, right ?
Also the fact is that you need to run at least 1 process for each vhost, with a “normal” MPM like worker og prefork there will default be spawned 5 servers, using the same amount with the perchild MPM and hosting 2000 vhosts you would have 10000 process running just starting the server furthermore you need 2 * 2000 lines you userid assignment. *
About PHP there is maybe another solution with “mod_fastcgi” and php compiled with “FastCGI” mode enabled (in PLD you have apache-mod_fastcgi and php-fcgi packages with that).
but I don’t know a lot of thing about his last solution.
Ok, every comments of interworx-cp users, staff, about how to tweaks, securise and perform performance auditing with Apache, php and Mysql are welcome !!!
Anybody has already setup perchild (advantages/incovenients), FastCGI ?
This is one of my biggest gripes… Hard to pinpoint the problem when the loads are overboard, who is the cause. I wish linux had better tools for this that scoring through the logs. Most of the time i just restart the service that causing the loads, but I rarely can figure out who and where I can prevent the problem from happening.
For me the process whom takes the most loadaverage is mysqld/iworx-db and/or Php.
I have a 3.00Ghz box with 2GB ram memory.
My CPU never goes after the 35% cpu use line, and my swap is no more used, but sometimes I have a load average up to 5-7. When I look at top, I see that it occurs only with MySQLd and PHP.
A solution could be to read all the customers php logs which is not a realistic solution as I have more than 50 customers on this box.
Tweaks and enable traces or accounting process for php/mysql and Apache seems to be the only realistic solution.
Maybe some of us, could have more informations about this. I’m OK to perform some test as soon as I’d get a new box.
My CPu never goes over 40%, my free memory is 1GB ram (/2GB with 0 swap) but as soon as there is :
1-2 mysqld +
1-2 mysql-safe +/or
1-2 iworx-web or iworw-db
my load average jump up to 5 and the perfomance of my box become very bad.
About your compress/crypt tool (lol don’t remember the name just now, not zend but the other one), do you reload it at every pages load or only one time ?
Do you have any idea why with only 6 processes running : 1 mysql + 2 mysql-safe + 1 iwork-db + 1 iworx-web + 1 httpd : my sever jump to a loadaverage = 5-7 and become very very slow ???
It could be a few things Pascal but from the sounds it’s possibly a I/O and/or disk problem. We’ve had a few boxes that even after tweaking with hdparm have had huge increases in responsiveness.
Try a:
hdparm -Tt /dev/hda
Where /dev/hda is the first IDE disk (change to match your config if you’re running RAID or SCSI disks).
I’ve done a lot of test and every thing seems to be ok.
Sql, network trace route, …
And even if my loadavergae is under one some times web pages take 5-6 seconds to show (before it was not) and some time I even get a time out (loadaverage 0.4 , cpu 30%) !!!
Thanks Chris for your help, I really apreciate it.
Pascal