Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got two Apache webservers that serve thousands of files per second. I want to compare the two webservers to determine who is actually faster in terms of who can serve more files/s.

mod_status with ExtendedStatus On would exactly do this job, but it slows down the machine too much. Needless to say that there are no access logs as well.

What would be an easy way to determine the number of files/requests the apaches are serving?

share|improve this question
add comment

4 Answers

Would it relieve the impact of turning on logging to log to a remote server?

share|improve this answer
add comment

Could you run tcpdump on a machine in front of the webservers? (such as a firewall or proxy server)

share|improve this answer
    
Or a machine connected to the same Ethernet switch, and with port mirroring enabled on the switch (that's what we do for measurement of DNS requests without slowing the DNS server, dnsmezzo.net ). –  bortzmeyer May 25 '09 at 14:26
add comment

If mod_status is not an option, might apachetop be an option? If you cannot run access logs or mod_status you will be quite limited.

share|improve this answer
    
One alternative would be to customize mod_status by myself ;) –  bene May 21 '09 at 20:12
add comment

You can use CustomLog to create a very basic log file which is cheap to update. Eventually you can store it somewhere on NFS to limit i/o to the local drive. If you have sufficient memory and need this statistics for a limited period of time you can put the log in memory. Something like:

LogFormat "%t %f %T" my_log  
CustomLog /some/nfs/mount/point/logs/access_log my_log

Will give you time of the request , filename and the time to honor the request. http://httpd.apache.org/docs/2.0/mod/mod%5Flog%5Fconfig.html#formats

For in-memory logging use a tmpfs mount point:

mount -ttmpfs -odefaults,noatime,size=100M,nr_inodes=5k /some/mount/point
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.