[KLUG Members] why is my tape drive so slow???

Mike Williams members@kalamazoolinux.org
Fri, 21 Nov 2003 19:13:15 -0500


Adam Williams wrote:

>>>>>standbys like dump and tar.  The problem is neither of these seem to be 
>>>>>able to use the tape efficiently.  It keeps backing up, 
>>>>>          
>>>>>
>>>It is "shoe-shining".
>>>      
>>>
>>>>>I assume because 
>>>>>the system isn't feeding it data fast enough.  
>>>>>          
>>>>>
>>>Most likely.
>>>      
>>>
>>>>>Here's the hardware 
>>>>>details:  Pentium 2 350, 192 Megs memory.  Drive system is an LVM mirror 
>>>>>of fairly new 60 gig IDE hard drives.  tape is a Seagate DDS-3 SCSI 
>>>>>(although I've had the same problem with an HP Colorado TR-4) controlled 
>>>>>by an Adaptec 2940UW.  Redhat Linux 8.0, standard Kernel.  Since I don't 
>>>>>run XWindows, shouldn't this machine be more than capable of keeping up 
>>>>>with the tape drive?
>>>>>          
>>>>>
>>>If you do a "mt -f /dev/st0 status" what does it say?  Are you passing
>>>tar any blocking factors?
>>>      
>>>
>[snip]
>  
>
Tar blocking factors don't seem to make much difference.

>Try -
>modprobe -r st
>modprobe st buffer_kbs=128
>  
>

>You should see a line in dmesg like -
>
>st: Unloaded.
>st: Version 20030406, bufsize 131072, max init. bufs 4, s/g segs 16
>Attached scsi tape st0 at scsi1, channel 0, id 4, lun 0
>
>See "bufsize 131072".  By default the st module creates a 32k buffer,
>which is just way to small.  On some boxes (typically the black rack
>mounted beauties that say I-B-M on them) I've seen performance climb up
>through a 256k buffer.  White box crap PC-wanna-be-a-server boxes seem
>to do best at around 128k;  although you should of course test your own
>hardware.
>  
>
Had very minor success here.  Got dump to process a 50 meg or so job at 
400kbps once, or about half of what this drive should be capable of, not 
counting compression.  That was at 196k bufsize, I think.  Most jobs 
were still hovering around 200 with lots of shoe-shining. 

>>How would bus errors show themselves?  
>>    
>>
>
>They'd appear in dmesg.
>
>  
>
Nothing suspicious there.  Just notification of when I load and unload st.

There's got to be something pretty wrong in here, though.  The hard 
drive barely flickers (and the drives are IDE, so I can tell HD activity 
from tape activity), so it shouldn't be a drive speed problem; and top 
shows the CPU utilization at near zero the whole time.  The tar process 
usually doesn't even make it on the screen. 

Oh, and yes it's a modular kernel.  Standard 2.4.20 kernel supplied with 
Redhat 8.  aic7xxx is also a module.