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

improved performance #14

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

synarete
Copy link
Collaborator

Doing a full 'smbstatus --json' may be a costly operation on heavily loaded cluster. In particular, retrieving the 'open_files' section may cause 'smbstatus' to hold ctdb lock for long period of time, which in turn may cause performance degradation to real users.

Improve performance by:

  1. Do two distinct calls to 'smbstatus': one for 'tcons' section and one for 'sessions' section.
  2. Avoid redundant calls to 'smbstatus' by havin only two collectors.
  3. Removed metrics which require 'open_files' section.

Doing a full 'smbstatus --json' may be a costly operation on heavily
loaded cluster. In particular, retrieving the 'open_files' section may
cause 'smbstatus' to hold ctdb lock for long period of time, which in
turn may cause performance degradation to real users.

Improve performance by:
1) Do two distinct calls to 'smbstatus': one for 'tcons' section and one
   for 'sessions' section.
2) Avoid redundant calls to 'smbstatus' by havin only two collectors.
3) Removed metrics which require 'open_files' section.

Signed-off-by: Shachar Sharon <[email protected]>
We no longer export metrics with requires parsing 'open_files' output
section of smbstatus. Removed from top-level doc.

Signed-off-by: Shachar Sharon <[email protected]>
@synarete synarete merged commit a8cb431 into samba-in-kubernetes:main Jan 27, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants