Skip to content

Conversation

@rahulguptajss
Copy link
Contributor

@rahulguptajss rahulguptajss commented Nov 20, 2025

In Memory Cache over time since start

memory
### Poller: vsim1
Collector               |TotalPollTimeMs |AvgApiMs |MaxApiMs |AvgCalcMs |AvgParseMs |AvgPluginMs |AvgInstances |AvgMetrics |Rows |AvgBytesRx |AvgNumCalls
Rest:Lun                |7524            |7376     |7445     |0         |119        |29          |6276         |50274      |14   |2976808    |13
Rest:QosWorkload        |3597            |3569     |3739     |0         |26         |2           |1043         |8579       |14   |330835     |3
Rest:Volume             |16115           |10992    |11265    |0         |217        |4906        |990          |51844      |13   |2698191    |9
Rest:Igroup             |2307            |2292     |2392     |0         |14         |1           |786          |5406       |14   |463472     |2
Rest:Namespace          |10348           |10338    |10806    |0         |10         |0           |324          |4212       |13   |299068     |1
Rest:LIF                |2337            |2326     |2410     |0         |11         |0           |283          |3867       |14   |265379     |2
Rest:QosPolicyFixed     |839             |837      |885      |0         |2          |0           |181          |1267       |14   |49827      |1
Rest:Sensor             |1373            |693      |745      |0         |5          |675         |166          |1562       |14   |64043      |2
Rest:SecurityCert       |3750            |2806     |3031     |0         |10         |934         |164          |1148       |14   |298941     |3
Rest:Qtree              |5441            |5440     |5772     |0         |1          |0           |112          |896        |14   |72894      |2
Rest:EthernetSwitchPort |847             |846      |876      |0         |1          |0           |106          |636        |14   |29183      |1
Rest:NetRoute           |917             |913      |935      |0         |3          |1           |81           |725        |14   |95755      |1
Rest:SVM                |6548            |4150     |4298     |0         |1          |2397        |80           |634        |14   |123581     |13
Rest:SecurityAccount    |7477            |3486     |3779     |0         |1          |3990        |80           |400        |14   |97338      |2
Rest:Vscan              |5135            |4223     |4518     |0         |0          |912         |78           |78         |14   |9806       |2
Rest:SecurityLogin      |759             |759      |791      |0         |0          |0           |78           |233        |14   |11257      |1
Rest:Disk               |1168            |1164     |1293     |0         |4          |0           |69           |1315       |14   |66002      |2
Rest:ClusterSchedule    |820             |820      |853      |0         |0          |0           |36           |216        |14   |12291      |1
Rest:SnapshotPolicy     |743             |743      |796      |0         |0          |0           |28           |183        |14   |22839      |1
Rest:NetPort            |1298            |1297     |1545     |0         |1          |0           |18           |248        |14   |10734      |3
Rest:SnapMirrorPolicy   |676             |676      |710      |0         |0          |0           |17           |87         |14   |4641       |1
Rest:Subsystem          |3862            |3862     |3921     |0         |0          |0           |15           |60         |14   |2143       |1
Rest:FRU                |669             |669      |722      |0         |0          |0           |10           |50         |14   |1790       |1
Rest:Aggregate          |1756            |1065     |1095     |0         |1          |690         |5            |163        |14   |12089      |3
Rest:QosPolicyAdaptive  |836             |836      |892      |0         |0          |0           |3            |27         |14   |1185       |1
Rest:Node               |1684            |1684     |2061     |0         |0          |0           |2            |44         |14   |10762      |2
Rest:Shelf              |920             |920      |970      |0         |0          |0           |2            |20         |14   |985        |2
Rest:Support            |655             |655      |686      |0         |0          |0           |1            |3          |14   |68         |1
Rest:SupportAutoUpdate  |673             |673      |723      |0         |0          |0           |1            |1          |14   |22         |1
Rest:Status             |677             |677      |711      |0         |0          |0           |1            |1          |14   |20         |1
Rest:ClusterSoftware    |853             |853      |1408     |0         |0          |0           |1            |0          |14   |3          |1
Rest:EmsDestination     |766             |766      |791      |0         |0          |0           |1            |5          |14   |268        |1
Rest:Security           |662             |662      |694      |0         |0          |0           |1            |3          |14   |127        |1
Rest:ClusterPeer        |676             |676      |703      |0         |0          |0           |1            |3          |14   |211        |1
Rest:SecuritySsh        |658             |658      |690      |0         |0          |0           |1            |3          |14   |322        |1
Rest:NtpServer          |639             |639      |678      |0         |0          |0           |1            |2          |14   |125        |1
Rest:Health             |7847            |649      |682      |0         |0          |7198        |1            |2          |14   |24703      |14
Rest:MetroclusterCheck  |10908           |10907    |11133    |0         |0          |1           |1            |4          |13   |18631      |1

Disk Cache over time since start

disk

