O_STREAMING - flag for optimal streaming I/O
Quoted 11 lines · Mike Fedyk
Quoted 5 lines · Giuliano Pochini
Thing again about to backup a large database. I don't want to use tar because it kills the caches. I would like a way to read the db so that the cached part of the db (the 20% which gets 80% of accesses) is not expunged.
Unless you are pausing the database (causing the files on disk to be in a useful state) and then reading the file you will have trouble. Anything else will have to syncronize with the database itself, and thus can't use
O_STREAMING.
Pausing the database != putting the database into readonly mode, which is all that would really be required. If your writer-processes are distinct from your reader-processes, you could suspend them (and/or batch up writes to temp tables to shrink your externally-felt maintenance window), tell the DB to flush pending writes, then dump with O_STREAMING-aware tar (or db-specific tools that still must pass through all tables/files) while read performance is only somewhat impacted, and cache isn't completely killed.
Or, consider the case where the database isn't anywhere near all that the system does. Think static content + DB-driven webserver, where the DB *can* be completely shut down (and those parts unavailable) during backups, while static content serving still goes on efficiently.
Signature · 1 line
Hank Leininger <[email protected]>