\begin{exe} {bonnie++}

   \textbf{bonnie++} is a widely available benchmarking
   program that tests and measures the performance of
   drives and filesystems.  It is descended from
   \textbf{bonnie}, an earlier implementation.

   Results can be read from the terminal window or directed
   to a file, and also to a \textbf{csv} format
   (\textbf{c}omma \textbf{s}eparated \textbf{v}alue).
   Companion programs, \textbf{bon\_csv2html} and
   \textbf{bon\_csv2txt}, can be used convert to html and
   plain text output formats.

   We recommend you read the \textbf{man} page for
   \textbf{bonnie++} before using as it has quite a few
   options regarding which tests to perform and how
   exhaustive and stressful they should be.  A quick
   synopsis is obtained with:
   \begin{cmd}
$ bonnie++ --help
   \end{cmd}
   \begin{response}
bonnie++: invalid option -- '-'
usage:
bonnie++ [-d scratch-dir] [-c concurrency] [-s size(MiB)[:chunk-size(b)]]
      [-n number-to-stat[:max-size[:min-size][:num-directories[:chunk-size]]]]
      [-m machine-name] [-r ram-size-in-MiB]
      [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
      [-q] [-f] [-b] [-p processes | -y] [-z seed | -Z random-file]
      [-D]

Version: 1.98
   \end{response}

   A quick test can be obtained with a command like:
   \begin{cmd}
$  time sudo bonnie++ -n 0 -u 0 -r 100 -f -b -d /mnt
   \end{cmd}
   where:
   \begin{itemize}
      \item
      \verb?-n 0? means don't perform the file creation
      tests.
      \item
      \verb?-u 0? means run as root.
      \item
      \verb?-r 100? means pretend you have 100 MB of RAM.
      \item
      \verb?-f? means skip per character I/O tests.
      \item
      \verb?-b? means do a \textbf{fsync} after every write,
      which forces flushing to disk rather than just writing
      to cache.
      \item
      \verb?-d /mnt? just specifies the directory to place
      the temporary file created; make sure it has enough
      space, in this case 300 MB, available.
   \end{itemize}
   If you don't supply a figure for your memory size, the
   program will figure out how much the system has and will
   create a testing file 2-3 times as large.  We are not
   doing that here because it takes much longer to get a
   feel for things.

   \begin{redhatbox}

      On an \textbf{RHEL/CentOS 8} system:
      \begin{cmd}
c8:/tmp>sudo bonnie++ -n 0 -u 0 -r 100 -f -b -d /mnt
      \end{cmd}

      \begin{response}
Using uid:0, gid:0.
Writing intelligently...done
Rewriting...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
c8             300M            271m  20  288m  15           +++++ +++  3916  22
Latency                          30us      20us                12us   18075us

1.98,1.98,c8,1,1616174245,300M,,8192,5,,,277062,20,294543,15,,,+++++,+++,3916,22,,,,,,,,,,,,,,,,,,,\
30us,20us,,12us,18075us,,,,,,
   \end{response}
   \end{redhatbox}
   \begin{ubuntubox}
      On an \textbf{Ubuntu 20.04} system, running as a
      virtual machine under the \textbf{VMware} hypervisor
      on the same physical machine:
      \begin{cmd}
$ sudo bonnie++ -n 0 -u 0 -r 100 -f -b -d /mnt
   \end{cmd}
      \begin{response}
sing uid:0, gid:0.
Writing intelligently...done
Rewriting...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
ubuntu         300M            287m  88 +++++ +++           +++++ +++ +++++ +++
Latency                        3805us    4650us              2136us    1852us

1.98,1.98,ubuntu,1,1616156268,300M,,8192,5,,,293955,88,+++++,+++,,,+++++,+++,+++++,+++,,,,,,,,,,,,,,,\
,,,,3805us,4650us,,2136us,1852us,,,,,,
   \end{response}
   \end{ubuntubox}
   You can clearly see the drop in performance.
   Assuming you have saved the previous outputs as a file
   called \filelink{bonnie++.out}, you can convert the
   output to html:
   \begin{cmd}
$ bon_csv2html < bonnie++.out > bonnie++.html
   \end{cmd}
   or to plain text with:
   \begin{cmd}
$ bon_csv2txt < bonnie++.out > bonnie++.txt
   \end{cmd}

   After reading the documentation, try longer and larger,
   more ambitious tests.  Try some of the tests we turned
   off.  If your system is behaving well, save the results
   for future benchmarking comparisons when the system is
   sick.

\end{exe}

