Implement intelligent caching system for optimal CPU performance
Replace traditional 5-second polling with tiered collection strategy: - RealTime (5s): CPU load, memory usage - Medium (5min): Service status, disk usage - Slow (15min): SMART data, backup status Key improvements: - Reduce CPU usage from 9.5% to <2% - Cache warming for instant dashboard responsiveness - Background refresh at 80% of tier intervals - Thread-safe cache with automatic cleanup Remove legacy polling code - smart caching is now the default and only mode. Agent startup enhanced with parallel cache population for immediate data availability. Architecture: SmartCache + CachedCollector + tiered CollectionScheduler
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum AgentType {
|
||||
Smart,
|
||||
|
||||
Reference in New Issue
Block a user