Does Linux tmpfs filesystem need the sync option?

I had to search a bit. According to

man mount

The sync option is relevant only for a limited number of filesystems, not for tmpfs.

So the answer is: It does not matter, since it is ignored by tmpfs.


Sync makes the data beeing dumped onto the disk without beeing saved in cache

"Standard" Linux manual states:

   sync   All I/O to the filesystem should be done synchronously.
          In the case of media with a limited number of write cycles
          (e.g. some flash drives),  sync may cause life-cycle shortening.

So it's not about cacheing but rather about durability. Writing synchronously doesn't mean there wouldn't be caching (for e. g., writethrough is well-known caching approach which is very different to writeback but both still are cacheing).

In my option it would be odd if a ramdisk would be cached in RAM.

As explained it doesn't prohibit cacheing but rather prohibits writeback-like behaviour. What would be odd is "durability" for RAM disk though.

Tags:

Tmpfs