performance issues
I recently converted a counter application from flatfiles to mysql 4.1.1 and it's considerably reduced my performance. The count.cgi (perl) script gets the referrer information and what not, writes it to a file in /tmp (using a `echo "blah" > /tmp/$$.up` -- I thought this would be the least resource intensive way) , and then a script constantly running and connected to the db inserts the entries and deletes the files (each <200bytes). 'top,' however, shows that it's this count.cgi that's using the most resources, running at 20-50% user per process. I downloaded the sysstats package earlier today, and 'iostat' is showing write sizes of over 100k/sec, in some cases over 500k/sec! Short of the apache log files themselves, and of course the /tmp files, nothing else is being consistently written to the drive.
Any ideas why such a simple cgi script would cause so much CPU usage and/or I/O activity? Any ideas how I can track down these hundreds of kilobytes being written? Any advice at all? :D
Thanks!
Any ideas why such a simple cgi script would cause so much CPU usage and/or I/O activity? Any ideas how I can track down these hundreds of kilobytes being written? Any advice at all? :D
Thanks!
