The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

$ guides / proxysql / proxysql-query-cache-hit-rate-dropped ▌

Operations Guides

ProxySQL query cache hit rate dropped: backend load about to surge

A query cache hit rate drop is a leading indicator. By the time backend CPU spikes or the connection pool saturates, the cache has already stopped absorbing read load.

ProxySQL’s query cache is a TTL-based in-memory result set cache with no invalidation on data change. When it works, it shields backends from repetitive read queries. When it stops, every previously-cached query becomes a real backend query, and backend load increases proportionally to the miss delta.

The hit rate formula: Query_Cache_count_GET_OK / Query_Cache_count_GET. A drop of more than 20 percentage points from your established baseline, with a stable Questions rate, means more queries are reaching backends. Backend overload follows unless the cache recovers or you intervene.

What this means

The query cache sits inside the query processor. When an incoming query matches a rule with cache_ttl > 0, ProxySQL performs a cache lookup keyed by the query text, user, and schema. If a valid, non-expired entry exists, it is returned without touching any backend. If not, the query routes to a backend, and the result set may be stored in cache with the configured TTL.

A hit rate drop means one of two things: fewer queries are eligible for caching (rules or query patterns changed), or eligible queries are not finding cached entries (entries expired, were evicted, or were never stored). The diagnostic goal is to determine which.

Two nuances frame everything that follows:

  1. Absolute hit rate values are meaningless without a workload baseline. A 30% hit rate might be excellent for one workload and terrible for another. What matters is the relative change from steady state.
  2. High Query_Cache_count_GET with near-zero Query_Cache_count_GET_OK is pure lookup overhead with no benefit. The cache is checked on every eligible query but never hits. This adds latency and is worse than having caching disabled entirely.

Common causes

CauseWhat it looks likeFirst thing to check
Cache flush or ProxySQL restartQuery_Cache_Entries drops to near 0, Memory_bytes drops sharply, hit rate climbs back over 30-120 secondsProxySQL_Uptime in stats_mysql_global
TTL expiry stampedeHit rate drops sharply at a predictable interval, single digest dominates backend query ratecache_ttl values on hot query rules, check for identical TTLs across rules
Cache churn (working set too large)Query_Cache_Purged rate high and rising, Memory_bytes at limit, hit rate declining steadilyQuery_Cache_Memory_bytes vs mysql-query_cache_size_MB
cache_ttl accidentally removed or set to 0Query_Cache_count_GET stops growing or drops, no new SET operationsruntime_mysql_query_rules WHERE cache_ttl > 0
Query pattern change from deploymentNew digests appear in top queries, old cached queries no longer arrivestats_mysql_query_digest sorted by count_star DESC, compare against baseline
Prepared statement adoptionGET rate flat, new COM_STMT_EXECUTE patterns in stats_mysql_commands_countersCheck for COM_STMT_PREPARE/COM_STMT_EXECUTE command counts

Quick checks

All commands connect to the ProxySQL admin interface on port 6032. These are read-only SELECT statements and are safe to run at any time.

# 1. Check cache hit rate (raw counters)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT Variable_Name, Variable_Value FROM stats_mysql_global WHERE Variable_Name LIKE 'Query_Cache%';"

# 2. Confirm Questions rate is stable (compare two readings 60s apart)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT Variable_Name, Variable_Value FROM stats_mysql_global WHERE Variable_Name = 'Questions';"

# 3. Check ProxySQL uptime (detect recent restart)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT Variable_Value AS uptime_seconds FROM stats_mysql_global WHERE Variable_Name = 'ProxySQL_Uptime';"

# 4. Check which query rules have cache_ttl enabled
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT rule_id, match_digest, match_pattern, cache_ttl, apply FROM runtime_mysql_query_rules WHERE cache_ttl > 0 ORDER BY rule_id;"

# 5. Check rule ordering around caching rules (apply=1 on a preceding rule stops evaluation)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT rule_id, match_digest, destination_hostgroup, cache_ttl, apply FROM runtime_mysql_query_rules ORDER BY rule_id LIMIT 30;"

# 6. Top 20 queries by frequency (watch for new digests)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT hostgroup, schemaname, digest_text, count_star, sum_time FROM stats_mysql_query_digest ORDER BY count_star DESC LIMIT 20;"

# 7. Check cache configuration variables
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT variable_name, variable_value FROM global_variables WHERE variable_name LIKE 'mysql-query_cache%' OR variable_name LIKE 'mysql-threshold_resultset%';"

# 8. Check per-command execution stats (look for COM_STMT_PREPARE/COM_STMT_EXECUTE)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT Command, Total_cnt, Total_Time_us FROM stats_mysql_commands_counters WHERE Total_cnt > 0 ORDER BY Total_cnt DESC LIMIT 15;"

How to diagnose it

The diagnostic flow narrows from “hit rate dropped” to a specific cause by checking cache contents, eviction rates, and query patterns in sequence.

