junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

ddsnap.8 min(128MB, system ram size/4) should be max #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
about the --cachesize option, ddsnap man page says:

Specifies the amount of RAM to dedicate to the snapshot btree cache.  If
not specified or
if specified as 0 (zero), defaults to min(128MB, system ram size/4).

That should be "max" instead of "min".

That's confirmed by ddsnap --help and the code:

                cachesize_bytes = 128 << 20;
                struct sysinfo info;
                if (!sysinfo(&info)) {
                        const u64 QUARTER_TOTAL_RAM = (u64)(info.totalram /
4) * (u64)info.mem_unit;
                        if (cachesize_bytes > QUARTER_TOTAL_RAM)
                                cachesize_bytes = QUARTER_TOTAL_RAM;
                }

Original issue reported on code.google.com by s.chaze...@gmail.com on 12 May 2008 at 6:11

GoogleCodeExporter commented 9 years ago
Here is the fix for the ddsnap and zumastor manpage. Patch is also attached.

Index: zumastor/man/zumastor.8
===================================================================
--- zumastor/man/zumastor.8     (revision 1652)
+++ zumastor/man/zumastor.8     (working copy)
@@ -81,7 +81,7 @@
 They may only differ if separate metadata and snapshot devices are specified.
 Note that these values must be specified as powers of two and must be larger than
512 bytes.

-The amount of RAM dedicated to the snapshot store cache defaults to min(128MB,
system RAM/4), and can be tuned manually with the \fBcachesize\fP option.  For
instance, to increase the cache size to 512MB, use --cachesize 512M.
+The amount of RAM dedicated to the snapshot store cache defaults to max(128MB,
system RAM/4), and can be tuned manually with the \fBcachesize\fP option.  For
instance, to increase the cache size to 512MB, use --cachesize 512M.

 A mountpoint may be defined for the volume with the \fBmountpoint\fP option.  It
must be a directory with no other file system mounted there.  Mount options that
apply to that mount point may be defined with the \fBmountopts\fP option.  The
snapshot mountpoint under which the volume snapshots are mounted can be defined 
with
the \fBsnappath\fP option.
 .IP \fBdefine\ \fBmaster\fP
Index: ddsnap/man/ddsnap.8
===================================================================
--- ddsnap/man/ddsnap.8 (revision 1661)
+++ ddsnap/man/ddsnap.8 (working copy)
@@ -82,7 +82,7 @@
 .IP \fB\-k\ \fIcachesize\fB|--cachesize=\fIcachesize
 .br
 Specifies the amount of RAM to dedicate to the snapshot btree cache.  If not
specified or
-if specified as 0 (zero), defaults to min(128MB, system ram size/4).
+if specified as 0 (zero), defaults to max(128MB, system ram size/4).
 .IP \fB-f|--foreground
 .br
 Sets the server to run in the foreground. The default is to run daemonized.

Original comment by jiahotc...@gmail.com on 12 May 2008 at 7:01

Attachments:

GoogleCodeExporter commented 9 years ago
LGTM

Original comment by williama...@gmail.com on 12 May 2008 at 7:53

GoogleCodeExporter commented 9 years ago
Fixed with revision 1662.

Original comment by jiahotc...@gmail.com on 12 May 2008 at 8:51