In a system with 2 SATA optical drives (have tried on two Jessie
systems so-far), if two copies of cdparanoia are run simultaneously, and
-d /dev/sr0 is specified on one copy, and -d /dev/sr1 on the other, then
read performance drops to approx 5% of its normal speed. No errors are
reported, and the operation completes successfully.
With 3 or more drives, the problem is exacerbated, and a single audio CD
takes many hours to be read.
In the test setup with just 2 drives, if either one or both of the copies
instead use the corresponding /dev/sgX device (e.g.run lsscsi -g to obtain
device node, or use sysfs), then both copies run at full speed.
I assume this is a kernel bug, but thought I'd ask here first in case
there was any known behavior within cdparanoia which could trigger this.
Initial testing with a 3.2 kernel shows similar behaviour (although
perhaps the slowdown is not so severe).
I've reported this to the linux-scsi mailing list, but no response so
far, it would be good to have a bit more certainty that this was a
kernel bug. Reading the man page, it looks like cdparanoia uses the
same interface (SG_IO ioctl) - however looking at the debug output,
running against the /dev/sg interfaces seems to suggest that they expose
scatter/gather, whereas the /dev/sr interfaces don't - perhaps this is
sufficient to begin to explain the difference.
I'll try and gather a bit more data, and report here (should be able to
test with some IDE drives, and maybe a USB one to see if the problem
persists. Incidentally, in the SATA test system, both optical drives
are connected to different SATA host controllers.