1

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?

4 Answers 4

1

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

1

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

1
  • 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, 2009 at 14:26
0

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.

1
  • One alternative would be to customize mod_status by myself ;)
    – bene
    May 21, 2009 at 20:12
0

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_log_config.html#formats

For in-memory logging use a tmpfs mount point:

mount -ttmpfs -odefaults,noatime,size=100M,nr_inodes=5k /some/mount/point 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .