Cache Hit Rate
Hello,
I'm testing Neon to replace heroku postgres.
Everything is working great, except the buffer hit rate.
On Heroku, I have a 100% hit rate
15 Replies
fair-rose•2y ago
How large is the Neon compute you're using, and how large is the Heroku compute? Do they have the same amount of memory?
Are the indexes etc all applied for sure? What's the performance delta?
genetic-orange•2y ago
Hey, I think this is likely due to Neon's Local File Cache (LFC). That's where you're going to see your actual buffer cache hit ratio. You can learn more about the LFC here:
https://neon.tech/docs/extensions/neon#what-is-the-local-file-cache
You can view the LFC cache hit rate on Monitoring page in the Neon Console, or you can query it as described in the above document.
Neon
The neon extension - Neon Docs
The neon extension provides functions and views designed to gather Neon specific metrics. The neon_stat_file_cache view Views for Neon internal use The neon_stat_file_cache view The neon_stat_file_cac...
spiritual-aqua•2y ago
I change from 0.25 vCPU to 4 CPU. No change.
I check you explain analyze and add the neon extension
spiritual-aqua•2y ago

spiritual-aqua•2y ago
It seems in this case, the buffer is hit
spiritual-aqua•2y ago
it seems to improve. Now I have 5% cache hit (I don't change anything)

spiritual-aqua•2y ago

spiritual-aqua•2y ago

spiritual-aqua•2y ago
All the data
On Heroku, I was using standard-0 plan for postgres
spiritual-aqua•2y ago

spiritual-aqua•2y ago
The Neon LFC stats
genetic-orange•2y ago
I see that you're a paying customer, so you can make use of our Support team, who has access to more data (and expertise in this area) . I'd recommend opening a ticket. They'll sort this out for you. You can create a ticket here: https://console.neon.tech/app/projects?modal=support
spiritual-aqua•2y ago
thanks
mute-gold•2y ago
@NSV I'm having similar performance issues, mind sharing the outcome of your deep dive?
spiritual-aqua•2y ago
The result is that the buffer hit cache represent the file cache not the db cache (it's the neon support who stated that)