Interpreting Supabase Grafana Memory charts #27021
TheOtherBrian1
announced in
Troubleshooting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here are examples of unhealthy memory usage:
The cache in PostgreSQL is important because the database will store frequently accessed data in it for rapid retrieval. If too much active memory is needed, it runs the risk of excessively displacing cache. This will force queries to check disk, which is slow.
Most data in a database is idle, but in cases where there is little available memory or uncached data is rapidly accessed, thrashing can occur.
Even if your database is not showing clear signs of memory strain through Grafana, it may still benefit form having more memory. Ideally, you want queries to hit the cache 99% of the time. You can use the Supabase CLI
inspect db cache hit
command to check your cache hit rate. Alternatively, you can run the query found in the CLI's GitHub repo in the SQL EditorIf the cache hit rate begins to drop below the ideal amount, one should consider taking the following actions:
Optimizing:
Other useful Supabase Grafana guides:
Beta Was this translation helpful? Give feedback.
All reactions