24769 | New script for performing a parallel checkpoint. Run as follows: ... parallel_ckp.sh <instance> -P <threads> New script to restore a parallel checkpoint file to the offline database in case a recovery is needed. Run as follows: parallel_ckp_restore.sh <instance> -f <parallel_ckp_file.tgz> -P <threads> 芦 |
25374 | New script for performing a parallel checkpoint. Run as follows: ...; parallel_ckp.sh <instance> -P <threads> New script to restore a parallel checkpoint file to the offline database in case a recovery is needed. Run as follows: parallel_ckp_restore.sh <instance> -f <parallel_ckp_file.tgz> -P <threads> 芦 |
24768 | New script for performing a parallel checkpoint. Run as follows: ... parallel_ckp.sh <instance> -P <threads> New script to restore a parallel checkpoint file to the offline database in case a recovery is needed. Run as follows: parallel_ckp_restore.sh <instance> -f <parallel_ckp_file.tgz> -P <threads> #review-24769 芦 |
Testing Robert's suggestion of using
pigz
. Pretty neat utility. Trying that approach where I do a normaljd
and pipe it throughpigz
for the large database files, and bundle the remaining ones. (whattttttt this Swarm doesn't support markdown in comments? 馃槕 )I can't recommend this solution since checkpoints are run on the master, and you will hog too many of the server's CPUs.
Good point. The proposed logic includes determining the CPU to engage and using as many as possible, essentially assuming that "getting it over with" is the highest priority compared to "not significantly impacting performance while checkpoints occur." Both are reasonable priorities. We'll want to add throttle control set the minimum number of CPUs to keep available for other processing, to avoid slamming the CPU availability too hard. Given the high value of getting checkpoint duration reduced, I think most admins will tolerate some impact (compared to the current single-threaded behavior), so long as it's not blocking/locking or exhausting resources. But we'll need to make it super easy to "go back to the old way." Or perhaps make it so a configuration change from the default is needed to enable parallel checkpoint processing? (I'd be inclined to make it the default, though, since we're only going to release it once fully proven.
I'm going to bump here to show some serious interest in this (on windows). Our checkpoints just take far too long to complete. I'd like to note that we take our checkpoints on read only replicas. In a federated environment I care a little less about my server being hammered hard than my ability to take frequent backups that let me restore to a closer point in time to any failure we have.
Last time I worked on this during a hackathon, I discovered that a checkpointing process invokes a lock on the database itself, so other checkpoint processes couldn't run, even if you specified a single individual db.file. The only way I'm aware of working around this would involve symlinking the database files from discrete locations as described by google: http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/39983.pdf
With the right kind of hardware, doing a jd without -z piped through pigz did make checkpointing individual databases quicker and allowed the system to take advantage of spare resource (noted that even with a 16core box I never saw pigz reliably gobble more than 5-6 cores). pigz is capable of constraining itself on how much its allowed to consume. While parallel checkpoint creation wasn't particularly quick, having multiple checkpoint files would allow for a way to parallel restore said checkpoint.
For us personally, we've moved full checkpointing to a replica, process journal rotations on the commit, and do database rebalancing on commit on the weekends.
That is correct Alan, and that is the reason we use the offline database for doing the checkpoint.