Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is ext4 stable enough for databases and virtual machines? The data integrity issues were due to the data not being really written to the disk and being in the cache which would be cleared after a power loss. The work around as I understand was to put an fsync option in fstab. After enabling that option, wouldn't ext3 and ext4 result in the same performance?

In case of a power loss, which of the filesystems can prevent data loss?

share|improve this question
The data loss issue that you're describing has to do with rename operations, delayed block allocation, and badly written code - unless you're aware of issues with the applications that you're running then don't worry. – Shane Madden Jan 6 '12 at 17:33
So if I rename a file using Debian and the power goes out immediately....the file is not renamed? How do I know which packages/applications will have issues with ext4? – firebird Jan 6 '12 at 17:50

3 Answers 3

up vote 3 down vote accepted

In order to prevent loss of data in case of power loss you have to use synchronous writes (sync option in fstab). This is going to kill your performance and persuade you to think of better alternatives.

ext4 is ready for production use. It is default in server oriented distributions for some time now.

In case of a power outage use a UPS. If you do not have the budget for a UPS, then your data isn't worth protecting against power outage, right?

Write caching is used in practically all contemporary filesystems: ext3, jfs2, ext4, btrfs, zfs, you name it. Database writers are very conscious about data handling and pay attention to syncing proper data at proper times.

share|improve this answer
is there a big performance improvement in going to ext4 from ext3? – firebird Jan 6 '12 at 18:23
This depends on the workload. Usually it is not worse than ext3 (ext4 has barriers on by default), sometimes much better. As usual, test with your own use case is the best answer. – Paweł Brodacki Jan 6 '12 at 19:37
If database for OLTP and high number of transactions or running multiple VMs running, which one would you chose? – firebird Jan 6 '12 at 19:45
I would use ext4 unless I had a very good reason not to. The best reason would be results of a test which would show, that for my workload there is a noticeable performance delta. Do a test recovery of your backups to a test machine and run some test load on ext3 and ext4, compare and make a decision. There is no universal, always-good solution, I'm afraid. – Paweł Brodacki Jan 8 '12 at 11:11

Yes, it's a mainstream supported FS on RHEL, Centos, SL, OEL etc.

share|improve this answer

You should twink twice (or more) before setting up MySQL database on ext4 partition with enabled barriers. It's better to use good old XFS. Look here : . Ext4 has some serious latency problems due to "barrier" option. Of course barrier is turbo-safe but generally it sucks your iowait time and increases io latency few times (for mysql UPDATE it's about 10-30 times worse). However it's not a rule. Just consider my words before you do it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.