N
Neon2y ago
vicious-gold

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
equal-aqua
equal-aqua2y 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?
exotic-emerald
exotic-emerald2y 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...
robust-apricot
robust-apricot2y ago
I change from 0.25 vCPU to 4 CPU. No change. I check you explain analyze and add the neon extension
robust-apricot
robust-apricot2y ago
No description
robust-apricot
robust-apricot2y ago
It seems in this case, the buffer is hit
robust-apricot
robust-apricot2y ago
it seems to improve. Now I have 5% cache hit (I don't change anything)
No description
robust-apricot
robust-apricot2y ago
No description
robust-apricot
robust-apricot2y ago
No description
robust-apricot
robust-apricot2y ago
All the data On Heroku, I was using standard-0 plan for postgres
robust-apricot
robust-apricot2y ago
No description
robust-apricot
robust-apricot2y ago
The Neon LFC stats
exotic-emerald
exotic-emerald2y 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
robust-apricot
robust-apricot2y ago
thanks
fascinating-indigo
fascinating-indigo17mo ago
@NSV I'm having similar performance issues, mind sharing the outcome of your deep dive?
robust-apricot
robust-apricot17mo 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)

Did you find this page helpful?