Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good way to capture/replay sessions from Apache Log?

For performance testing, I would like to capture some traffic from a production server and use that as a basis to replay the request to a test server in order to simulate a realistic load in our development environment. These are all stateless queries, so no issues regarding cookies, sessions, etc.

The Apache log timestamps everything down to a 1 second resolution, but that's not fine enough granularity for our peak times. What's the best way to capture more fine-grained timestamps for replay? And is there some ab-like load generating program that can use this data to replicate load?

like image 358
Mark Harrison Avatar asked Apr 16 '10 21:04

Mark Harrison


1 Answers

Use jmeter.

https://serverfault.com/questions/84041/how-can-i-replay-apache-access-logs-back-at-my-servers-to-do-real-world-load-test

http://jmeter.apache.org/usermanual/component_reference.html#Access_Log_Sampler

As far as granularity with timestamps, you're not going to get better than that. However, you can randomize the time slots within jmeter. Even if your production traffic logs show hits every second, you can tell jmeter to speed that up drastically.

like image 125
Chris Avatar answered Oct 10 '22 01:10

Chris