Project

General

Profile

Feature #55121

cephfs-top: new options to limit and order-by

Added by Jos Collin 8 months ago. Updated about 1 month ago.

Status:
Pending Backport
Priority:
Normal
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
backport_processed
Backport:
quincy, pacific
Reviewed:
Affected Versions:
Component(FS):
cephfs-top
Labels (FS):
task(medium)
Pull request ID:

Description

Based on the suggestion in the BZ [1], create two new options for cephfs-top:

1. Limit the number of clients to be displayed on the terminal, so that the user can judge the limit value based on the terminal zoom-in/font-size. ncurses could display lesser number of clients for a higher zoom-in/font-size on the terminal.
2. An order-by option to display clients in the descending order based on the field selected, preferably top's 'f' like window to select fields. The default order should be 'cap hit'.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2067168


Related issues

Related to CephFS - Feature #55463: cephfs-top: allow users to chose sorting order Duplicate
Copied to CephFS - Backport #57970: quincy: cephfs-top: new options to limit and order-by New
Copied to CephFS - Backport #57971: pacific: cephfs-top: new options to limit and order-by New

History

#1 Updated by Venky Shankar 8 months ago

  • Tracker changed from Bug to Feature
  • Assignee set to Jos Collin
  • Target version set to v18.0.0
  • Backport set to quincy, pacific

#2 Updated by Jos Collin 8 months ago

  • Description updated (diff)

#3 Updated by Jos Collin 5 months ago

  • Status changed from New to Closed

Based on my discussion with Greg, I'm closing this ticket. Because the issue that the customer reported in BZ1 is pagination and the tracker [2] is meant to resolve that issue. As per our discussion, the goal the customer has is to see all the clients and providing the limit option still restricts the number of clients which doesn't really solve the customer's issue.

[2] https://tracker.ceph.com/issues/55197

#4 Updated by Venky Shankar 5 months ago

  • Status changed from Closed to New

Jos Collin wrote:

Based on my discussion with Greg, I'm closing this ticket. Because the issue that the customer reported in BZ1 is pagination and the tracker [2] is meant to resolve that issue. As per our discussion, the goal the customer has is to see all the clients and providing the limit option still restricts the number of clients which doesn't really solve the customer's issue.

[2] https://tracker.ceph.com/issues/55197

I disagree closing this tracker. The use of limit and order-by is to allow the user to list client according to a field (say descending order of cap hit ratio) and limit this by top N (say, 10) clients. Ins't that useful? With pagination, users would be able to scroll and view the entire client list, however, IMO, its useful to provide the user a way to sort and limit based on a particular field.

#5 Updated by Greg Farnum 5 months ago

Can't fs top already change the sort order? I thought that was done in Neeraj's first tranche of improvements.

#6 Updated by Jos Collin 5 months ago

Greg Farnum wrote:

Can't fs top already change the sort order? I thought that was done in Neeraj's first tranche of improvements.

Another thing to notice here:
Before Neeraj's changes (first tranche of improvements), cephfs-top was displaying the clients in the descending order of resource usage. But that order doesn't exist anymore as it displays clients separately for each Filesystem now (say fs groups). That seems deviating from the original goal of having cephfs-top (highest resources usage on top).

As we are implementing top(1) like features for cephfs-top, top(1) always displays processes in the descending order of CPU usage. The 'f' menu in top(1) is just for selecting fields to display (Fields Management). As a result, it doesn't change the sort order in top(1) it's always descending order of CPU usage. So is it worth implementing for cephfs-top?

#7 Updated by Neeraj Pratap Singh 5 months ago

Venky Shankar wrote:

Jos Collin wrote:

Based on my discussion with Greg, I'm closing this ticket. Because the issue that the customer reported in BZ1 is pagination and the tracker [2] is meant to resolve that issue. As per our discussion, the goal the customer has is to see all the clients and providing the limit option still restricts the number of clients which doesn't really solve the customer's issue.

[2] https://tracker.ceph.com/issues/55197

I disagree closing this tracker. The use of limit and order-by is to allow the user to list client according to a field (say descending order of cap hit ratio) and limit this by top N (say, 10) clients. Ins't that useful? With pagination, users would be able to scroll and view the entire client list, however, IMO, its useful to provide the user a way to sort and limit based on a particular field.

I think choosing the field based on which the sorting needs to be done will be taken care of by https://tracker.ceph.com/issues/55463 and desc order can be kept as default.But the order-by can handle if someone wants it to be in another order.

