6

Ext3 and Ext4 have a default journal commit interval of 5 seconds, which can be changed with the 'commit' mount option.

I can verify that my VirtualBox host indeed flashes its disk icon after 5 seconds (or whatever value I set for the commit mount option) whenever I do any file operation inside my Linux VM with Ext3/4, like 'echo test > my_new_file' (depending on the mount options, this might write file metadata only, or file data followed by its metadata but this is a separate question)

What is the default journal commit interval of XFS? Can it be configured?

I couldn't find any documented XFS mount option for this. With XFS, I do see that the disk icon might not flash for more than 10 seconds after I create a new file. As expected if I crash the kernel before I see disk activity, after the reboot my_new_file will not exist. Also, as expected, if I crash the kernel after I see the disk activity, this will usually be the XFS journal commit activity so if I crash the kernel at this point, after reboot my_new_file will exist, but will be empty.

1

1 Answer 1

5

From the kernel documentation not a mount option but apparently the following sysctl setting:

fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000)
The interval at which the filesystem flushes metadata out to disk and runs internal cache cleanup routines.

So the default is 3000/100 = 30 seconds.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .