[drupal-devel] More profiling code - the server this time

Mike Gifford mike at openconcept.ca
Thu Aug 11 13:53:41 UTC 2005


Hi folks,

I'm curious to know if there is any code within drupal to help test  
server performance.  I went looking for some generic stuff a while  
back but couldn't find it (does it exist anywhere else that folks are  
aware of).  I ended up writing some code for another CMS to test hard  
drive (read/write), cpu (simple math) and database (insert/update/ 
select) operations so that I could conclusively prove that it was a  
client's server that was the problem (and not the CMS itself).

Before writing the code I had assumed that because the mysql server  
was hosted elsewhere that the problem was most likely due to poor  
bandwidth between those two servers.  Now there was a security  
problem with how this was configured (as the mysql server could be  
accessed directly from anywhere and wasn't tied to any IP),

I was surprised to find out that the problem was more with disk speed  
in peak periods than anything.  At very slow periods the script could  
only go through five cycles of a simple script to write, read and  
update a file before timing out.

This code is set up to log previous queries and provide an average  
speed.  It is also set up to time out after a certain period of time  
and count cycles completed rather than number of seconds.

Web hosting is an odd business with folks offering the moon for next  
to nothing.  Often hosts have to cut a lot of corners to try to meet  
the bottom line.  Just nice to have some way to analyze the ways that  
this can affect the performance of a drupal site.

If there's interest I could port it over to Drupal..  Would need some  
advice though about where it should go though?  I haven't got a  
sandbox yet.  Expect it could just be a stand alone module..

Mike
--
Mike Gifford, OpenConcept Consulting
Free Software for Social Change -> http://www.openconcept.ca
Latest launch Canadian Labour Congress / Congrès du travail du Canada
http://canadianlabour.ca / http://congresdutravail.ca


--
Mike Gifford, OpenConcept Consulting
Free Software for Social Change -> http://www.openconcept.ca
Latest launch Canadian Labour Congress / Congrès du travail du Canada
http://canadianlabour.ca / http://congresdutravail.ca




More information about the drupal-devel mailing list