Feature/Performance Counter

From SambaWiki

Overview

Samba's new Performance Counter infrastructure provides PDU based statistics for the Samba file server. Each incoming SMB creates a call to the generalized perfcount framework, from which a backend module can track PDU type, size, latency, and user.

Two backend modules are currently implemented.

Components

Component Description Developer Status
SMBD Infrastructure Implement a dispatch table API which different backends can plug into. tstecher Completed
perfcount_onefs.so A module specific to the OneFS operating system which makes syscalls storing aggregate SMB performance measurements in kernel memory. These statistics are later retrieved via a command line tool. tstecher Completed
perfcount_test.so A simple module which writes packet data out to the samba.log file every 50 operations. tstecher Completed


Implementation

File Server Infrastructure
source3/smbd/perfcount.c
Backend Modules
source3/modules/perfcount_onefs.c
source3/modules/perfcount_test.c

Future Development

  • Implement a more generic Unix backend which logs to a database.
  • Integrate with Holger's SMB Traffic Analyzer backend and CLI tools.
  • Remove deprecated START_PROFILE()/END_PROFILE() subsystem