summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a14406)
raw | patch | inline | side by side (parent: 0a14406)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 1 Oct 2008 20:58:56 +0000 (20:58 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 1 Oct 2008 20:58:56 +0000 (20:58 +0000) |
tutorial/lisa2008/rrd-by-example/body.tex | patch | blob | history | |
tutorial/lisa2008/rrd-intro.odp | [new file with mode: 0644] | patch | blob |
index 2715fd3f49656f1b26e9dd0bdfb890f15e530067..601a841966df67b9eeb2da2797334898066d2704 100644 (file)
The xml dump of the rrd file shows an approximation of the on-disk
structure of the database. The rra database sections are re-ordered, so that
they are in chronological order with the oldest at the top. Also the
-cdp sections are stored right after the header. Idea behind this
-design is, that things that get written on every update are as close
+cdp sections are stored right after the header. The idea behind this
+design is that data that get written on every update is as close
together as possible.}
\begin{frame}{rrd features}
\begin{frame}[fragile]{on-disk structure}
\begin{alltt}
+-------------------------------+
-| Static Header | \textrm{RRD Cookie, DB Cfg}
+| Static Header | \textrm{RRD cookie, DB cfg}
|-------------------------------|\pause
: Data Source (DS) Definitions :
|-------------------------------|\pause
: RR Archive (RRA) Definitions :
|===============================|\pause
-| Live Head | \textrm{Last Update Time}
+| Live Head | \textrm{last update time}
|-------------------------------|\pause
-: PDP Prep per DS : \textrm{Last Value for Diff}
+: PDP Prep per DS : \textrm{last value for diff}
|-------------------------------|\pause
-: CDP Prep per RRA and DS : \textrm{Intermediate Storage}
+: CDP Prep per RRA and DS : \textrm{intermediate storage}
|-------------------------------|\pause
: RRA Pointers :
|===============================|\pause
\lstinputlisting[language=bash,lastline=19]{ex/update-real.sh}
\end{frame}
-\mode<article>{To try things out, lets assume that data arrives at
- irregular intervals. This is counter data, by synchronizing the
+\mode<article>{To try things out lets assume that data arrives at
+ irregular intervals. This is counter data. By synchronizing the
data values with the arrival time we should get a constant rate
stored in the database.}
\end{itemize}
\end{frame}
-\mode<article>{As long as your system is small (a few hundred rrds)
- you should optimize for convenience. Only keep these DSes together
- in one RRD that are tightly bound together. For everything else
- create separate rrds.}
+\mode<article>{As long as your system is small (a few hundred RRDs)
+ you should optimize for convenience. Only keep DSes together
+ in one RRD that are tightly bound. For everything else
+ create separate RRDs.}
\mode<article>{\newpage}
\item looking for complete coverage
\item resolution is only a suggestion
\item time stamp in output marks the END of the period
-\item end-time differences cause problem
-\item since 1.3 only the start-time is relevant for coverage
-\item outside the rra everything is nan
+\item end-time differences caused problems
+\item since 1.3, only the start-time is relevant for coverage
+\item outside the rra everything is NaN
\end{itemize}
\end{frame}
\begin{itemize}
\item overhead is minimal
\item 8 byte per double
-\item \ldots per Datasource
+\item \ldots per datasource
\item \ldots per RRA
-\item \ldots per RRA Row
+\item \ldots per RRA row
\end{itemize}
\end{frame}
\mode<article>{The rrd format is highly efficient at storing non
sparse data. The overhead for an extra RRA or DS is normally a few
- bytes on top of the 8 Byte per double.}
+ bytes on top of the 8 byte per double.}
\mode<article>{\newpage}
\mode<article>{The rrd graph command is the most versatile of all rrdtool
commands. It comes with its own little language, optimized for
- drawing graphs. There are two kinds of arguments. The options,
- which start with a double-dash and the graphing instruction that
+ drawing graphs. There are two kinds of arguments. The options
+ which start with a double-dash and the graphing instructions that
start with an uppercase letter.}
\begin{frame}{normal line}
\addgraph{LINE-lower}
\end{frame}
-\mode<article>{Unless you are a baker and are drawing stock diagrams,
+\mode<article>{Unless you are a banker and are you drawing stock diagrams,
make sure your graph displays the zero-y-value. Otherwise it is
pretty difficult to judge the meaning of the graph since perspective
is limited to the numbers on the y-axis.}
\end{frame}
\mode<article>{RRD graphs are pretty blocky. This is on purpose, since
- the data is blocky too. The slope mode is a little concession by
- tilting the vertical connections between the 'block' by one pixel.}
+ the data is blocky too. The slope mode is a little concession. It
+ tilts the vertical connections between the 'blocks' by one pixel.}
\begin{frame}{anti-anti-aliasing: graph}
\addgraph{LINE-graph-mono}
\addgraph{LINE-dash}
\end{frame}
-\mode<article>{The numbers are in ON-OFF-ON-OFF-\ldots pattern. The
+\mode<article>{The numbers are an ON-OFF-ON-OFF-\ldots pattern. The
\texttt{dash-offset} property lets you shift the dashing of the line
to the right.}
\addgraph{AREA-trans}
\end{frame}
-\mode<article>{RRDtool creates real alpha transparency, you can set
+\mode<article>{RRDtool creates real alpha transparency. You can set
the whole graph to be transparent by setting the
graph CANVAS and BACKGROUND colors to transparent.}
\end{frame}
\mode<article>{A normal \texttt{DEF} line requests exactly as much data as it
-requires for drawing the graph. When you \texttt{SHIFT} the data, you
+requires for drawing the graph. If you \texttt{SHIFT} the data, you
may want to adjust the data fetched accordingly.}
\mode<article>{\newpage}
\mode<article>{RRDtool lets you apply math operations to the data
prior to showing it to the user. It uses RPN math for this. If you
ever owned a classic HP calculator, you may still remember how RPN
- math works. For all the others, there is a little example below,
- that shows how todo a little addition in RPN.}
+ math works. For all the others there is a little example below,
+ that shows how to do a little addition in RPN.}
\begin{frame}[fragile]{RPN basics: Step 0}
$15+23=38$
\addgraph{RPN-simple}
\end{frame}
-\mode<article>{A simple addition. We add a fixed value to one a data
+\mode<article>{A simple addition. We add a fixed value to a data
source. Note that at least one data source must appear inside a CDEF
expression. The input to a CDEF expression can come from another
CDEF expression.}
\addgraph{RPN-max}
\end{frame}
-\mode<article>{The MAX function operates on two value. In this example
+\mode<article>{The MAX function operates on two values. In this example
the input comes from two different data sources.}
\begin{frame}{the LIMIT function}
\mode<article>{If a data source varies massively, the TREND function
lets you smooth away by building a moving average. By calculating
- the average the output gets shifted by the length of the TREND
+ the average, the output gets shifted by the length of the TREND
calculation.}
\begin{frame}{the TREND with early start}
exactly the amount of data that is required in the graph (yes same
story as before). By loading more data, we can provide the TREND
function with enough input, so that it can calculate the first few
- pixel as well.}
+ pixels as well.}
\mode<article>{\newpage}
\addgraph{RPN-trend-shift}
\end{frame}
-\mode<article>{Another interesting option, is to SHIFT the result of
+\mode<article>{Another interesting option is to SHIFT the result of
the TREND calculation back in time, so that it matches with the
- source data, since this may allow us to see when there are
+ source data. This allows us to see more easily when there are
'outliners'}
\mode<article>{\newpage}
\addgraph{RPN-UNKN}
\end{frame}
-\mode<article>{Unknown values can not be drawn. Here we use this to
- just show a value if it is the largest one.}
+\mode<article>{Unknown values are not drawn on the graph. Here we
+ use trick to only show the largest values.}
\begin{frame}{positional drawing count}
\addgraph{RPN-count}
\end{frame}
-\mode<article>{If you were into bar charts, you might fake them with
+\mode<article>{If you are into bar charts, you might fake them with
this trick. COUNT, counts the values of the data set. We use this,
- together with the modulo operator to suppress drawing the every
+ together with the modulo operator to suppress the drawing of every
third entry.}
\begin{frame}{access the previous value}
\end{frame}
\mode<article>{There is also a function for accessing the Unix time
- (seconds since 1970). With it you can make your stripes a fixed
- number of seconds wide.}
+ (seconds since 1970) associated with the graph data. With it, you
+ can make your stripes a fixed number of seconds wide.}
\begin{frame}{time and resolution issues}
\addgraph{RPN-time-odd}
\mode<article>{\newpage}
-\mode<article>{Whenever RRDtool has to do math with
-data sets that come in different step sizes, it first has to
-to adjust the resolutions to match. To do this, it finds the greatest
-common divisor and uses it as the new step size.}
+\mode<article>{Whenever RRDtool graph has to do math with data sets
+ that come in different step sizes, it first to adjust the step sizes
+ so that they match. To do this, it finds the greatest common divisor
+ and uses it as the new step size.}
\begin{frame}[fragile]{CDEF internals}
\begin{itemize}
-\item data may come in different resolution
+\item data may come in different resolutions
\item all items in a CDEF must have the same resolution
\item resolution is expanded to greatest common devisor (gcd)
-\item example: lcd(6,9) = 3, lcd(1,6) = 1
+\item example: gcd(6,9) = 3, gcd(1,6) = 1
\end{itemize}
trick: an rrd with one a second step.
\addgraph{RPN-time-odd-hires}
\end{frame}
-\mode<article>{By introducing this special rrd with a one second step
-the greatest common divisor (gcd) becomes one.}
+\mode<article>{By introducing this special rrd with a ``one second
+ step'' the greatest common divisor (gcd) becomes one.}
\section{Consolidation functions}
\mode<article>{\newpage}
-\section{Holt-Winters Aberrant Behaviour Detection}
+\section{Holt Winters Aberrant Behaviour Detection}
\begin{frame}{about alert generation}
\begin{itemize}
\item when something unexpected happens send an alert\pause
\item fixed thresholds are too wide a net\pause
-\item moving averages weighs all data equal\pause
+\item moving averages weigh all data equal\pause
\item holt winters can predict the future\pause
-\item and no one thinks they are clever enough to use it
+\item and no one considers himself clever enough to use it
\end{itemize}
\end{frame}
\end{itemize}
\end{frame}
-\mode<article>{With holt winters, RRDtool will calculate a prediction
+\mode<article>{With holt winters RRDtool will calculate a prediction
and a confidence band (think of it as a standard deviation) for the
current value. It will then compare the prediction with the
actual value. If the actual value falls outside the confidence band
\mode<article>{
\begin{itemize}
\item Keep it simple, go for HWPREDICT only when you start using
- Holt-Winters in RRDtool.
+ holt winters in RRDtool.
\item Every data set is different, tweaking is required.
\item Know which knobs to turn.
\item Use real data when experimenting.
\end{lstlisting}
\end{frame}
-\mode<article>{For starters we set the period to 1. This
- disables HW's ability to adjust to periodic behavior in the data but
- it lets us better observer the effect of the different graph
- parameters since the adjustment period is much shorter.}
+\mode<article>{For starters we set the period to 1. This disables HW's
+ ability to adjust to periodic behavior in the data but it lets us
+ better observe the effects of the different parameter settings since
+ the adjustment period is much shorter.}
\begin{frame}{hw demo: alpha}
\addgraph{HW-p1-a0_5-b0_001}\\
\addgraph{HW-p1-a0_1-b0_1}
\end{frame}
-\mode<article>{The larger the beta, the 'heavier' the prediction
+\mode<article>{The larger the beta the `heavier' the prediction
becomes.}
\begin{frame}{hw demo: period}
diff --git a/tutorial/lisa2008/rrd-intro.odp b/tutorial/lisa2008/rrd-intro.odp
new file mode 100644 (file)
index 0000000..39a8ef0
Binary files /dev/null and b/tutorial/lisa2008/rrd-intro.odp differ
index 0000000..39a8ef0
Binary files /dev/null and b/tutorial/lisa2008/rrd-intro.odp differ