You can set the commit interval to a custom value which, I believe, can be as high as a 32-bit unsigned integer number of seconds; so about 4 billion seconds, or 136 years. This is available through the commit
mount option, which you can place into effect as follows (this is merely an example; you can also set this in fstab
):
mount /dev/sda1 -t ext4 -o rw,data=writeback,nobh,commit=12345678
The commit interval is not based on any type of condition like whether the data is appended or overwriting existing data or whatever. The commit
mount option (which defaults to 5 seconds if you don't supply the mount option at all) is equivalent to doing something like this in a bash shell:
#!/bin/bash
while :
do
echo "Syncing all uncommitted data and journal to disk"
sync
sleep 5
done
Don't confuse data=ordered
and this global filesystem sync interval ("commit interval" is perhaps a less meaningful term for those of us who understand the functionality of the command line program sync
, in which case it may be better named the "sync interval"). data=ordered
is about the order in which data and metadata are updated (where data=writeback
is "less safe / faster" and data=journal
is "more safe / slower"). commit=12345678
is about the frequency with which the filesystem driver itself forces a FULL sync of ALL dirty data/journal/metadata/whatever to the physical media. And you can most certainly set it to 136 years if you want, and mount with data=writeback,nobh
and programs that don't call fsync()
or sync()
will have dirty pages sitting in RAM for... several lifetimes.
Update: Based on your context in your question edit, I'd say that you should run your filesystem with mount options data=journal,commit=1
or even with the sync
mount option, until you are able to resolve your graphics driver kernel panics. This will maintain maximum data integrity but at the cost of performance. You'll especially want to do this if you are frequently writing data to disk that you can't afford to lose, and that's doubly important if you don't "trust" the apps you're using to employ fsync()
appropriately.
Source: here and personal experience
Best Answer
EXT4 above all says it will boot your OS faster. Ubuntu 9.04 should be booting up to 30% faster. If this is the only practicall use I would be stunned, since my Ubuntu boxes boot so fast I cannot even go get me a cup of coffee...
But you can use larger harddrives, have larger files, more security is built in to safeguard data from crash and last but not least, it is being optimized for speed...
When starting to develop EXT4 in 2006 it was meant as an improved EXT3. However, changes where to big to just call it an upgrade. Thus the new name. It was added to the kernel in 2008...