From d6c69d6c2c711e5f9e8da9356a2e0aa69926dcf4 Mon Sep 17 00:00:00 2001 From: rahulguptajss Date: Tue, 19 Nov 2024 23:03:44 +0530 Subject: [PATCH] feat: add flexcache keyperf template --- cmd/tools/generate/counter.go | 1 + conf/keyperf/9.15.0/flexcache.yaml | 23 ++++++++++++++++++++ conf/keyperf/default.yaml | 1 + conf/keyperf/static_counter_definitions.yaml | 6 +++++ docs/ontap-metrics.md | 11 ++++++---- 5 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 conf/keyperf/9.15.0/flexcache.yaml diff --git a/cmd/tools/generate/counter.go b/cmd/tools/generate/counter.go index b90e2b09d..aa65298e4 100644 --- a/cmd/tools/generate/counter.go +++ b/cmd/tools/generate/counter.go @@ -50,6 +50,7 @@ var ( "svm_cifs": "cifs_service", "svm_nfs": "nfs_service", "lif": "ip_interface", + "flexcache": "volume", } swaggerBytes []byte excludePerfTemplates = map[string]struct{}{ diff --git a/conf/keyperf/9.15.0/flexcache.yaml b/conf/keyperf/9.15.0/flexcache.yaml new file mode 100644 index 000000000..7e99a2bdc --- /dev/null +++ b/conf/keyperf/9.15.0/flexcache.yaml @@ -0,0 +1,23 @@ +name: FlexCache +query: api/storage/volumes +object: flexcache + +counters: + - ^^name => volume + - ^^svm.name => svm + - ^statistics.flexcache_raw.status => status + - statistics.flexcache_raw.cache_miss_blocks => blocks_retrieved_from_origin + - statistics.flexcache_raw.client_requested_blocks => blocks_requested_from_client + - statistics.flexcache_raw.timestamp(timestamp) => timestamp + - filter: + - statistics.flexcache_raw.timestamp=!"-" + +plugins: + - MetricAgent: + compute_metric: + - miss_percent PERCENT blocks_retrieved_from_origin blocks_requested_from_client + +export_options: + instance_keys: + - svm + - volume \ No newline at end of file diff --git a/conf/keyperf/default.yaml b/conf/keyperf/default.yaml index e4b3af63d..8f6a2ac24 100644 --- a/conf/keyperf/default.yaml +++ b/conf/keyperf/default.yaml @@ -9,6 +9,7 @@ objects: Aggregate: aggr.yaml CIFSvserver: cifs_vserver.yaml Cluster: cluster.yaml + FlexCache: flexcache.yaml LIF: lif.yaml NFSv3: nfsv3.yaml NFSv41: nfsv4_1.yaml diff --git a/conf/keyperf/static_counter_definitions.yaml b/conf/keyperf/static_counter_definitions.yaml index a4887c9c5..cbaa8531c 100644 --- a/conf/keyperf/static_counter_definitions.yaml +++ b/conf/keyperf/static_counter_definitions.yaml @@ -5,4 +5,10 @@ objects: type: percent base_counter: statistics.processor_utilization_base - name: statistics.processor_utilization_base + type: delta + flexcache: + counter_definitions: + - name: statistics.flexcache_raw.client_requested_blocks + type: delta + - name: statistics.flexcache_raw.cache_miss_blocks type: delta \ No newline at end of file diff --git a/docs/ontap-metrics.md b/docs/ontap-metrics.md index c491c8340..74a6c0ee2 100644 --- a/docs/ontap-metrics.md +++ b/docs/ontap-metrics.md @@ -7,7 +7,7 @@ These can be generated on demand by running `bin/harvest grafana metrics`. See - More information about ONTAP REST performance counters can be found [here](https://docs.netapp.com/us-en/ontap-pcmap-9121/index.html). ``` -Creation Date : 2024-Nov-15 +Creation Date : 2024-Nov-19 ONTAP Version: 9.15.1 ``` ## Understanding the structure @@ -2898,19 +2898,21 @@ Percentage of blocks overwritten to write-cache among all disk writes. ### flexcache_blocks_requested_from_client -Total number of blocks requested from client +Total blocks requested by the client. | API | Endpoint | Metric | Template | |--------|----------|--------|---------| +| KeyPerf | `api/storage/volumes` | `statistics.flexcache_raw.client_requested_blocks`
Unit:
Type: delta
Base: | conf/keyperf/9.15.0/flexcache.yaml | | ZAPI | `perf-object-get-instances flexcache_per_volume` | `blocks_requested_from_client`
Unit: none
Type: delta
Base: | conf/zapiperf/cdot/9.8.0/flexcache.yaml | ### flexcache_blocks_retrieved_from_origin -Total number of blocks retrieved from origin +Blocks retrieved from origin in case of a cache miss. This can be divided by the raw client_requested_blocks and multiplied by 100 to calculate the cache miss percentage. | API | Endpoint | Metric | Template | |--------|----------|--------|---------| +| KeyPerf | `api/storage/volumes` | `statistics.flexcache_raw.cache_miss_blocks`
Unit:
Type: delta
Base: | conf/keyperf/9.15.0/flexcache.yaml | | ZAPI | `perf-object-get-instances flexcache_per_volume` | `blocks_retrieved_from_origin`
Unit: none
Type: delta
Base: | conf/zapiperf/cdot/9.8.0/flexcache.yaml | @@ -2983,6 +2985,7 @@ This metric represents the percentage of block requests from a client that resul | API | Endpoint | Metric | Template | |--------|----------|--------|---------| +| KeyPerf | `api/storage/volumes` | `blocks_retrieved_from_origin, blocks_requested_from_client`
Unit:
Type:
Base: | conf/keyperf/9.15.0/flexcache.yaml | | ZAPI | `flexcache_per_volume` | `blocks_retrieved_from_origin, blocks_requested_from_client`
Unit:
Type:
Base: | conf/zapiperf/cdot/9.8.0/flexcache.yaml | @@ -3051,7 +3054,7 @@ Total number of reconciled lock entries at cache side. ### flexcache_size -Physical size of the FlexCache. The recommended size for a FlexCache is 10% of the origin volume. The minimum FlexCache constituent size is 1GB. +Physical size of the volume, in bytes. The minimum size for a FlexVol volume is 20MB and the minimum size for a FlexGroup volume is 200MB per constituent. The recommended size for a FlexGroup volume is a minimum of 100GB per constituent. For all volumes, the default size is equal to the minimum size. | API | Endpoint | Metric | Template | |--------|----------|--------|---------|