# Dynamically estimating and scaling Postgres' working set size

DevFeed: [Dynamically estimating and scaling Postgres' working set size](<https://devfeed.tech/articles/dynamically-estimating-and-scaling-postgres-working-set-size-5217.md>)

Original publisher: [Read original article](<https://neon.com/blog/dynamically-estimating-and-scaling-postgres-working-set-size>)

Author: Em Sharnoff

Published: 2024-09-05T18:21:55Z

Content type: article

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [autoscaling](<https://devfeed.tech/topics/autoscaling.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [benchmarking](<https://devfeed.tech/topics/benchmarking.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [autoscaling](<https://devfeed.tech/tags/autoscaling.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cost](<https://devfeed.tech/tags/cost.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [latency](<https://devfeed.tech/tags/latency.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [scale](<https://devfeed.tech/tags/scale.md>)

## AI overview

Neon describes how it estimates a Postgres workload's working set size and uses that estimate to autoscale compute so the working set can remain in memory. The article explains why this matters for performance and cost, including the impact of network-based cache misses, and introduces HyperLogLog as the probabilistic algorithm used to estimate set cardinality.

## Source excerpt

With the announcement that Neon's autoscaling feature is GA, we wanted to take the opportunity to dive into the implementation of a recent improvement we made: Scaling to match your workload's working set size. This can provide extraordinary speed-ups for real-world workloads, bu...