From: Matthew Dillon Date: Sun, 4 Apr 2010 16:23:19 +0000 (-0700) Subject: HAMMER Utility - Change default split size from 100MB to 4G X-Git-Tag: v2.6.1~1 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/224a874ca98725a59481614ddab26c91879b7aeb HAMMER Utility - Change default split size from 100MB to 4G * Change the default split size for mirroring from 100MB to 4G. For very large filesystems a small split size can result in very high meta-data overheads with very little actual incremental data. * Adjust the manual page for the split changes. * Adjust the manual page to clarify limitations of the bandwidth option. --- diff --git a/sbin/hammer/hammer.8 b/sbin/hammer/hammer.8 index 63be651ffd..946a9b5013 100644 --- a/sbin/hammer/hammer.8 +++ b/sbin/hammer/hammer.8 @@ -86,6 +86,14 @@ or .Cm g to specify values in kilobytes, megabytes, and gigabytes per second. If no suffix is specified, bytes per second is assumed. +.Pp +Unfortunately this is only applicable to the pre-compression bandwidth +when compression is used, so a better solution would probably be to +use a +.Xr ipfw 8 +pipe or a +.Xr pf 4 +queue. .It Fl c Ar cyclefile When pruning, rebalancing or reblocking you can tell the utility to start at the object id stored in the specified file. @@ -176,7 +184,7 @@ transaction ids to cut up the bulk transfers, creating restart points in case the stream is interrupted. If we don't do this and the stream is interrupted it might have to start all over again. -The default is a splitsize of 100MB. +The default is a splitsize of 4G. .Pp At the moment the run-through is disk-bandwidth-heavy but some future version will limit the run-through to just the B-Tree @@ -188,6 +196,11 @@ or .Cm g to specify values in kilobytes, megabytes, or gigabytes. If no suffix is specified, bytes is assumed. +.Pp +When mirroring very large filesystems the minimum recommended +split side is 4G. +A small split size may wind up generating a great deal of overhead +but very little actual incremental data and is not recommended. .It Fl X Enable compression for any remote ssh specifications. Unfortunately the diff --git a/sbin/hammer/hammer.c b/sbin/hammer/hammer.c index 8452dc6d4e..c3e02edeb1 100644 --- a/sbin/hammer/hammer.c +++ b/sbin/hammer/hammer.c @@ -59,7 +59,7 @@ int RunningIoctl; int DidInterrupt; int BulkOpt; u_int64_t BandwidthOpt; -u_int64_t SplitupOpt = 100 * 1024 * 1024; +u_int64_t SplitupOpt = 4ULL * 1024ULL * 1024ULL * 1024ULL; const char *CyclePath; const char *LinkPath;