Search code examples
kuberneteskubernetes-podkubernetes-pvckubernetes-deploymentmounted-volumes

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


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.


Solution

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