SCSI sr driver: parallel writes to optical serialized which hurts performance (sr_mutex)

From: Johan de Jong
Date: Tue Mar 01 2016 - 06:00:17 EST


Dear developers,

(Please CC me as I am not subscribed (yet))

Writing (backing up) to multiple optical drives at the same time results in
a performance loss of about 7-10 times compared to writing to a single
drive.

After digging around it seems the problem arose about 5 years ago after the
Big Kernel Lock removal and the introduction of the new "sr_mutex" private
mutex in drivers/scsi/sr.c, which locks on a per driver basis instead of a
per device basis.

Various reports by users are listed on this issue on various mailing lists,
so I think there is interest for a solution in the linux community. So far,
it looks like this has not attracted the attention of, or not been
identified as a priority by, any of the kernel developers. However, I think
a Linux based DIY server with multiple optical drives for the purpose of
backing up files in multiple offline copies is a very useful application
and it would be unfortunate if the current behavior keeps such an
application unfeasible.

Would someone be willing to look into this and/or comment on the issue?

Sincerely,
Johan de Jong