Re: dump(8) using snapshot + recommended cache

2009-02-01 Thread Wojciech Puchar


I regularly use dump(8) with snapshots to back up my server.

While this seems to have been working perfectly well so far,
upon (re)reading the man page for dump(8), I have noticed a
somewhat scary pair of lines in the paragraph describing
the option for -C cachesize (emphasis with stars mine):

[Use of this option] will greatly improve performance
at the cost of ***dump possibly not noticing changes in
the file system*** between passes.

***It is recommended that you always use this option when
dumping a snapshot.***

Does anyone know what, exactly, this means?


no, in my experience it's no difference in speed with this enabled or not.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


dump(8) using snapshot + recommended cache

2009-02-01 Thread Andrew Hamilton-Wright


Hi All;

I regularly use dump(8) with snapshots to back up my server.

While this seems to have been working perfectly well so far,
upon (re)reading the man page for dump(8), I have noticed a
somewhat scary pair of lines in the paragraph describing
the option for -C cachesize (emphasis with stars mine):

[Use of this option] will greatly improve performance
at the cost of ***dump possibly not noticing changes in
the file system*** between passes.

***It is recommended that you always use this option when
dumping a snapshot.***

Does anyone know what, exactly, this means?

In particular, is the first statement actually trying to say:

Use of this option will greatly improve performance;
however it may be that changes made to the filesystem
made between _dump_ passes will be ignored.  ***The resulting
dumped filesystem image will be consistent and correct
based on a timestamp no later than that of the point
at which the dump was started***.

Is this a fair statement?  Is this guaranteed?  Or are we
trying to say that:

The resulting filesystem will contain images of individual
files based on a timestamp no later than that of the
point at which the dump was started, however any individual
files modified after the dump begins may be stored using
any of the version that appeared written to disk during
the period of the dump.



As far as the second line goes, I am not at all clear on what
this is trying to say.  Why is the cache recommended?  For
speed?  Stability?  Output correctness?  In particular, if a
snapshot dump is made without a cache option, is it potentially
corrupt?

In particular, if the second attempt above is more true than
the first, it seems to me that we should _not_ recommend the
use of a cache with snapshots, as it seems to erode the utility
of the snapshot itself.  It is for this reason that I am
suspecting that there is more here than meets the eye, which
is why I am keen to make sure that this is clear.


I am very happy to put in an update to the docs if we can make
sure that we know exactly what we are trying to say here.


Thanks,
Andrew.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dump(8) using snapshot + recommended cache

2009-02-01 Thread Andrew Hamilton-Wright



I regularly use dump(8) with snapshots to back up my server.

While this seems to have been working perfectly well so far,


Sorry to follow-up my own post; I just realized I hadn't mentioned
any version info.  The docs I am reading are the ones associated
with 7.1-RELEASE; I haven't checked whether this part of the dump
documentation got updated with 7.1 or not.

Thanks,
Andrew.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dump(8) using snapshot + recommended cache

2009-02-01 Thread RW
On Sun, 1 Feb 2009 08:59:02 -0400 (AST)
Andrew Hamilton-Wright andre...@ieee.org wrote:

 
 Hi All;
 
 I regularly use dump(8) with snapshots to back up my server.
 
 While this seems to have been working perfectly well so far,
 upon (re)reading the man page for dump(8), I have noticed a
 somewhat scary pair of lines in the paragraph describing
 the option for -C cachesize (emphasis with stars mine):
 
   [Use of this option] will greatly improve performance
   at the cost of ***dump possibly not noticing changes in
   the file system*** between passes.
 
   ***It is recommended that you always use this option when
   dumping a snapshot.***
 

When you dump a snapshot there are, by definition, no changes between
passes. So it's saying that in that case there in no reason not to
cache. 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dump(8) using snapshot + recommended cache

2009-02-01 Thread Andrew Hamilton-Wright

On Sun, 1 Feb 2009, RW wrote:


***It is recommended that you always use this option when
dumping a snapshot.***



When you dump a snapshot there are, by definition, no changes between
passes. So it's saying that in that case there in no reason not to
cache.


Ah, that makes sense. That being the case, perhaps we can update
the text to:

If dumping from a snapshot, the filesystem is already frozen,
therefore using a cache with a snapshot will ensure that
consistency is maintained while also providing best performance.

If that sounds good, I'll make a doc patch.


Out of curiosity, under what circumstances is the improved performance
the most likely?  I dump from cron when the system usage is low, and
haven't noticed any significant difference in time with or without
cacheing -- but I haven't done any testing under heavy load, nor with
limited RAM, so there are many mbufs available in any case.

Thanks for the info,
Andrew.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org