OverlayFS performance with a slow CIFS lowerdir

From: Claudiu
Date: Tue May 23 2023 - 20:01:51 EST


Hi,

If there is a better list to post this to, please point me to it.

I have a readonly OverlayFS setup with a few lowerdirs in which the last of
the lowerdirs is a CIFS mount. This is a share from a remote homeserver with
drives that may go to sleep or may get disconnected. I experience
performance issues from time to time when accessing data via the overlay
even if that data is available in the first lowerdir and I suspect that this
is happening because of a slow CIFS access (sleeping drives may need to spin
up?).
Also, when the CIFS mount is dead (server unreachable), accessing the
overlay in any way seems to hang.

Is this behaviour as expected?
Are there any module/mount options that can improve this behaviour?

Notes:
- All lowerdirs are quite big file systems with tens of millions of files
- Running Debian stable with 5.10.0-21-amd64.

Thanks.