Instrumentation
The SEF Reference FTL has a unique, built-in instrumentation system that lets the user monitor and change the FTL’s internal properties at runtime. Because the FTL is implemented in user mode, this instrumentation system is the only way to obtain performance metrics for the SEF Unit. The instrumentation system is exposed via a Unix Socket. It was designed with modularity in mind. In other words, individual components of the Reference FTL can register and manage their own communication systems.
Basic Usage
The instrumentation socket is created by default at /tmp/SEFFTLDomain<sef-unit>.<qos-domain>
where <sef-unit>
is the SEF Unit number and <qos-domain>
is the QoS Domain ID. While
the Reference FTL is running, ncat can be used to communicate with instrumentation via Unix
Sockets. The following is a simple invocation to communicate with the SDK running on SEF Unit
0’s QoS Domain ID 2:
$ncat -U --udp /tmp/SEFFTLDomain.0.2
The communication is two-way; the opened socket is treated as an interactive shell. A typical
command for the instrumentation shell is <action> [options]
where <action>
is registered by a
component of the Reference FTL. To view a list of all the registered actions and how to use them,
use the help action. The Instrumentation Actions Table includes
the built-in actions and their individual descriptions.
Instrumentation Actions
Actions | Options | Description |
---|---|---|
cc | [json] | Dump all code coverage data |
dump | [json][reset][info] | Dump all instrumentation counters |
gc | [<low water>] | Show status of and configure garbage collect’s low water value-triggers GC |
gc | [dynamic / static] | Switch from dynamic to static weighting for gc |
getlog | Returns log level | |
setlog | <level Number> | Sets the log level. Possible values are 0 to 5 |
setlog | <level Name> | Sets the log level. Possible values are "trace", "debug", "info", "error", "fatal", "nolog" |
state | [json][info] | Dump all I/O state data or set weight |
help | Prints help |
Counters
One of the built-in actions for the instrumentation system is counters. The built-in counters keep track of various instrumentation data, such as numbers of reads and writes. Similar to the instrumentation system, individual components of the Reference FTL can register counters. The dump and state actions expose counter information. These actions can return data in a JSON format when given the json option. For a detailed list of the registered counters and their descriptions, both actions support an info option. Moreover, dump supports the reset option to reset the counters’ values.
Extending Functionality
Extensibility is one of the main design features of the instrumentation system. The instrumentation can be extended by registering new actions and counters after initializing it. The registered actions are called using their callback functions after the registered keyword is received via the Unix Socket. The registered counters are managed by the instrumentation system; however, an optional update function can be used to update the values when the corresponding action is called.