0

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
  • 8,301
  • 10
  • 62
  • 140

1 Answers1

3

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

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • Do you have any reference or pointers to these? As you can guess I searched and didn't find any mention of such optimizations – Mugen Nov 21 '19 at 10:19
  • Kubernetes is just passing the flag down into the underlying system. I know some iscsi devices have a specific read-only lun modes that bypass the write cache. GCP disks also specifically recognize read-only mode and I would imagine they do a similar trick there. – coderanger Nov 21 '19 at 10:32