Skip to main content

Cache Analyses

Metrics used to monitor cache usage and efficiency. Performance is evaluated with data such as cache searches, additions, and memory consumption.

1. Total Cache Search Count (for 1 hour)

sum(increase(cache_gets_total[1h]))

2. Cache Addition Count (for 10 minutes)

sum(increase(cache_puts_total[10m]))

3. Cache Hit Rate (%) (for 5 minutes)

(sum(increase(cache_gets_total[5m])) - sum(increase(apinizer_cache_api_errors_total[5m]))) / sum(increase(cache_gets_total[5m])) * 100

4. Current Number of Entries in Cache

sum(cache_size)

5. Cache Features with Highest Memory Usage

topk(5, sum by (cache) (cache_entry_memory_bytes))

Cache API Analyses

Used to monitor the performance of Cache API requests. The system’s ability to respond is analyzed with data such as API request count and success rate.

1. Total API Request Count (for 1 hour)

sum(increase(apinizer_cache_api_requests_total[1h]))

2. API Success Rate (%) (for 10 minutes)

(sum(increase(apinizer_cache_api_requests_total[10m])) - sum(increase(apinizer_cache_api_errors_total[10m]))) / sum(increase(apinizer_cache_api_requests_total[10m])) * 100

JVM Analyses

Application’s resource consumption and performance are evaluated by monitoring JVM’s memory usage, GC (Garbage Collector) pause durations, and thread count.

1. Memory Usage Percentage

(sum(jvm_memory_used_bytes{application="apinizer-cache"}) * 100) / sum(jvm_memory_max_bytes{application="apinizer-cache"})

2. Garbage Collection Duration (for 5 minutes)

sum(rate(jvm_gc_pause_seconds_sum{application="apinizer-cache"}[5m]))

3. Current Number of Live Threads

sum(jvm_threads_live_threads{application="apinizer-cache"})

System Analyses

General resource usage and performance are monitored with data such as system’s CPU usage, process duration, and number of open file descriptors.

1. CPU Usage of Pods

sum(rate(container_cpu_usage_seconds_total{namespace="apinizer"}[5m])) by (pod) * 100

2. JVM Process Duration (seconds)

sum(process_uptime_seconds)

3. Number of Open File Descriptors

sum(process_files_open_files{application="apinizer-cache"})