3 ms·
Most programs actually. Compilers, databases, even your browser! I mean, you can argue that they should manage paging out manually, but it's so much easier to u
by guipsp 4y ago
Most programs actually. Compilers, databases, even your browser! I mean, you can argue that they should manage paging out manually, but it's so much easier to use swap and an unmodified program.
- lazide 4y agoNone of those go out of their way to do so, and certainly not databases. Every database tuning documentation I've ever read says avoid swap at all costs. Some just allocate when they need it until it doesn't work (cough Chrome cough), but that is a far, far throw from intentionally allocating more memory than the machine has, and none of them seem to do it to intentionally only work on a small subset at a time, even if de-facto that is what happens. What sort of performance or reliability would you expect anyway from a database that intentionally loaded the entire database into memory first without even caring how much would fit?
- guipsp 4y agoI mean, at this point I feel like you're misinterpreting on purpose. I didn't say it would be faster or more reliable, just easier.
- lazide 4y agoNo? I was providing an example. Every database I’ve ever dealt with has fixed memory limits that get set. Otherwise the database server will OOM even with swap if it doesn’t limit memory consumption and how much it loads, on any machine, with a given large enough database. And the size of the database is up to the user. It’s a fundamental part of the problem. Speed and reliability to some extent are literally core requirements of database servers, so any database software that doesn’t do it is going to have a bad time.