I/O-stat module for Samba

Ralph Boehme slow at samba.org
Wed Apr 2 13:12:41 UTC 2025


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.
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20250402/71bfbf6e/OpenPGP_signature.sig>


More information about the samba-technical mailing list