Rework file random map
authorJens Axboe <axboe@kernel.dk>
Thu, 22 Nov 2012 12:50:29 +0000 (13:50 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 22 Nov 2012 12:50:29 +0000 (13:50 +0100)
commit51ede0b1e9c9b570b942b50b44d0455183a0d5ec
tree1cc069f169869580c8e51b532fac39f122d81c34
parentec5c6b125c1eab992882602158bab54957aa733d
Rework file random map

Fio slows down at the end of a random IO run, when the random
map is used and it gets fuller. This causes slowdowns in
IOPS. This is largely due to the file random map being an
array of bits, and with random access to single bits of the
array at the time, locality is awful. The effect is observable
throughout a run, though, where it gradually gets slower and
slower. It just becomes more apparent at near the end of the
run, where the last 10% are fairly bad. This is even with
doing a bunch of tricks to reduce that cost.

Implement an N-level bitmap, where layer N uses a single bit
to represent 32/64-bits at layer N-1. The number of layers
depends on the number of blocks.

This has slightly higher overhead initially in theory, in
practice it performs about the same. As a bonus, the throughput
remains constant during the run, and even becomes faster
near the end.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile
file.h
filesetup.c
io_ddir.h
io_u.c
lib/bitmap.c [new file with mode: 0644]
lib/bitmap.h [new file with mode: 0644]