SQL query takes twice as long on ext4 than it does on ext3
Issue
- After change filesystem from ext3 to ext4, when perform simple insert/commit test in MySQL, the time is different. Pseudo procedures:
while (i<10000) {
insert <value> to tables;
commit;
i++;
}
On ext4:
mysql> call SampleProc(10000);
Query OK, 0 rows affected (21.59 sec)
On ext3:
mysql> call SampleProc(10000);
Query OK, 0 rows affected (9.87 sec)
- On some servers, after disabling barrier on ext4, the performance looks better, however, there is no difference between with/without barrier on ext4 on some other servers, why?
Environment
- Red Hat Enterprise Linux 6
- ext3
- ext4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.