I/O-stat module for Samba
Shachar Sharon
ssharon at redhat.com
Wed Apr 2 14:53:16 UTC 2025
The devil is in the details ;)
As far a I can say from reading the profile code, extending it to have
per-share metrics is doable, but far from trivial. I will try to make
a similar POC by extending profile infra so we can compare the two
options.
- Shachar.
On Wed, Apr 2, 2025 at 4:12 PM Ralph Boehme <slow at samba.org> wrote:
>
> Hi Shachar,
>
> please extend the existing profiling metrics or explain why those can't
> be extended to provide the new per-share metrics.
>
> We should have 80% of the code already in place, so unless I see
> convincing arguments I'm opposed to adding another VFS module.
>
> Thanks!
> -slow
>
> On 4/2/25 6:24 AM, Shachar Sharon via samba-technical wrote:
> > Samba over CephFS has been under heavy development recently (here, at
> > RH/IBM) and we reached the point where we would also like to extend
> > Samba's I/O monitoring capabilities: inspect the latency and
> > throughput of every share from within the smbd process itself (per
> > node). Having such run-time metrics, when exported to the storage
> > administrator (via Ceph dashboard), would provide a better overview of
> > cluster smb I/O activity.
> >
> > Samba already has profile capabilities (when enabled) but those
> > counters represent global state instead of (dynamic) per-share state.
> >
> > We would like to propose a new solution which may be useful to other
> > users as well: use Samba's stackable modules capabilities and provide
> > new VFS module ("vfs_iostat.c") which tracks I/O counters per-share
> > (and per-node) using in-memory cache. Those in-memory counters will be
> > flushed periodically into local TDB file and may be consumed and
> > displayed via one of Samba's utilities (e.g. smbstatus or similar).
> >
> > Advantages:
> > 1. Tracking I/O counter per-share dynamically (only for those with
> > iostat in their 'vfs object' stack).
> > 2. Low overhead when writing to TDB file, even when having hundreds of
> > active smb shares (each process/share has its own unique TDB entry).
> > 3. May be extended beyond monitoring (e.g.: rate limits).
> >
> > A basic POC to demonstrate the above ideas can be found at:
> > https://gitlab.com/samba-team/devel/samba/-/commits/synarete/vfs_iostat_poc
> >
> > Comments and ideas are most welcome.
> >
> > - Shachar.
> >
> >
>
More information about the samba-technical
mailing list