flowchart TD
    A["Hit rate dropped
20+ pts from baseline"] --> B{"Questions rate
stable?"} B -- "No, dropped" --> C["Traffic changed
not a cache issue"] B -- "Yes" --> D{"Cache_Entries
near zero?"} D -- "Yes" --> E{"Uptime under
120 seconds?"} E -- "Yes" --> F["Cold cache
normal warmup"] E -- "No" --> G["Flush or OOM
check proxysql.log"] D -- "No, entries exist" --> H{"Purge rate
spiking?"} H -- "Yes" --> I["Cache churn
working set too large"] H -- "No" --> J{"New digests in
top queries?"} J -- "Yes" --> K["Query pattern change
from deployment"] J -- "No" --> L["Check cache_ttl
and rule ordering"]

Step through the flow:

  1. Confirm the Questions rate is stable. If Questions dropped alongside the hit rate, the workload itself changed. Look upstream at application traffic or ProxySQL connection acceptance.

  2. Check if Query_Cache_Entries dropped to near zero. If entries disappeared, either ProxySQL restarted (check ProxySQL_Uptime) or the cache was flushed. Check proxysql.log for OOM kills or PROXYSQL FLUSH QUERY CACHE invocations. A cold cache warms in 30-120 seconds.

  3. Check the Query_Cache_Purged rate. If purged entries accumulate rapidly while the cache is at its memory limit (Query_Cache_Memory_bytes near mysql-query_cache_size_MB), the working set exceeds cache capacity. Entries are evicted before reuse. Increase cache size or reduce what you cache.

  4. Check whether cache_ttl was accidentally removed. Query runtime_mysql_query_rules WHERE cache_ttl > 0. If rules that previously had caching no longer appear, the configuration changed. Also check rule ordering: if a new rule with apply=1 was inserted before a caching rule, it terminates evaluation and the caching rule never executes.

  5. Look for new query digests. Sort stats_mysql_query_digest by count_star DESC. If new digests dominate that were absent from your baseline, an application deployment changed query patterns. The new queries may not match any caching rule, or the query text may have changed (added comments, different formatting) producing different cache keys. ProxySQL includes the full query text in the cache key, so a trace comment like /* app=v2 */ makes the same logical query a different cache entry.

  6. Check for prepared statement adoption. The query cache is incompatible with prepared statements. If the application switched to server-side prepared statements (common with ORM updates), those queries bypass the cache. Check stats_mysql_commands_counters for PREPARE and EXECUTE rows; for binary-protocol prepared statements, also check the Stmt_Client_Active_Total and Stmt_Client_Active_Unique gauges in stats_mysql_global.

  7. Correlate with backend pool metrics. Check ConnUsed and ConnFree in stats_mysql_connection_pool. If these are degrading, the backend load surge has started. See ProxySQL ConnPool_get_conn_failure rising for the direct pool-starvation signal.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
Query_Cache_count_GET_OK / Query_Cache_count_GETThe hit rate itself. Directly measures cache effectiveness.Drop of 20+ percentage points from baseline sustained over 5 minutes
Query_Cache_count_GET rateCache lookup volume. If this drops to 0, caching rules stopped matching.Sudden drop or flat when Questions rate is stable
Query_Cache_Purged rateEviction rate. High purge rate with declining hit rate means cache too small.Purge rate approaching SET rate (total churn)
Query_Cache_Memory_bytesCurrent cache memory usage vs configured limit.Approaching mysql-query_cache_size_MB ceiling
Query_Cache_EntriesCurrent cached entry count. Sharp drop indicates flush or restart.Drops to near 0 without a recent restart
Questions rateTotal query throughput. Must be stable for hit rate comparison.Any significant deviation invalidates the baseline comparison
ConnUsed per backendBackend connection utilization. Hit rate drop causes this to rise.Rising proportionally with the miss rate increase
ProxySQL_UptimeProcess uptime. Detects restarts that reset the cache.Recent reset relative to baseline warmup time

Fixes

Cache flush or restart

A cold cache is expected after restart and warms in 30-120 seconds. If restarts are frequent, check proxysql.log and kernel OOM killer logs. If Query_Cache_Memory_bytes was near the system memory limit before restart, reduce mysql-query_cache_size_MB to leave headroom for connection buffers and other ProxySQL subsystems.

TTL expiry stampede

When many entries share the same TTL, they expire simultaneously. The next request for each expired entry hits the backend, creating a synchronized burst.

  • Stagger TTL values. Avoid identical TTLs across rules. If three rules all use cache_ttl=60000, change them to 55000, 60000, and 65000 so they expire at different times.
  • Enable soft TTL refresh. Set mysql-query_cache_soft_ttl_pct to 1–99; values 0 and 100 disable the feature. Introduced in 2.5.0, it starts a backend refresh when an entry reaches the specified percentage of its TTL, the next query for that key goes to the backend, refreshing the entry and resetting the TTL. While that refresh runs, other queries continue using the old entry.
  • Increase TTL for hot queries. If stale reads are acceptable, a longer TTL reduces expiry frequency.

Cache churn (working set too large)

The cache is full but entries are evicted before reuse. Query_Cache_Purged is high and the hit rate is low despite a full cache.

  • Increase mysql-query_cache_size_MB. Default is 256 MB. This is a soft limit, not a hard cap. Ensure the system has memory headroom.
  • Stop caching high-cardinality queries. Queries with UUIDs, timestamps, or other high-variance parameters generate unique cache keys that are rarely reused. Remove cache_ttl from rules matching these patterns.
  • Disable empty result caching. Set mysql-query_cache_stores_empty_result to false if your workload produces many empty result sets that consume cache memory without benefit. The variable exists and defaults to true.
  • Immediate relief. PROXYSQL FLUSH QUERY CACHE; frees all cache memory. The cache rebuilds from scratch. This is disruptive: all cached entries are lost. Use it to break a churn cycle when the cache is stuck evicting faster than it can serve.

cache_ttl accidentally removed or rule reordered

If query rules were changed and caching stopped:

-- Verify the rule has cache_ttl set in runtime
SELECT rule_id, match_digest, cache_ttl, apply
  FROM runtime_mysql_query_rules WHERE rule_id = <ID>;

-- Restore the TTL and load to runtime
UPDATE mysql_query_rules SET cache_ttl = <milliseconds> WHERE rule_id = <ID>;
LOAD MYSQL QUERY RULES TO RUNTIME;
SAVE MYSQL QUERY RULES TO DISK;

Also verify rule ordering. Rules are evaluated in rule_id order. If a rule with apply=1 precedes the caching rule and matches the same queries, the caching rule never executes. Either reorder (lower rule_id for caching) or set apply=0 on the preceding routing rule.

ProxySQL does not associate cached entries with the rule that produced them. Changing cache_ttl changes the TTL used for future cache lookups; it does not perform a rule-specific purge. Existing entries remain until they expire or are evicted. Use PROXYSQL FLUSH QUERY CACHE when you need an immediate cache-wide purge.

Query pattern change from deployment

If the application deployment changed query text, cache keys change. Queries that previously hit now miss because the text differs.

  • Check for added comments. A trace comment like /* traceparent=... */ added by a framework produces a different cache key. ProxySQL does not strip comments before computing the cache key.
  • Add caching rules for new query patterns. If the deployment introduced new queries that should be cached, add rules with appropriate cache_ttl.
  • Reset digest stats to establish a clean baseline. Query stats_mysql_query_digest_reset, but note that reading from this table resets all counters.

Prepared statement adoption

The query cache does not cache prepared statements. This is a documented ProxySQL limitation. If the application switched to server-side prepared statements, those queries bypass the cache.

  • Enable client-side emulation. For PDO-based applications, setting PDO::ATTR_EMULATE_PREPARES = true causes the driver to send text queries instead of using the binary prepared statement protocol, restoring cache eligibility.
  • Accept the loss. If prepared statements are required, the query cache will not help for those queries. Focus backend protection on connection pooling and query optimization.

Prevention

  • Baseline the hit rate. Record the normal hit rate per workload pattern (peak, off-peak, batch). Alert on relative changes, not absolute values.
  • Stagger cache_ttl values. Avoid identical TTLs across multiple rules to prevent synchronized expiry bursts.
  • Monitor purge rate alongside hit rate. A rising Query_Cache_Purged rate with a declining hit rate is the earliest sign that the cache is too small for the working set.
  • Review cache rules after every deployment. Query text changes (added comments, formatting, new queries) silently break cache key matching. Audit stats_mysql_query_rules hit counts before and after deploys.
  • Alert on GET rate collapse. If Query_Cache_count_GET drops to zero while Questions continues, caching rules stopped matching. This is often the first signal of an accidental rule change.
  • Avoid caching high-cardinality queries. Use digest analysis to identify which queries actually benefit from caching.

How Netdata helps

Netdata’s ProxySQL collector surfaces cache metrics at per-second resolution, which matters because hit rate drops can be step functions (cache flush) or gradual declines (churn).

  • Per-second Query_Cache_count_GET_OK and Query_Cache_count_GET rates show the exact moment the hit rate changed, not a minute-late average. Correlate the timing with deployments, restarts, or TTL boundaries.
  • Query_Cache_Purged rate alongside hit rate distinguishes “cache too small” from “cache rules changed.” When purge rate spikes and hit rate drops simultaneously, the cache is churning.
  • Backend pool correlation. ConnUsed, ConnFree, and ConnPool_get_conn_failure on the same dashboard show whether the backend load surge has already begun, so you can act before backends saturate.
  • ML anomaly detection on cache counters catches slow degradation that fixed thresholds miss, such as a gradual purge-rate increase over hours before the hit rate visibly drops.