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

mon: add RAW USED column to ceph df detail #7087

Merged
merged 1 commit into from Jan 15, 2016
Merged

mon: add RAW USED column to ceph df detail #7087

merged 1 commit into from Jan 15, 2016

Conversation

yangruifeng
Copy link
Contributor

add a column 'RAW USED' for ceph df detail
Signed-off-by: Ruifeng Yang yangruifeng.09209@h3c.com

@jecluis
Copy link
Member

jecluis commented Jan 4, 2016

it would be nice to have a test accompanying this patch.

@yangruifeng
Copy link
Contributor Author

@jecluis I'll have a try, thanks.

@yangruifeng
Copy link
Contributor Author

@jecluis done, but, if the global size is too big, running cost of a long time.

@jecluis
Copy link
Member

jecluis commented Jan 5, 2016

@yangruifeng couldn't you just put a file worth a few bytes instead?

@yangruifeng
Copy link
Contributor Author

@jecluis if the file is too small, %USED is 0.

@liewegas
Copy link
Member

Showing the user bytes stored here is a deliberate choice (as is showing hte "max avail" that indicates how many more user bytes can be stored). If we want to show the raw storage consumed for the pool we should put that in a different column...

@liewegas liewegas self-assigned this Jan 11, 2016
@yangruifeng
Copy link
Contributor Author

@liewegas
yes, i found that the %USED is not correct when i want to show a pie chart of USED.
it not notional or raw.
i think that the %USED should be notional-used/notional-pool-total,
and add a different column %RAW USED to show raw-used/raw-total.
what do you think? thanks.

@liewegas
Copy link
Member

liewegas commented Jan 12, 2016 via email

@yangruifeng
Copy link
Contributor Author

@liewegas done.

@@ -1333,7 +1333,7 @@ inline string percentify(const float& a) {
//void PGMonitor::dump_object_stat_sum(stringstream& ss, Formatter *f,
void PGMonitor::dump_object_stat_sum(TextTable &tbl, Formatter *f,
object_stat_sum_t &sum, uint64_t avail,
bool verbose) const
float raw_used_rate, bool verbose) const
{
if (f) {
f->dump_int("kb_used", SHIFT_ROUND_UP(sum.num_bytes, 10));
Copy link
Member

Choose a reason for hiding this comment

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

it should be included in the json output, too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liewegas done.

Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
liewegas added a commit that referenced this pull request Jan 15, 2016
mon: add RAW USED column to ceph df detail

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit b8bc25b into ceph:master Jan 15, 2016
@yangruifeng yangruifeng deleted the wip-yrf-cephdf branch January 15, 2016 05:19
@gregsfortytwo
Copy link
Member

So I've only seen it once, but in http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-tarball-trusty-amd64-basic/log.cgi?log=e5585bc2c93199552e3263394e7c11d33e8f3c40 the test this adds is one of two causing make check to fail.

../qa/workunits/cephtool/test.sh:31: expect_false: test 0 '!=' 8192

It looks like it can race if stuff is veeeery slow which might be what's going on and I presume there are other solutions (one I see from looking quickly is checking several subsequent map epochs).

@gregsfortytwo
Copy link
Member

Although I haven't dug into this so it's vaguely possible the prior rbd test failure somehow mucked things up for this test? Seems unlikely though if I understand what this one is doing.

@yangruifeng
Copy link
Contributor Author

@gregsfortytwo maybe 'sleep 10' is not enough, change to

  #wait for update
  cal_raw_used_size=`ceph df detail | grep cephdf_for_test | awk -F ' ' '{printf "%d\n", 2 * $4}'`
  while [ $cal_raw_used_size -eq 0 ]
  do
    cal_raw_used_size=`ceph df detail | grep cephdf_for_test | awk -F ' ' '{printf "%d\n", 2 * $4}'`
  done

@ghost ghost changed the title mon: make the output of ceph df more reasonable mon: add RAW USED column to ceph df detail Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants