----- Original Message -----
> I have completed the first round of this work ... as usual the final
> implementation is a little messier than first expected ...
:)
> - changing the semantics of __pmLogPutResult to allow the trailer to be
> written in the same write as the header and pmResult was a little messy
Yeah, hmm, oh well.
> The testing (all QA passes, so no functional regressions) reported below
> shows less writes and about the same CPU burn for the typical cases ...
> so resource wise a break even, but we get the better semantics. For the
Yep, agreed. Actually I would say the log write I/O patterns appear to
be noticeably improved for the more realistic sizes, and well worth the
slight CPU overhead.
However, given this:
> Test cases 10,000 samples at 10msec intervals.
Could we re-create that table at a 10sec logged interval? Perhaps
just for 100 samples - that'd certainly satisfy my curiosity anyway.
> ...
> CPU #writes Avg write size
> (sec) (bytes)
> short - 3.9.2 1.15 142 3946
> short - new I/O 1.30 10004 56
> default - 3.9.2 3.77 20001 5623
> default - new I/O 3.73 10004 11571
> long - 3.9.2 26.5 20001 20824
> long - new I/O 26.9 10004 42409
Nicely done. Slightly off-topic, but in your dev branch the pmlogmv
change looked a little unexpected re the change in one output message,
to my eye anyway. Also there was one comment I had to re-read to grok
- do these small tweaks seem OK & match the intention?
diff --git a/qa/738.out b/qa/738.out
index 23d3b71..5e6473e 100644
--- a/qa/738.out
+++ b/qa/738.out
@@ -6,7 +6,7 @@ Usage: pmlogmv [-NV] oldname newname
exit status 1
pmlogmv: Error: cannot find any files for the input archive (foo)
exit status 1
-pmlogmv: Error: cannot find .metadata file for the input archive (foo)
+pmlogmv: Error: cannot find metadata file for the input archive (foo)
... ls data ... foo.0
exit status 1
pmlogmv: Error: cannot find any data files for the input archive (foo)
diff --git a/src/libpcp/src/logutil.c b/src/libpcp/src/logutil.c
index 37510d0..f9e3c6e 100644
--- a/src/libpcp/src/logutil.c
+++ b/src/libpcp/src/logutil.c
@@ -522,8 +522,8 @@ __pmLogNewFile(const char *base, int vol)
/*
* Want unbuffered I/O for the data volumes ... the metadata
* already has a fflush() after the batch (if any) of changes
- * from the current pmResult, and temporal index also has
- * fflush()ing everytime it is written to.
+ * from the current pmResult, and the temporal index also has
+ * fflush() issued every time it is written to.
*/
if (vol != PM_LOG_VOL_META && vol != PM_LOG_VOL_TI)
setvbuf(f, NULL, _IONBF, 0);
diff --git a/src/pmlogger/pmlogmv.sh b/src/pmlogger/pmlogmv.sh
index 1c372e6..dc22677 100755
--- a/src/pmlogger/pmlogmv.sh
+++ b/src/pmlogger/pmlogmv.sh
@@ -172,7 +172,7 @@ if grep -q '.meta$' $tmp.old
then
:
else
- echo >&2 "pmlogmv: Error: cannot find .metadata file for the input archive
($old)"
+ echo >&2 "pmlogmv: Error: cannot find metadata file for the input archive
($old)"
ls -l "$old"*
exit
fi
cheers.
--
Nathan
|