Template Version: @(#)sac_nextcase 1.70 03/30/10 SMI
This information is Copyright (c) 2010, Oracle and/or its
affiliates. All rights reserved.
1. Introduction
1.1. Project/Component Working Name:
SMB/CIFS Statistics
1.2. Name of Document Author/Supplier:
Author: Jose Borrego
1.3 Date of This Document:
07 April, 2010
1.4. Name of Major Document Customer(s)/Consumer(s):
PSARC
CIFS team
1.5. Email Aliases:
1.5.1. Responsible Manager: barry.greenb...@sun.com
1.5.2. Responsible Engineer: jose.borr...@sun.com
1.5.3. Marketing Manager:
1.5.4. Interest List: cifs-t...@sun.com
4. Technical Description:
Executive Summary:
This case improves the statistics the SMB/CIFS server maintains
as well as
the output of smbstat.
Problem:
Currently the only statistics the SMB/CIFS server maintains are
counters
keeping track of how many requests of each type were received,
the number
of open files, the number of sessions (users logged in) and the
number of
connections (trees connected). Those statistics are not enough
to describe
the load being applied as well as how the server is responding
to it.
Solution:
In order to get a better picture of the state of the SMB/CIFS
server the
following information can be maintained and provided through
smbstat:
- Counters:
* nbt:
Number of SMB NetBIOS-over-TCP (NBT) sessions.
* tcp:
Number of SMB TCP sessions.
* users:
Number of users logged in.
* trees:
Number of trees connected.
* files:
Number of open files.
* pipes:
Number of open pipes.
- Throughput:
* rbytes/s:
Number of bytes received per second.
* tbytes/s:
Number of bytes transmitted per second.
* reqs/s:
Number of requests handled per second.
* reads/s:
Number of read requests per second. This would be an
aggregation of
the following requests:SMB_COM_READ, SMB_COM_LOCK_AND_READ,
SMB_COM_READ_RAW and SMB_COM_READ_ANDX.
* writes/s:
Number of write requests per second. This would ba an
aggregation of
the following requests: SMB_COM_WRITE,
SMB_COM_WRITE_AND_UNLOCK,
SMB_COM_WRITE_RAW and SMB_COM_WRITE_AND_CLOSE.
- Utilization:
* wcnt:
Average number of requests received but waiting for an SMB
worker
thread to execute them.
* rcnt:
Average number of requests being simultaneously executed by
an SMB
worker thread.
* wtime:
Average time a request waits before an SMB worker thread starts
executing it.
* rtime:
Average execution time of a request.
* w%:
Percentage of the time during which at least one request was
waiting.
* r%:
Percentage of the time during which at least one request was
being
executed.
* u%:
Percentage of utilization of the SMB/CIFS server. This
number is
defined as: rcnt / (Max Worker Threads).
* sat:
Flag indicating if the server saturated in the past.
Saturation is
defined as: u% == 100%.
* usr%:
Percentage of the time the processor(s) spent in user space.
* sys%:
Percentage of the time the processor(s) spent in kernel space.
* idle%:
Percentage of the time the processor(s) was(were) idle.
- Requests:
For each type of request:
* %:
Percentage of that type of request.
* rbytes/s:
Number of bytes received per second.
* tbytes/s:
Number of bytes received per second.
* req/s:
Number of requests handled per second.
* rt-mean:
Average response time in seconds.
* rt-stddev:
Standard deviation of the response time.
To access this information the CLI smbstat must be modified and
allow the
following options:
-r Display the statistics of the requests.
-a Display the statistics of all the types of request (the
256 of
them) whether they are valid or not.
-n Display in alphabetic order.
-z Display the statistics of the requests actually received.
-t Display the throughput of the SMB/CIFS server.
-u Display the utilization of the SMB/CIFS server.
-c Display the counters.
A number can also be provided indicating the interval of time
between
refreshes. The first statistics displayed cover the time
between when
the server was started and the moment the statistics were
requested.
Subsequent refreshes cover the last time interval only.
It should be noted that the output is all new replacing the old
one and
is for humans only.
Examples of smbstat output:
'smbstat -ctu'
nbt tcp users trees files pipes
0 1 1 2 20 0
rbytes/s tbytes/s reqs/s reads/s writes/s
1.036e+02 1.298e+00 0.000e+00 0.000e+00 0.000e+00
wcnt rcnt wtime rtime w% r% u% sat
usr% sys% idle%
4.317e-01 7.410e+00 2.461e-05 4.224e-04 31 100 0
no 0 76 24
'smbstat -r'
code % rbytes/s tbytes/s
req/s rt-mean rt-stddev
SmbCreateDirectory 00 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbDeleteDirectory 01 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbOpen 02 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbCreate 03 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbClose 04 0 0.000e+00 0.000e+00
0.000e+00 2.496e-04 8.003e-06
SmbFlush 05 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbDelete 06 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbRename 07 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbQueryInformation 08 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbSetInformation 09 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbRead 0A 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbWrite 0B 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbLockByteRange 0C 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbUnlockByteRange 0D 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbCreateTemporary 0E 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbCreateNew 0F 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbCheckDirectory 10 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbProcessExit 11 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbSeek 12 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbLockAndRead 13 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbWriteAndUnlock 14 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbReadRaw 1A 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbWriteRaw 1D 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbSetInformation2 22 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbQueryInformation2 23 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbLockingX 24 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbTransaction 25 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbTransactionSecondary 26 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbIoctl 27 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbEcho 2B 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbWriteAndClose 2C 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbOpenX 2D 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbReadX 2E 0 0.000e+00 0.000e+00
0.000e+00 3.550e-04 1.856e-05
SmbWriteX 2F 100 4.607e+02 1.675e+00
0.000e+00 3.893e-04 2.691e-07
SmbCloseAndTreeDisconnect 31 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbTransaction2 32 0 0.000e+00 0.000e+00
0.000e+00 5.203e-04 8.612e-06
SmbTransaction2Secondary 33 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbFindClose2 34 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbTreeConnect 70 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbTreeDisconnect 71 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbNegotiate 72 0 0.000e+00 0.000e+00
0.000e+00 4.625e-05 0.000e+00
SmbSessionSetupX 73 0 0.000e+00 0.000e+00
0.000e+00 1.145e-01 0.000e+00
SmbLogoffX 74 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbTreeConnectX 75 0 0.000e+00 0.000e+00
0.000e+00 5.851e-04 2.436e-05
SmbQueryInformationDisk 80 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbSearch 81 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbFind 82 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbFindUnique 83 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbFindClose 84 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbNtTransact A0 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbNtTransactSecondary A1 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbNtCreateX A2 0 0.000e+00 0.000e+00
0.000e+00 5.154e-02 2.063e-03
SmbNtCancel A4 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbNtRename A5 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbOpenPrintFile C0 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbWritePrintFile C1 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbClosePrintFile C2 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
SmbGetPrintQueue C3 0 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00
'smbstat -rz'
code % rbytes/s tbytes/s
req/s rt-mean rt-stddev
SmbClose 04 0 0.000e+00 0.000e+00
0.000e+00 2.445e-04 5.906e-06
SmbReadX 2E 4 0.000e+00 2.772e+01
0.000e+00 1.556e-03 7.878e-06
SmbWriteX 2F 96 7.162e+02 2.604e+00
0.000e+00 5.365e-04 3.913e-07
SmbTransaction2 32 0 0.000e+00 0.000e+00
0.000e+00 5.203e-04 8.612e-06
SmbNegotiate 72 0 0.000e+00 0.000e+00
0.000e+00 4.625e-05 0.000e+00
SmbSessionSetupX 73 0 0.000e+00 0.000e+00
0.000e+00 1.145e-01 0.000e+00
SmbTreeConnectX 75 0 0.000e+00 0.000e+00
0.000e+00 5.851e-04 2.436e-05
SmbNtCreateX A2 0 0.000e+00 0.000e+00
0.000e+00 7.250e-02 2.304e-03
6. Resources and Schedule
6.4. Steering Committee requested information
6.4.1. Consolidation C-team Name:
ON
6.5. ARC review type: FastTrack
6.6. ARC Exposure: open