summaryrefslogtreecommitdiff
path: root/btreplay/btreplay.c
AgeCommit message (Collapse)Author
2009-02-17O_NOATIME isn't always presentJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-05-05Add -x accellerator optionLuis Useche
This patch adds a new functionality to the btreplay tool, the -x option. This parameter accelerate the replication by the factor specified. This means that the stall time is divided by the number introduced. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10Added O_NOATIME to replay fileAlan D. Brunelle
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
2007-10-10Fix segfault in replay_sub when verbose is 1Joshua Root
tip->vfp is only initialised when verbose > 1, so we must only use it under the same circumstance. Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
2007-10-05Converted fatal from macro to inlineAlan D. Brunelle
Hopefully this will fix a gcc-4.2.1 warning. Signed-off-by: Alan D. Brunelle <adb@korik.(none)>
2007-10-02Add btrecord/btreplay capabilityAlan D. Brunelle
These facilities allow one to attempt to replay a stream of IOs captured with blktrace. The general workflow is: 1. Initiate blktrace to capture traces 2. Do whatever to generate initial IO stream... 3. Stop blktrace 4. Run btrecord to convert traces into IO records 5. Run btreplay to replay IOs The IO stream characteristics during replay will try to respect the following characteristics of the original IO stream: 1. The IOs will target the same device(s) as originally seen. [One can alter this behavior by specifyin the -M option to btreplay, which allows one to remap IOs slated to one set of devices to a specified other set of devices.] 2. IO direction: the IOs will follow the same read/write (from-device/to-device) characteristics of the originating flow. [Note: By default replay will /not/ do writes, one must specify the -W option to do this. THis is a meager attempt to stop someone from shooting themselves in the foot (with a very large-caliber weapon).] 3. IO offset & size are maintained. 4. CPU: IOs are submitted on the originating CPU whenever possible. [Note: Since we are using asynchronous IO, IOs may be routed to another CPU prior to being processed by the block IO layer.] In order to try and replicate inter-IO timing as much as possible, btrecord will combine IOs "close in time" into one set, or bunch, of IOs. Then btreplay will replay all the IOs in one go (via asynchronous direct IO - io_submit). The size of the bunches are configurable via the -m flag to btrecord (which specifies the a time-based bunch size) and/or the -M flag (which specifies the maximum amount of IOs to put into a bunch). At the low-end, specifying '-M 1' instructs btrecord to act like fio - replay each IO as an individual unit. Besides the potential to remap devices (utilizing the -M option to replay, as noted above), one can also limit the number of CPUs on the replay machine - so if you have fewer CPUs on the replay machine you specify the -c option to btreplay. Lastly, one can specify the -N option to btreplay to instruct it to ignore inter-IO (inter-bunch of IOs) timings. Thus, this instructs btreplay to replay the bunches as fast as possible, ignoring the original delays between original IOs. The utilities include a write-up in the docs directory. Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>