Hacker News new | ask | show | jobs
by eduction 1207 days ago
The best cache is the one built into the database. People seem to forget that the major rdbmses have sophisticated cache strategies of their own and that handing them more RAM (and ensuring they are configured to use it for query or other cache) is usually a good first strategy before trying to second guess and reinvent the cache outside the db.

Thread says SO allocates 1.5TB RAM to SQL Server. Sounds wise.

2 comments

Makes sense. Traditional RDBMSs are basically a buffer cache and a query optimization engine.

If the data is sitting in memory, and you've tuned extracting the data from memory as fast as possible, job done.

Not just a RDBMSs. Any modern DB, document store, or kv store will use a buffer cache.
It's all about the load though. SO is probably 95% Read-Only which makes sense for removing the cache layer. If you had a more writes, then they would need an external cache to offset the read load.
I don’t follow. Holding the total server load constant, why wouldn’t a read-heavy workload benefit more from caching than a more balanced read/write workload?