#8 Updated by Neeraj Pratap Singh 5 months ago

Jos Collin wrote:

Greg Farnum wrote:

Can't fs top already change the sort order? I thought that was done in Neeraj's first tranche of improvements.

Another thing to notice here:
Before Neeraj's changes (first tranche of improvements), cephfs-top was displaying the clients in the descending order of resource usage. But that order doesn't exist anymore as it displays clients separately for each Filesystem now (say fs groups). That seems deviating from the original goal of having cephfs-top (highest resources usage on top).

As we are implementing top(1) like features for cephfs-top, top(1) always displays processes in the descending order of CPU usage. The 'f' menu in top(1) is just for selecting fields to display (Fields Management). As a result, it doesn't change the sort order in top(1) it's always descending. So is it worth implementing for cephfs-top?

I don't think cephfs-top was displaying the clients in the descending order of resource usage.Venky mentioned the client connection order,see the description of https://tracker.ceph.com/issues/55463

#9 Updated by Jos Collin 5 months ago

Neeraj Pratap Singh wrote:

Jos Collin wrote:

Greg Farnum wrote:

Can't fs top already change the sort order? I thought that was done in Neeraj's first tranche of improvements.

Another thing to notice here:
Before Neeraj's changes (first tranche of improvements), cephfs-top was displaying the clients in the descending order of resource usage. But that order doesn't exist anymore as it displays clients separately for each Filesystem now (say fs groups). That seems deviating from the original goal of having cephfs-top (highest resources usage on top).

As we are implementing top(1) like features for cephfs-top, top(1) always displays processes in the descending order of CPU usage. The 'f' menu in top(1) is just for selecting fields to display (Fields Management). As a result, it doesn't change the sort order in top(1) it's always descending. So is it worth implementing for cephfs-top?

I don't think cephfs-top was displaying the clients in the descending order of resource usage.Venky mentioned the client connection order,see the description of https://tracker.ceph.com/issues/55463

There is no point in having a cephfs-top tool, if it doesn't display the top clients. As per top(1) it should be a constant field say wsp(MB/s), IMO. Then if Fields Management is there, then the user can add/remove fields. Still the Fields Management doesn't make sense for lesser number of fields that cephfs-top has (only 20 fields, which the screen accommodates mostly).

#10 Updated by Venky Shankar 5 months ago

Having a `sort-by-field` option is handy for the point I mentioned in https://tracker.ceph.com/issues/55121#note-4. The `limit` functionality is kind of closely tied with `sort-by` (using `limit` without `sort-by` does not really makes sense).

#11 Updated by Venky Shankar 5 months ago

  • Related to Feature #55463: cephfs-top: allow users to chose sorting order added

#12 Updated by Jos Collin 4 months ago

Jos Collin wrote:

Greg Farnum wrote:

Can't fs top already change the sort order? I thought that was done in Neeraj's first tranche of improvements.

Another thing to notice here:
Before Neeraj's changes (first tranche of improvements), cephfs-top was displaying the clients in the descending order of resource usage. But that order doesn't exist anymore as it displays clients separately for each Filesystem now (say fs groups). That seems deviating from the original goal of having cephfs-top (highest resources usage on top).

As we are implementing top(1) like features for cephfs-top, top(1) always displays processes in the descending order of CPU usage. The 'f' menu in top(1) is just for selecting fields to display (Fields Management). As a result, it doesn't change the sort order in top(1) it's always descending order of CPU usage. So is it worth implementing for cephfs-top?

My understanding was wrong here. There is an 's' command to reset the default sort field.

#13 Updated by Venky Shankar 3 months ago

  • Assignee changed from Jos Collin to Neeraj Pratap Singh

Neeraj is working on this.

#14 Updated by Neeraj Pratap Singh 3 months ago

  • Pull request ID set to 48111

#15 Updated by Neeraj Pratap Singh 3 months ago

  • Status changed from New to Fix Under Review

#16 Updated by Jos Collin about 1 month ago

  • Status changed from Fix Under Review to Pending Backport

#17 Updated by Backport Bot about 1 month ago

  • Copied to Backport #57970: quincy: cephfs-top: new options to limit and order-by added

#18 Updated by Backport Bot about 1 month ago

  • Copied to Backport #57971: pacific: cephfs-top: new options to limit and order-by added

#19 Updated by Backport Bot about 1 month ago

  • Tags set to backport_processed

Also available in: Atom PDF