3 ms·
When you say 'cache utilization' are you referring to the postgres working set/cache? How are you measuring that?
by carsongross 14y ago
When you say 'cache utilization' are you referring to the postgres working set/cache? How are you measuring that?
- jaytaylor 14y ago"Cache utilization" refers to the amount of space the database is using in memory compared to the amount of total cache available on the dedicated Heroku database instance (as seen on their pricing page). We are measuring it by issuing a `hr pg:info -asendhug` command which includes a field called "Data Size". e.g.: === HEROKU_POSTGRESQL_GOLD (DATABASE_URL) Plan: Ika Status: available Data Size: 2.00 GB Tables: 76 PG Version: 9.1.4 Fork/Follow: Available Created: 2012-08-16 04:09 UTC Followers: HEROKU_POSTGRESQL_TANGERINE Maintenance: not required As for whether this is the "working set/cache", it is not clear where the "Data Size" number comes from. This is an interesting question, I'll ask Heroku for more information and report back.
- jaytaylor 14y agoHeroku has replied.. > Cache utilization talks about the working set size, yes. > > The database size typically means just the result of > pg_database_size() on your database (you can use the > current_database() function as a shortcut). Note that this > does include dead tuple bloat that is regularly cleaned > up by Postgres autovacuum, so it's more of an estimate than > a hard number.
- carsongross 14y agoRight, but that doesn't give you a good idea of how close your working set is to the max memory cache, unless your entire DB is active. I'll ping them again and ask if they've found a good way to measure this. It seems like this is the most important number to look at when scaling a heroku/postgres project.