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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Disseldorp <ddiss@xxxxxxxxx> writes:
> 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
> ...

That proc file was never meant for machine consumption. Some have tried
(myself included) but obviously it break everytime we update something.

I like having a hierarchy but having multiple files means potential race
conditions when reading everything. Alternatively we could just output
everything we already do in some structured format like JSON or
YAML. There is a precedence for JSON in clock device nodes
(drivers/clk/clk.c).

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux