Is there a performance advantage to mounting a volume as readonly?

11/21/2019

In Kubernetes deployments, you can specify volume mounts as readonly. Is there a performance advantage to it, or logical only?

Is it dependant on the volume type?

To make my intentions clear, I'm using a pv in a scenario where I have one writer and many readers, and noticed any fs operation on the mounted volume is much slower than on the volatile disk.

-- Mugen
kubernetes
kubernetes-deployment
kubernetes-pod
kubernetes-pvc
mounted-volumes

1 Answer

11/21/2019

It entirely depends on the volume type. Some might implement performance optimizations when they know the volume is read only.

-- coderanger
Source: StackOverflow