Dirty pages, faster writing and fsync
Dirty pages, faster writing and fsync
Posted Mar 27, 2014 9:16 UTC (Thu) by iq-0 (subscriber, #36655)In reply to: Dirty pages, faster writing and fsync by roblucid
Parent article: PostgreSQL pain points
The trick is performing I/O in the background but not saturating the I/O queue (you really want it to be in the background). Efficiency only becomes an issue when there is contention.
So sure you write some stuff that didn't have to be written to disk. And sure it could be done more efficiently later on. But the benefit is that it's no longer dirty in memory and that is our scarce resource in this scenario (as long as I/O is uncontended in that case that becomes the scarce resource).
So sure you write some stuff that didn't have to be written to disk. And sure it could be done more efficiently later on. But the benefit is that it's no longer dirty in memory and that is our scarce resource in this scenario (as long as I/O is uncontended in that case that becomes the scarce resource).
