Mailinglist Archive: opensuse-bugs (5759 mails)
| < Previous | Next > |
[Bug 631296] xfs very slow compared to ext3
- From: bugzilla_noreply@xxxxxxxxxx
- Date: Mon, 16 Aug 2010 16:26:22 +0000
- Message-id: <20100816162622.E144ECC7CE@xxxxxxxxxxxxxxxxxxxxxx>
http://bugzilla.novell.com/show_bug.cgi?id=631296
http://bugzilla.novell.com/show_bug.cgi?id=631296#c3
--- Comment #3 from Harald Koenig <koenig@xxxxxxxx> 2010-08-16 16:26:22 UTC ---
(In reply to comment #2)
because for xfs the file truncation is a (more) synchronous operation then in
ext[234] ?!
here is a small C program to trigger and bench the file truncation (needs one
cmd line arg -- number of files to create/overwrite), kudos to Olaf Flebbe:
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
#include <stdio.h>
#include <stdlib.h>
main(int argc, char *argv[]) {
FILE *fp;
char *buf = malloc(64*1024);
int i;
for (i = 0; i < atoi(argv[1]); i++) {
sprintf( buf, "testdat%04d", i);
fp=fopen( buf,"w");
fwrite( buf, 1, 64*1024, fp);
fclose(fp);
}
}
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=631296#c3
--- Comment #3 from Harald Koenig <koenig@xxxxxxxx> 2010-08-16 16:26:22 UTC ---
(In reply to comment #2)
Thank you for thinking outside of the box, but I want to know why xfs
is so much slower here.
because for xfs the file truncation is a (more) synchronous operation then in
ext[234] ?!
here is a small C program to trigger and bench the file truncation (needs one
cmd line arg -- number of files to create/overwrite), kudos to Olaf Flebbe:
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
#include <stdio.h>
#include <stdlib.h>
main(int argc, char *argv[]) {
FILE *fp;
char *buf = malloc(64*1024);
int i;
for (i = 0; i < atoi(argv[1]); i++) {
sprintf( buf, "testdat%04d", i);
fp=fopen( buf,"w");
fwrite( buf, 1, 64*1024, fp);
fclose(fp);
}
}
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
| < Previous | Next > |