For FreeBSD users, please see the notes below for doing further testing of
your tape drive.
+\subsection{Testing tape drive speed}
+\label{sec:btapespeed}
+
+To determine the best configuration of your tape drive, you can run the
+\texttt{speed} command available in the \texttt{btape} program.
+
+This command can have the following arguments:
+\begin{itemize}
+\item[\texttt{file\_size=n}] Specify the Maximum File Size for this test
+ (between 1 and 5GB). This counter is in GB.
+\item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount
+ of data should be greater than your memory ($file\_size*nb\_file$).
+\item[\texttt{skip\_zero}] This flag permits to skip tests with constant
+ data.
+\item[\texttt{skip\_random}] This flag permits to skip tests with random
+ data.
+\item[\texttt{skip\_raw}] This flag permits to skip tests with raw access.
+\item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block
+ access.
+\end{itemize}
+
+\begin{verbatim}
+*speed file_size=3 skip_raw
+btape.c:1078 Test with zero data and bacula block structure.
+btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
+++++++++++++++++++++++++++++++++++++++++++
+btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
+btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s
+...
+btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s
+
+btape.c:1090 Test with random data, should give the minimum throughput.
+btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes.
++++++++++++++++++++++++++++++++++++++++++++
+btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0)
+btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s
++++++++++++++++++++++++++++++++++++++++++++
+...
+btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s
+
+\end{verbatim}
+
+When using compression, the random test will give your the minimum throughput
+of your drive . The test using constant string will give you the maximum speed
+of your hardware chain. (cpu, memory, scsi card, cable, drive, tape).
+
+You can change the block size in the Storage Daemon configuration file.
+
\label{SCSITricks}
\subsection{Linux SCSI Tricks}
\index[general]{Tricks!Linux SCSI}
\index[general]{Tape Hardware Compression and Blocking Size}
\index[general]{Size!Tape Hardware Compression and Blocking Size}
-As far as I can tell, there is no way with the {\bf mt} program to check if
-your tape hardware compression is turned on or off. You can, however, turn it
-on by using (on Linux):
+You should be able to verify the tape compression status with sysfs on Linux.
+\begin{verbatim}
+cat /sys/class/scsi_tape/nst0/default_compression
+\end{verbatim}
+
+You can, turn it on by using (on Linux):
\footnotesize
\begin{verbatim}
\end{description}
+\section{Tape Performance Problems}
+\index[general]{Tape Performance}
+If you have LTO-3 or LTO-4 drives, you should be able to
+fairly good transfer rates; from 60 to 150 MB/second, providing
+you have fast disks; GigaBit Ethernet connections (probably 2); you are
+running multiple simultaneous jobs; you have Bacula data spooling
+enabled; your tape block size is set to 131072 or 262144; and
+you have set {\bf Maximum File Size = 5G}.
+
+If you are not getting good performance, consider some of the following
+suggestions from the Allen Balck on the Bacula Users email list:
+
+\begin{enumerate}
+\item You are using an old HBA (i.e. SCSI-1, which only does 5 MB/s)
+
+\item There are other, slower, devices on the SCSI bus. The HBA will
+ negotiate the speed of every device down to the speed of the
+ slowest.
+
+\item There is a termination problem on the bus (either too much or
+ too little termination). The HBA will drop the bus speed in an
+ attempt to increase the reliability of the bus.
+
+\item Loose or damaged cabling - this will probably make the HBA "think"
+ you have a termination problem and it will react as in 3 above.
+\end{enumerate}
+
+See if /var/adm/messages (or /var/log/messages) tells you what the sync
+rate of the SCSI devices/bus are. Also, the next time you reboot, the
+BIOS may be able to tell you what the rate of each device is.
+
+
\section{Autochanger Errors}
\index[general]{Errors!Autochanger}
\index[general]{Autochanger Errors}