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

hammer: tools: heavy memory shuffling in rados bench #5810

Merged
2 commits merged into from Nov 9, 2015

Conversation

Abhishekvrshny
Copy link

This function iterates over all bufferlist internal buffers and calls
their invalidate_crc() method. Required for rados bench to work
correctly, because it modifies buffers outside buffer api, invalidating
internal CRC cache in the process - this method clears that cache, so
another call for buffer::get_crc() to return correct checksum.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
(cherry picked from commit 55a6f9e)
Fixes the high CPU usage and corrects rados bench scores on fast SSDs
and ramdisks/memstore.
For bench run on SSD, on Intel(R) Xeon(R) CPU E5-2640 v2 @ 2.00GHz
before this patch, times are:
write: real 5m0.169s, user 2m33.565s, sys 4m39.791s
seq: real 4m28.642s, user 1m35.250s, sys 6m42.948s
rand: real 5m0.258s, user 1m19.656s, sys 6m47.145s

After this patch:
write: real 5m1.162s, user 0m27.788s, sys 3m11.707s
seq: real 5m1.149s, user 2m23.278s, sys 4m14.427s
rand: real 5m1.021s, user 2m30.514s, sys 4m20.347s

Bench run: rados -p ssd bench 300 write|seq|read --no-cleanup

Note the increase in user time cpu on seq/read tests,
along with decreased sys cpu time; this is because there's
additional memcmp() that compares read objects with expected
contents. With less time spent memory juggling, more time is
spent performing more reads per second, increasing memcmp call
count and increasing amount of user cpu time used.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
(cherry picked from commit b894fc7)

Conflicts:
	src/common/obj_bencher.cc
		return -5 was replaced with return r
ghost pushed a commit that referenced this pull request Oct 2, 2015
Reviewed-by: Loic Dachary <ldachary@redhat.com>
ghost pushed a commit that referenced this pull request Oct 3, 2015
Reviewed-by: Loic Dachary <ldachary@redhat.com>
ghost pushed a commit that referenced this pull request Oct 3, 2015
Reviewed-by: Loic Dachary <ldachary@redhat.com>
ghost pushed a commit that referenced this pull request Oct 3, 2015
Reviewed-by: Loic Dachary <ldachary@redhat.com>
ghost pushed a commit that referenced this pull request Oct 7, 2015
Reviewed-by: Loic Dachary <ldachary@redhat.com>
ghost pushed a commit that referenced this pull request Oct 8, 2015
Reviewed-by: Loic Dachary <ldachary@redhat.com>
@ghost
Copy link

ghost commented Nov 4, 2015

@tchaikov does this backport look good to merge ? It passed a run of the hammer rados suite ( see http://tracker.ceph.com/issues/13356#note-11 and for details ).

@tchaikov
Copy link
Contributor

tchaikov commented Nov 5, 2015

@Abhishekvrshny do you want to backport #5152 as well?

@ghost
Copy link

ghost commented Nov 5, 2015

@tchaikov backporting #5152 sound like a good idea. Is there an associated issue or should we create a new one ? Do you think backporting #5152 is a pre-condition to merge this backport ?

@tchaikov
Copy link
Contributor

tchaikov commented Nov 5, 2015

@dachary #5152 was mentioned in http://tracker.ceph.com/issues/12946, but it was not explicitly associated with any issue. i am just concerned that the obj_bencher might report error under some conditions as put by @branch-predictor in the commit message of https://github.com/ceph/ceph/pull/5152/commits . so probably we can merge this pr and keep in mind that we'd better backport #5152 soon. what do you think?

@branch-predictor
Copy link
Contributor

Actually, I made separate issue for backport of #5152 (http://tracker.ceph.com/issues/12947) and the related PR is #5812.

@tchaikov
Copy link
Contributor

tchaikov commented Nov 9, 2015

thanks @branch-predictor ! @dachary lgtm then.

ghost pushed a commit that referenced this pull request Nov 9, 2015
Heavy memory shuffling in rados bench

Reviewed-by: Kefu Chai <kchai@redhat.com>
@ghost ghost merged commit 5e8c9d9 into ceph:hammer Nov 9, 2015
ghost pushed a commit that referenced this pull request Nov 17, 2015
Heavy memory shuffling in rados bench

Reviewed-by: Kefu Chai <kchai@redhat.com>
ghost pushed a commit that referenced this pull request Nov 17, 2015
Heavy memory shuffling in rados bench

Reviewed-by: Kefu Chai <kchai@redhat.com>
ghost pushed a commit that referenced this pull request Nov 17, 2015
Heavy memory shuffling in rados bench

Reviewed-by: Kefu Chai <kchai@redhat.com>
ghost pushed a commit that referenced this pull request Nov 17, 2015
Heavy memory shuffling in rados bench

Reviewed-by: Kefu Chai <kchai@redhat.com>
ghost pushed a commit that referenced this pull request Nov 17, 2015
Heavy memory shuffling in rados bench

Reviewed-by: Kefu Chai <kchai@redhat.com>
@ghost ghost changed the title Heavy memory shuffling in rados bench hammer: tools: heavy memory shuffling in rados bench Feb 18, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants