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

DAOS-13658 dfuse: Add filesystem query command. #12367

Merged
merged 24 commits into from
Jul 3, 2023

Conversation

ashleypittman
Copy link
Contributor

Use atomics to track number of pool and containers open, as well
as inodes and file handles.

Required-githooks: true

Signed-off-by: Ashley Pittman [email protected]

Use atomics to track number of pool and containers open, as well
as inodes and file handles.

Required-githooks: true

Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@github-actions
Copy link

github-actions bot commented Jun 12, 2023

Bug-tracker data:
Ticket title is 'Add tracking of memory consumption into dfuse.'
Status is 'In Progress'
Labels: 'triaged'
https://daosio.atlassian.net/browse/DAOS-13658

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Test-tag: dfuse
Required-githooks: true
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-12367/8/execution/node/1243/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-12367/8/execution/node/1290/log

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Required-githooks: true

Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
@daosbuild1
Copy link
Collaborator

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
@daosbuild1
Copy link
Collaborator

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Unit Test on EL 8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-12367/16/testReport/

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

type fsDfuseQueryCmd struct {
daosCmd

Path string `long:"path" description:"Path to evict from dfuse" required:"1"`
Copy link
Contributor

Choose a reason for hiding this comment

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

The command is memquery, but this says Path to evict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will update.

Comment on lines +62 to +69
struct dfuse_mem_query {
uint64_t inode_count;
uint64_t fh_count;
uint64_t pool_count;
uint64_t container_count;
ino_t ino;
bool found;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we future-proof ourselves by adding a version to this struct? Just thinking about what would happen if middlware / third-party compiled with this version of the struct, then recompiled a new version of DAOS without recompiling middleware. @mchaarawi I remember we ran into something similar with DFS before. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would be possible to but I think we'd just switch to a new cmd number if we did that, ioctls are integer commands so don't have the same issues as c functions which are resolved by name.

@@ -2563,6 +2563,13 @@ def test_uns_create(self):
print(stbuf)
assert stbuf.st_ino < 100
print(os.listdir(path))
rc = run_daos_cmd(self.conf, ['filesystem', 'memquery', '--path', self.dfuse.dir])
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we support positional?

filesystem memquery <path>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, I'll speak to @tanabarr about how to add that.

@ashleypittman
Copy link
Contributor Author

ashleypittman commented Jun 29, 2023

Here's the help text with the lastest push to this PR.
`
(wolf-63) [08:51] [0] ampittma@wolf-63:~/coral/daos $ daos filesystem memquery --help
Usage:
daos [OPTIONS] filesystem memquery [path]

Application Options:
--debug enable debug output
--verbose enable verbose output (when applicable)
-j, --json enable JSON output

Help Options:
-h, --help Show this help message

[memquery command arguments]
path: DFuse path to query
(wolf-63) [08:53] [0] ampittma@wolf-63:/coral/daos $ daos filesystem memquery
ERROR: daos: the required argument path was not provided
(wolf-63) [08:53] [1] ampittma@wolf-63:~/coral/daos $
`

Required-githooks: true

Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Comment on lines 2566 to 2571
rc = run_daos_cmd(self.conf, ['filesystem', 'memquery', self.dfuse.dir])
print(rc)
assert rc.returncode == 0
rc = run_daos_cmd(self.conf, ['filesystem', 'memquery', self.dfuse.dir], use_json=True)
print(rc)
assert rc.returncode == 0
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd like to see a real test here that actually verifies the collected query stats.

Comment on lines +60 to +63
ATOMIC uint64_t di_inode_count;
ATOMIC uint64_t di_fh_count;
ATOMIC uint64_t di_pool_count;
ATOMIC uint64_t di_container_count;
Copy link
Contributor

@mchaarawi mchaarawi Jun 30, 2023

Choose a reason for hiding this comment

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

i don't think memquery really associate with these counters. a user would think this tool is actually printing memory usage not those counters. so the tool name probably makes more sense to be called stat or probably just query

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-12367/20/execution/node/1271/log

@ashleypittman ashleypittman changed the title DAOS-13658 dfuse: Add counts for number of inodes etc. DAOS-13658 dfuse: Add filesystem query command. Jul 3, 2023
@ashleypittman ashleypittman merged commit 03ef5e9 into master Jul 3, 2023
@ashleypittman ashleypittman deleted the amd/dfuse-desc-tracing branch July 3, 2023 06:52
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)

Signed-off-by: Ashley Pittman <[email protected]>
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)

Features: dfuse

Required-githooks: true

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033
Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)

Features: dfuse

Required-githooks: true

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033
Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)
DAOS-14411 control: Expose dfuse statistics as yaml. (#13876)

Features: dfuse

Required-githooks: true

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033
Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
jolivier23 added a commit that referenced this pull request Apr 29, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)
DAOS-14411 control: Expose dfuse statistics as yaml. (#13876)

Changed base branch to google/2.4 for daos_build test

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033

Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants