\begin{exe} {\textbf{fs\_mark}}

   The \textbf{fs\_mark} benchmark gives a low level bashing to
   file systems, using heavily asynchronous I/O across
   multiple directories and drives.  It's a rather old program
   written by Rick Wheeler that has stood the test of time.
   It can be downloaded from
   \url{http://sourceforge.net/projects/fsmark/} Once you
   have obtained the tarball, you can unpack it and
   compile it with:

   \begin{cmd}
$ tar zxvf fs_mark-3.3.tgz
$ cd fs_mark
$ make
   \end{cmd}

   Read the \verb?README? file as we are only going to
   touch the surface.
   If the compile fails with an error like:
   \begin{cmd}
$ make
   \end{cmd}
   \begin{response}
....
/usr/bin/ld: cannot find -lc
   \end{response}
   it is because you haven't installed the \textbf{static}
   version of \textbf{glibc}.  You can do this on
   \textbf{Red Hat}-based systems by doing:
   \begin{cmd}
$ sudo dnf install glibc-static
   \end{cmd}
   and on \textbf{SUSE}-related systems with:
   \begin{cmd}
$ sudo zypper install glibc-devel-static
   \end{cmd}
   On \textbf{Debian}-based systems the relevant static library
   is installed along with the shared one so no additional
   package needs to be sought.
   \begin{redhatfamilybox}
      \begin{itemize}
         \item
         On \textbf{RHEL 8} \verb?glibc-static? is available
         in the \verb?codeready-builder? repo which may need
         to be enabled.
         \item
         However, on \textbf{CentOS 8} it is included in the
         \textbf{PowerTools} repo.  If you already have
         \filelink{/etc/yum.repos.d/CentOS-PowerTools.repo}
         on your system, then just make sure it has
         \verb?enabled=1?  set in the file.  Otherwise we
         have made a copy of this file and placed it in the
         \verb?SOLUTIONS? section for this course:
      \end{itemize}
   \end{redhatfamilybox}

   For a test we are going to create 2500 files, each 10 KB
   in size, and after each write we'll perform an
   \textbf{fsync} to flush out to disk. This can be done
   in the \filelink{/tmp} directory with the command:
   \begin{cmd}
$ fs_mark -d /tmp -n 2500 -s 10240
   \end{cmd}

   While this is running, gather extended \textbf{iostat}
   statistics with:
   \begin{cmd}
$ iostat -x -d /dev/sda 2 10
   \end{cmd}
   in another terminal window.

   The numbers you should surely note are the number of
   files per second reported by \textbf{fs\_mark} and the
   bandwidth percentage utilized as reported by
   \textbf{iostat}. If this is approaching 100 percent, you
   are I/O-bound.

\end{exe}

