SAS HDDs and tape on the same HBA, tape performance awful, good across network?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

gargravarr

Member
Jul 1, 2021
38
2
8
Hey folks. I had hoped that by connecting my tape drives directly to my NAS, I'd see fairly decent throughput for my backups. However, it seems the opposite is true:
  • If connected to the same HBA, both LTO-4 and LTO-6 tapes seem to be limited to 35MB/s
  • If connected to a separate machine across a 1Gb LAN and pulling data via NFS, I see 100MB/s
  • Both at the same time produces identical results - the NFS one isn't slowed down
  • HDDs are 6x Seagate Exos X12 12TB 12Gbps drives in a ZFS RAID-Z2, capable of 200-300MB/s in the array
I did a bit of searching and found this article from Lenovo:


Is this right? How can this be so much slower? How comes tape is NOT this slow when it's connected via its own HBA? Disk performance is excellent even with the drives in a SAS shelf (Dell MD1200) behind a SAS expander (cooling reasons).

The SAS card I'm using is an HP P822 RAID card in HBA mode - I've struggled for a while to find a card with enough internal and external SAS ports to fit my ITX NAS; as it's ITX, I can only fit one card.

The configuration I've been using:

NAS:
  • Core i3 9100T, 32GB DDR-4 ECC, Asus P11C-i server board
  • HP P822 6Gbps SAS card in HBA mode, 2GB FBC + capacitor
  • 6x Seagate Exos X12 SAS drives in Dell MD1200 SAS enclosure (at 6Gbps)
  • 2x 1Gb ethernet LAG
Extra server, Dell PowerEdge R210 II:
  • Core i3 Ivy Bridge, 4GB DDR-3 non-ECC
  • Dell UCS-70 (H200?) 6Gbps SAS HBA
  • Boot SSD only, no local drives
  • 1Gb ethernet
Tape drives:
  • IBM LTO-6 HH standalone 6Gbps SAS tape drive with new LTO-6 media
  • Dell TL2000 tape library with IBM LTO-4, LTO-5 or LTO-7 HH tape drives with various LTO-4, -5 or -6 media
Both machines run Devuan 4.0 (Debian 11 without systemd) on a 5.10 kernel. I'm using plain tar.

Is there any tuning I can do to improve the SAS performance? I really want to push data directly from the disks onto tape but not want to have to wait an entire day just to back up one subset (~6TB) of my zpool.
 

UhClem

just another Bozo on the bus
Jun 26, 2012
438
252
63
NH, USA
One possibility is to try a large-ish blocking-factor w/tar.
Try -b2048000

If you ARE being hampered by that "priority" issue you linked, you can't expect to achieve max tape speed (120-160 MB/s), but you might achieve 50-70% of that. (However, it could require a mod to tar.)

Also try
Code:
tar ...  | dd bs=4G iflag=fullblock oflag=direct of=/dev/TapeName
[with your "plain tar" (no -bN)]
 
  • Like
Reactions: Brian Puccio

aero

Active Member
Apr 27, 2016
346
86
28
54
I second that suggestion...block size made a major performance difference for me when writing to tape. I use tar -b 512
 

gargravarr

Member
Jul 1, 2021
38
2
8
Thanks both.

I finally got around to trying this, and it's not encouraging. I have about 175GB of old videos to be written to tape so I fished out an LTO-2 tape and used my LTO-3 drive.

No change to the block size:
Code:
$ tar cvf /dev/st0 --index-file=/srv/home/gargravarr/Backups/T2-004.log --totals=USR1 *
Total bytes written: 163840 (160KiB, 2.1KiB/s)
2048000 is invalid:
Code:
$ tar cvf /dev/st0 --index-file=/srv/home/gargravarr/Backups/T2-004.log -b2048000 --totals=USR1 *
tar: /dev/st0: Cannot write: Invalid argument
tar: Error is not recoverable: exiting now
2048:
Code:
$ tar cvf /dev/st0 --index-file=/srv/home/gargravarr/Backups/T2-004.log -b2048 --totals=USR1 *
Total bytes written: 18874368 (18MiB, 200KiB/s)
Total bytes written: 27262976 (26MiB, 203KiB/s)
512:
Code:
$ tar cvf /dev/st0 --index-file=/srv/home/gargravarr/Backups/T2-004.log --totals=USR1 -b512 *
Total bytes written: 3407872 (3.3MiB, 53KiB/s)
This is really poor.