Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fio tests to the dm-snapshot test suite #52

Merged
merged 6 commits into from Dec 17, 2018

Conversation

ntsiron
Copy link
Contributor

@ntsiron ntsiron commented Dec 17, 2018

Hello,

This PR adds various fio tests to the dm-snapshot test suite. It also includes some fixes/improvements for the blktrace module.

Increase the buffer size used by blktrace for event extraction to
eliminate dropped events for high IOPS devices like null_blk.

Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Until now we ran blkparse using backticks. This method stores the whole
output of blkparse in memory before we get to process it. This is
inefficient both memory and performance-wise.

Run blkparse with IO.popen so we can process its output incrementally
through a pipe.

In a test, where we processed 4.5G of blktrace traces, this change
reduced Ruby's memory usage from 12G to 3.7G and the test's run time
from 10m19.409s to 5m31.387s.

Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
blkparse() parses the whole blktrace output and generates an events
array with all the relevant events. For large traces this can result in
heavy memory consumption. Moreover, taking into account how Ruby's GC
works, calling blkparse() many times in a row can result in fork()
failing with ENOMEM, because the memory consumed by the events array is
never released back to the system.

Also, there are use cases, e.g. the IOHistogram class, where it's more
efficient to process the blkparse events incrementally rather than
storing them all in memory and then iterating over the events array.

Allow for such an incremental processing by introducing new helper
functions and use these functions in IOHistogram.

In a test, where we processed 4.5G of blktrace traces, this change
reduced Ruby's memory usage from 3.7G to 26M and the test's run time
from 5m31.387s to 4m17.346s.

Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
We are only interested in either Queue or IO completion events so there
is no need to capture all possible events with blktrace.

Filter the events captured by blktrace using an appropriate filter. This
helps reduce the size of blktrace's output and therefore decrease its
processing time with blkparse.

Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Add class whichs records the per CPU IO distribution, i.e., records how
many reads/writes each CPU has queued to the underlying device.

Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Add various fio tests that:

* Measure random read/write throughput, as the number of worker
  processes increases.

* Measure random read/write latency, as the number of worker processes
  increases.

* Measure sequential read/write throughput, as the number of worker
  processes increases.

* Trace the per CPU IO distribution for random and sequential writes, as
  the number of worker processes increases.

Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
@jthornber jthornber merged commit b5ead96 into jthornber:master Dec 17, 2018
@ntsiron ntsiron deleted the feature-snapshot-fio branch December 18, 2018 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants