[PATCH][SMB3] display stats counters for number of slow commands

David Disseldorp ddiss at samba.org
Mon Aug 6 11:47:43 UTC 2018


Hi Steve,

On Sat, 4 Aug 2018 05:32:25 -0500, Steve French wrote:

> When CONFIG_CIFS_STATS2 is enabled keep counters for slow
> commands (ie server took longer than 1 second to respond)
> by SMB2/SMB3 command code.  This can help in diagnosing
> whether performance problems are on server (instead of
> client) and which commands are causing the problem.
> 
> Sample output (the new lines contain words "slow responses ...")

Wouldn't putting these alongside the existing per-session op counts be
more suitable, e.g.
1) \\192.168.1.1\rapido-share
...
Creates: 1 total 0 failed 1 slow
Closes: 0 total 0 failed 0 slow
Flushes: 1 total 0 failed 1 slow
Reads: 0 total 0 failed 0 slow

It'd be helpful if this file included some sort of API version, so that
parsers like PCP[1] knew what format to expect. Alternatively, moving
to a configfs style format with one metric per file (similar to LIO)
might be more useful and extensible, e.g.
/sys/kernel/config/cifs/stats/sessions
/sys/kernel/config/cifs/stats/shares
...
/sys/kernel/config/cifs/stats/<session>/smbs
/sys/kernel/config/cifs/stats/<session>/creates/total
/sys/kernel/config/cifs/stats/<session>/creates/failed
/sys/kernel/config/cifs/stats/<session>/creates/slow
/sys/kernel/config/cifs/stats/<session>/reads/total
/sys/kernel/config/cifs/stats/<session>/reads/failed
/sys/kernel/config/cifs/stats/<session>/reads/slow
...

Cheers, David

1. PCP cifs.ko monitoring agent
https://github.com/performancecopilot/pcp/blob/master/src/pmdas/cifs/pmda.c



More information about the samba-technical mailing list