### Poller: vsim1
Collector               |TotalPollTimeMs |AvgApiMs |MaxApiMs |AvgCalcMs |AvgParseMs |AvgPluginMs |AvgInstances |AvgMetrics |Rows |AvgBytesRx |AvgNumCalls
Rest:Lun                |7483            |7332     |8297     |0         |127        |24          |6276         |50274      |14   |2976808    |13
Rest:QosWorkload        |3611            |3584     |3764     |0         |26         |1           |1043         |8579       |14   |330835     |3
Rest:Volume             |16478           |11445    |12298    |0         |215        |4818        |990          |51844      |14   |2697994    |9
Rest:Igroup             |2491            |2476     |2537     |0         |13         |2           |786          |5406       |14   |463472     |2
Rest:Namespace          |10289           |10278    |10789    |0         |11         |0           |324          |4212       |14   |299068     |1
Rest:LIF                |2392            |2383     |2492     |0         |9          |0           |283          |3867       |14   |265379     |2
Rest:QosPolicyFixed     |778             |777      |807      |0         |1          |0           |181          |1267       |14   |49827      |1
Rest:Sensor             |1355            |675      |723      |0         |5          |675         |166          |1562       |14   |64044      |2
Rest:SecurityCert       |3762            |2821     |2892     |0         |10         |931         |164          |1148       |14   |298941     |3
Rest:Qtree              |5594            |5593     |6249     |0         |1          |0           |112          |896        |14   |72894      |2
Rest:EthernetSwitchPort |861             |860      |920      |0         |1          |0           |106          |636        |14   |29183      |1
Rest:NetRoute           |978             |974      |1030     |0         |3          |1           |81           |725        |14   |95755      |1
Rest:SecurityAccount    |7559            |3569     |3888     |0         |0          |3990        |80           |400        |14   |97338      |2
Rest:SVM                |6578            |4217     |4421     |0         |1          |2360        |80           |634        |14   |123581     |13
Rest:Vscan              |5039            |4125     |4364     |0         |0          |914         |78           |78         |14   |9806       |2
Rest:SecurityLogin      |869             |869      |951      |0         |0          |0           |78           |233        |14   |11257      |1
Rest:Disk               |1190            |1186     |1422     |0         |4          |0           |69           |1315       |14   |66002      |2
Rest:ClusterSchedule    |767             |767      |818      |0         |0          |0           |36           |216        |14   |12291      |1
Rest:SnapshotPolicy     |667             |666      |686      |0         |1          |0           |28           |183        |14   |22839      |1
Rest:NetPort            |1247            |1247     |1262     |0         |0          |0           |18           |248        |14   |10734      |3
Rest:SnapMirrorPolicy   |755             |755      |828      |0         |0          |0           |17           |87         |14   |4641       |1
Rest:Subsystem          |3857            |3857     |3905     |0         |0          |0           |15           |60         |14   |2143       |1
Rest:FRU                |666             |666      |695      |0         |0          |0           |10           |50         |14   |1790       |1
Rest:Aggregate          |1814            |1125     |1184     |0         |1          |688         |5            |163        |14   |12087      |3
Rest:QosPolicyAdaptive  |804             |804      |866      |0         |0          |0           |3            |27         |14   |1185       |1
Rest:Node               |1711            |1711     |1865     |0         |0          |0           |2            |44         |14   |10762      |2
Rest:Shelf              |906             |906      |951      |0         |0          |0           |2            |20         |14   |985        |2
Rest:ClusterSoftware    |817             |817      |928      |0         |0          |0           |1            |0          |14   |3          |1
Rest:SupportAutoUpdate  |647             |647      |667      |0         |0          |0           |1            |1          |14   |22         |1
Rest:ClusterPeer        |716             |716      |792      |0         |0          |0           |1            |3          |14   |211        |1
Rest:Status             |696             |696      |774      |0         |0          |0           |1            |1          |14   |20         |1
Rest:EmsDestination     |762             |762      |788      |0         |0          |0           |1            |5          |14   |268        |1
Rest:SecuritySsh        |678             |678      |710      |0         |0          |0           |1            |3          |14   |322        |1
Rest:Health             |7910            |657      |674      |0         |0          |7253        |1            |2          |14   |28954      |14
Rest:NtpServer          |705             |705      |767      |0         |0          |0           |1            |2          |14   |125        |1
Rest:MetroclusterCheck  |10762           |10761    |10953    |0         |0          |1           |1            |4          |14   |18433      |1
Rest:Support            |648             |648      |669      |0         |0          |0           |1            |3          |14   |68         |1
Rest:Security           |673             |673      |707      |0         |0          |0           |1            |3          |14   |127        |1

@cla-bot cla-bot bot added the cla-signed label Nov 20, 2025
@rahulguptajss rahulguptajss linked an issue Nov 20, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a disk-based cache option for the Prometheus exporter to reduce memory overhead in large deployments. The feature allows metrics to be staged on disk rather than stored in memory, with Prometheus reading directly from cached files during scrapes.

Key changes:

  • Added DiskCacheConfig to support configurable disk-based caching with a mandatory path parameter
  • Implemented diskCache type that writes metrics to disk files and streams them during scrapes
  • Introduced cacher interface to abstract memory and disk cache implementations

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/conf/conf.go Added DiskCacheConfig struct and DiskCache field to Exporter configuration
docs/prometheus-exporter.md Added documentation for the new disk_cache configuration parameter with examples
cmd/exporters/prometheus/prometheus_test.go Updated tests to work with the new cacher interface using type assertions
cmd/exporters/prometheus/prometheus.go Integrated disk cache support with conditional cache creation and updated Export logic
cmd/exporters/prometheus/httpd.go Modified HTTP handlers to support both memory and disk cache serving
cmd/exporters/prometheus/disk_cache.go New file implementing disk-based cache with file I/O operations
cmd/exporters/prometheus/cacher.go New file defining cache interfaces for memory and disk implementations
cmd/exporters/prometheus/cache.go Updated memory cache to implement new cacher interface

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@Hardikl Hardikl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Should we compare more object loaded vsim or actual cluster for better diff ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disk based cache in Harvest

3 participants