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

osdmaptool: add --test-map-pgs mode #1178

Merged
merged 6 commits into from Feb 7, 2014
Merged

osdmaptool: add --test-map-pgs mode #1178

merged 6 commits into from Feb 7, 2014

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Feb 4, 2014

This command will map all pgs from all pools (or just one pool) to osds and
summarize the placement and calculate the actual standard deviation and the
expected value.

Signed-off-by: Sage Weil sage@inktank.com

if (test_random) {
osds.resize(p->second.size);
for (unsigned i=0; i<osds.size(); ++i) {
osds[i] = rand() % osdmap.get_max_osd();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code may generate repeated osd.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's okay. this is just to sanity-check the calculation for expected standard deviation and get a sense for what the min/max spread would be for a truly uniform distribution.

@ukernel
Copy link
Contributor

ukernel commented Feb 5, 2014

looks good

@ghost ghost mentioned this pull request Feb 7, 2014
@@ -3,6 +3,10 @@
usage: [--print] [--createsimple <numosd> [--clobber] [--pg_bits <bitsperosd>]] <mapfilename>
--export-crush <file> write osdmap's crush map to <file>
--import-crush <file> replace osdmap's crush map with <file>
--test-map-pgs map all pgs
--mark-all-up-in mark osds up and in (but do not persist)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/mark-all/mark/

@ghost
Copy link

ghost commented Feb 7, 2014

👍 after the typo is fixed

@ghost
Copy link

ghost commented Feb 7, 2014

Added tests to better understand how it works #1196

Sage Weil and others added 6 commits February 7, 2014 07:10
This command will map all pgs from all pools (or just one pool) to osds
and summarize the placement and calculate the actual standard deviation and
the expected value.

Signed-off-by: Sage Weil <sage@inktank.com>
This useful for comparison purposes and sanity-checking the results.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
liewegas pushed a commit that referenced this pull request Feb 7, 2014
osdmaptool: add --test-map-pgs mode

Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
@liewegas liewegas merged commit 0e9adf7 into master Feb 7, 2014
@liewegas liewegas deleted the wip-osdmaptool branch February 7, 2014 15:12
liewegas pushed a commit that referenced this pull request Dec 14, 2016
smoke: mask out unsupported image features for krbd iozone test

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants