Parameter Package
Table 1 describes the parameters.
Parameter |
Description |
Input/Output |
Type |
Value Range |
Default Value |
|---|---|---|---|---|---|
detect_points |
Number of source data points to be detected |
Input |
int |
[1, +∞) |
120 |
valid_factor_default |
Default parameter for controlling model sensitivity |
Input |
float |
(0.0, +∞) |
1.0 |
detection_window |
Size of the sliding window for detection |
Input |
int |
[1, +∞) |
5 |
slide_window |
Step of the sliding window |
Input |
int |
[2, total number of drives to be detected] |
5 |
train_model_min |
Minimum radius of the DBSCAN algorithm |
Input |
float |
(0.0, +∞) |
0.3 |
log_file |
Log file path. |
Input |
String |
- |
/var/log/smartmaintainkit.log |
The slow drive detection effect is mainly determined by two indicators.
- Width and step of the sliding windowAll source data is divided into sliding windows, and the value of each sliding window is packed into a test point.
- detection_window specifies the width of the sliding window.
- slide_window specifies the sliding step of the window.
For example, the default parameters are used for invoking the detection interface as follows. However, the latency of drives in the dataset is low, and slow drives cannot be detected.
slow_detect(r'slow_test.data', r'result.data')
In this case, change the value of detection_window to adjust the window. Decrease the value of slide_window to narrow the sliding step.
param = {'detection_window': 4, 'slide_window': 2} slow_detect(r'slow_test.data', r'result.data', param)
- Slow drive detection precision
This metric is determined by the radius of the DBSCAN algorithm, and the radius is determined by valid_factor_default and train_model_min.
valid_factor_default is a factor that is calculated with the value of each detection point to obtain the radius of the DBSCAN algorithm. A larger value of valid_factor_default indicates a larger radius of the DBSCAN algorithm and a lower precision of slow drive detection.
The radius of the DBSCAN algorithm must be greater than 0. Therefore, a minimum value is set to control the radius of the DBSCAN algorithm calculated based on valid_factor_default.
If "WARNING: Model is too low, set model with train_model_min" is displayed in the log, the radius calculated using valid_factor_default is less than the value of train_model_min. In this case, the radius of the DBSCAN algorithm is set to the value of train_model_min.
For example, slow drives cannot be detected when the following default parameters are used due to narrow latency differences between slow drives and normal latency.
slow_detect(r'slow_test.data', r'result.data')
In this case, decrease the value of valid_factor_default.
param = {'valid_factor_default': 0.5} slow_detect(r'slow_test.data', r'result.data', param)
If "WARNING: Model is too low, set model with train_model_min" is displayed in the log, the minimum radius specified by train_model_min is reached. In this case, you can decrease the value of train_model_min to improve detection precision.
param = {'valid_factor_default': 0.5, 'train_model_min': 0.1} slow_detect(r'slow_test.data', r'result.data', param)