Conversation
|
jenkins retest this please |
168693b to
dca9aa4
Compare
dca9aa4 to
cb5ebd4
Compare
|
jenkins test make check |
|
jenkins test make check arm64 |
|
I did a sample run with this change ported to squid branch for some downstream stuff. Here is the test run: https://pulpito.ceph.com/vshankar-2025-04-12_17:18:59-fs-wip-perf-dump-squid-2-testing-default-smithi/ |
|
Oh, btw, we need to bump up the libcephfs version since a new API has been added. |
We're not very rigorous about this historically. I think as long as it's a new API/ABI that doesn't affect existing functions then there is probably no need. |
batrick
left a comment
There was a problem hiding this comment.
I don't see a ticket associated with this work. Who is the intended user?
I'm a little curious why not just wire up cct->get_admin_socket()->execute_command() (sync or async) to send commands to itself. Then the caller can just use whatever json library to parse it.
mattbenjamin
left a comment
There was a problem hiding this comment.
does this change update the api version?
This is what's being asked: "Right now, the only way to get performance data out of a client is with the admin socket. If that's not the right interface for whatever reason, you're out of luck.
I did that initially from Client.cc (or rather, invoke the relevant perf counter API) and handing the JSON back to the caller as JSON (or as std::string) seemed a bit off-putting to me. JSON is totally fine, but here I sticked to look-and-fell of other libcephfs APIs. |
|
I will create a tracker and include details there. @batrick |
batrick
left a comment
There was a problem hiding this comment.
I'm a little curious why not just wire up
cct->get_admin_socket()->execute_command()(sync or async) to send commands to itself. Then the caller can just use whatever json library to parse it.I did that initially from Client.cc (or rather, invoke the relevant perf counter API) and handing the JSON back to the caller as JSON (or as std::string) seemed a bit off-putting to me. JSON is totally fine, but here I sticked to look-and-fell of other libcephfs APIs.
libcephfs also exports an mds_command/mds_command2 function which generally will return json as well (which is fine because the mgr is the main user and has json libraries). So I think think there is a case for consistency there. The gap was only that we had no method to send commands to Client itself.
I'd rather not have us try to export perf counters as raw types if we can avoid it. However if it's too troublesome for Ganesha to parse then this is okay with me.
| plb.add_time(l_c_wr_avg, "writeavg", "Average latency for processing write requests"); | ||
| plb.add_u64(l_c_wr_sqsum, "writesqsum", "Sum of squares ((to calculate variability/stdev) for write requests"); | ||
| plb.add_u64(l_c_wr_ops, "rdops", "Total write IO operations"); | ||
| plb.add_u64(l_c_wr_ops, "wrops", "Total write IO operations"); |
|
@vshankar I've been thinking about this a lot and I agree with @batrick -- we should just return a json dump a la There's a few reasons:
I agree the big json dump feels icky, but unless it was a lot of complexity with locking somehow it just seems a lot simpler to implement and maintain as a stable interface. Can you post that one? |
OK, I'm fine with the above. The requirements were terse and its was unclear (and IMO, its still unclear) if the caller is fine with parsing JSON. I will not throw away this branch altogether though in case there is future requirement for it. Will post an update for returning json string. |
cb5ebd4 to
f4d64f4
Compare
|
@gregsfortytwo @batrick - fixed and updated. |
|
I've used admin socket's execute_command() to fetch the perf dump json and return the json string for parsing (basic tests have been added for verifying the json string). |
f4d64f4 to
5808c38
Compare
|
@batrick PTAL. |
|
jenkins test api |
|
This PR is under test in https://tracker.ceph.com/issues/71260. |
It collides with total read operations ("rdops") and thereby
not getting reported in perf dump.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Fixes: http://tracker.ceph.com/issues/71233 Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
5808c38 to
48446ab
Compare
|
Updated to run |
Suite run looks good. This will be merged soon. |
This refactor is done so as to be able to fetch the perf counters
via client APIs (say, libcephfs). The current mechanism of exporting
perf counters is via formatters (JSON, etc..) makes it a little
weird to expose the perf counters via a library API. This change
adds a mechanism to get perf counters by type packed in a struct.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition