Skip to content

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
@synarete synarete deleted the ss-improved-perf branch July 20, 2025 10:48
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