Mailinglist Archive: opensuse (1606 mails)

< Previous Next >
[opensuse] Terrible performance on default ext3 writing with O_SYNC
  • From: Taranov Ilya <epsilon@xxxxxxxxxxxx>
  • Date: Wed, 03 Sep 2008 20:05:40 +0400
  • Message-id: <48BEB5D4.8010306@xxxxxxxxxxxx>
We experience severe performance lacking while writing to file, opened
with O_SYNC option.
We understand that some performance degradation is normal in this mode,
but on my system it is 200 (hundred !) times slower.

For example on Debian linux, it is just 10-20 times slower on the same
filesystem with the same mount options.

OpenSUSE (10.3) Configuration:
uname -a
Linux vault-13 2.6.22.5-31-default #1 SMP 2007/09/21 22:29:00 UTC i686
i686 i386 GNU/Linux

cat /etc/fstab | grep /home
/dev/sda11 /home ext3
acl,user_xattr 1 2

Debian (etch) configuration
uname -a
Linux water 2.6.21-2-686 #1 SMP Wed Jul 11 03:53:02 UTC 2007 i686 GNU/Linux

cat /etc/fstab | grep /home
/dev/sda1 /home ext3 defaults,errors=remount-ro
0 1


I wrote a small program, that I have compiled with OSYNC defined and not
defined:

#define _GNU_SOURCE

#include <linux/unistd.h>
#include <linux/fs.h>
#include <fcntl.h>

char buf[1024*1024*10];

int main() {
int fd;
int i;

fd = open("aaa", O_RDWR
#ifdef MYOSYNC
| O_SYNC
#endif
| O_CREAT | O_EXCL, 0666);

for (i = 0; i < 160; i++) write(fd, (char*)buf, 64*1024);

close(fd);
}

Results:
OpenSUSE 10.3 buffered about 0.05 seconds
OpenSUSE 10.3 with O_SYNC about 9 seconds (about 200 time slower)

Debian etch buffered about 0.04 seconds
Debian etch with O_SYNC about 0.4 seconds (about 10 times slower)




--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups