-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Conversation
if (test_random) { | ||
osds.resize(p->second.size); | ||
for (unsigned i=0; i<osds.size(); ++i) { | ||
osds[i] = rand() % osdmap.get_max_osd(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
looks good |
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/mark-all/mark/
👍 after the typo is fixed |
Added tests to better understand how it works #1196 |
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>
osdmaptool: add --test-map-pgs mode Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Loic Dachary <loic@dachary.org>
smoke: mask out unsupported image features for krbd iozone test Reviewed-by: Jason Dillaman <dillaman@redhat.com>
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