More Slowdown
Hi,
I've seen the mails in the mail archive concerning a slow-down problem with reiser4. Seems like I've got the same problem. My kernel is 2.6.14-mm2 (gentoo) and my default disk scheduler is anticipatory, but I've also tried cqf and I'd say that it depends on the application for which scheduler might be a bis faster. But they're both very slow and my load is very high.
I've found out, that resizing the columns in evolution is also for me a good proof of this problem as it really creates a lot of hard disk activity. So I've done the same strace call as Craig Shelley:
bauerbob ~ # echo anticipatory > /sys/block/hda/queue/scheduler bauerbob ~ # strace -T -p 6336 2>&1 | grep fsync
fsync(52) = 0 <1.812899> fsync(52) = 0 <0.734160> fsync(52) = 0 <0.427722> fsync(52) = 0 <0.839306> fsync(52) = 0 <0.304873> fsync(52) = 0 <0.236160> fsync(60) = 0 <0.469446> fsync(60) = 0 <0.460405> fsync(60) = 0 <0.468343> fsync(61) = 0 <0.745482> fsync(61) = 0 <0.869358> fsync(64) = 0 <1.500842>
bauerbob ~ # echo cfq > /sys/block/hda/queue/scheduler bauerbob ~ # strace -T -p 6336 2>&1 | grep fsync
fsync(52) = 0 <3.131074> fsync(52) = 0 <0.806179> fsync(52) = 0 <0.341460> fsync(52) = 0 <0.212601> fsync(52) = 0 <0.251179> fsync(52) = 0 <0.614537> fsync(52) = 0 <0.246023> fsync(52) = 0 <0.238064> fsync(52) = 0 <0.386216> fsync(52) = 0 <0.205596> fsync(52) = 0 <0.250840> fsync(52) = 0 <0.246623> fsync(52) = 0 <0.242773>
PID 6336 is evolution.
Please let me know how I can help you.
Best regards,
Thorsten
Quoted 13 lines · Thorsten Hirsch
Hi,
I've seen the mails in the mail archive concerning a slow-down problem with reiser4. Seems like I've got the same problem. My kernel is 2.6.14-mm2 (gentoo) and my default disk scheduler is anticipatory, but I've also tried cqf and I'd say that it depends on the application for which scheduler might be a bis faster. But they're both very slow and my load is very high.
I've found out, that resizing the columns in evolution is also for me a good proof of this problem as it really creates a lot of hard disk activity. So I've done the same strace call as Craig Shelley:
[cut]
Quoted 1 line
My slowdown problems are on my web server, so its concerning different things than Evolution. but this slowdown was very easy to notice when writing something with vim.
Anyways, i remembered that i was using stable kernel without this happening some time ago. So i tested 2.6.14.x , 2.6.13.x mm and 2.6.13.x , and i still had system crashes. so i downgraded to 2.6.12.6 and the system is stable for more than 24 hours (first time in this month or even longer!)
probably some processes were doing fsync often (or something similar) and the effect was raising LA and lock-up at the end.
anyways, 2.6.12.6 (but other than .6 probably too) is, i think, bug free. maybe this will help.
Quoted 10 lines
My slowdown problems are on my web server, so its concerning different things than Evolution. but this slowdown was very easy to notice when writing something with vim.
Anyways, i remembered that i was using stable kernel without this happening some time ago. So i tested 2.6.14.x , 2.6.13.x mm and 2.6.13.x , and i still had system crashes. so i downgraded to 2.6.12.6 and the system is stable for more than 24 hours (first time in this month or even longer!)
Quoted 7 lines
probably some processes were doing fsync often (or something similar) and the effect was raising LA and lock-up at the end.
anyways, 2.6.12.6 (but other than .6 probably too) is, i think, bug free. maybe this will help.
Well i do recon that I to have slow downs with vim or rather gvim and I have noticed it when im use gedit too.
will try to downgrade too 2.6.12 and see if my box will rid of the slowdowns
//Andreas
Quoted 3 lines · Andreas Rosander
Well i do recon that I to have slow downs with vim or rather gvim and I have noticed it when im use gedit too.
will try to downgrade too 2.6.12 and see if my box will rid of the slowdowns
It's funny that you mention vim. vim seems to be what _really_ makes my reiser4 do the 'slowdown'. I call it harddrive thrashing cause that's what my wife calls it when she hears it from 5 yards away :) Right before saving or saving/exiting it really does this thrashing, Thank god you said this because I didn't think this 'slowdown' was the same thing I was experiencing.
avuton
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Quoted 8 lines · Avuton Olrich
It's funny that you mention vim. vim seems to be what _really_ makes my reiser4 do the 'slowdown'. I call it harddrive thrashing cause that's what my wife calls it when she hears it from 5 yards away :) Right before saving or saving/exiting it really does this thrashing, Thank god you said this because I didn't think this 'slowdown' was the same thing I was experiencing.
avuton
i've mentioned vim becouse someone else already mention it too :) But i remember that with vim i had very long pauses.
also apt-get was slow. i don't even see the pattern, joe was also slowed, but not as much as vim. It's strange. does vim save its files in /tmp maybe ? or is there anything specific about vim that, for example, joe doesnt do? (and therefore much shorter slowdowns).
Quoted 6 lines · Avuton Olrich
It's funny that you mention vim. vim seems to be what _really_ makes my reiser4 do the 'slowdown'. I call it harddrive thrashing cause that's what my wife calls it when she hears it from 5 yards away :) Right before saving or saving/exiting it really does this thrashing, Thank god you said this because I didn't think this 'slowdown' was the same thing I was experiencing.
This looks to be a similar thing with fsync(). It took approx 10 sec to save a file containing the string "Hello World"
The results indicate that the time was spent in the fsync() call.
[email protected]:~$ ps aux | grep vim craig 9111 0.0 0.5 17268 5936 pts/0 S+ 23:35 0:00 vim temp/testfile
[email protected]:~$ strace -T -p 9111 2>&1 | grep fsync fsync(4) = 0 <9.726565>
Signature · 3 lines
Craig Shelley EMail: [email protected] Jabber: [email protected]
Quoted 10 lines · Craig Shelley
Quoted 6 lines · Avuton Olrich
It's funny that you mention vim. vim seems to be what _really_ makes my reiser4 do the 'slowdown'. I call it harddrive thrashing cause that's what my wife calls it when she hears it from 5 yards away :) Right before saving or saving/exiting it really does this thrashing, Thank god you said this because I didn't think this 'slowdown' was the same thing I was experiencing.
Quoted 3 lines
This looks to be a similar thing with
fsync(). It took approx 10 sec to save a file containing the string "Hello World"
The results indicate that the time was spent in thefsync()call.
I got sick of waiting for it and nuked the fsync call. All my kernels have a custom patch such that sys_fsync just returns true, no matter what.
Why?
Because vim shouldn't fsync, and neither should Evolution. It's been so abused that I prefer to just manually run "sync" when I want something flushed.
Even if fysnc was fast (only flushing the file that needed to flush), that kind of abuse -- resizing a column -- kind of kills any advantage of lazy writes.
Quoted 2 lines · David Masover
I got sick of waiting for it and nuked the fsync call. All my kernels have a custom patch such that
sys_fsyncjust returns true, no matter what.
Mhh.. would it be something like this?
buffer.c 2005-11-16 02:37:11.125079752 +0100 renamed from buffer.c.old 2005-11-16 02:36:46.129829994 +0100 +1 -1
@@ -376,7 +376,7 @@ asmlinkage long sys_fsync(unsigned int fd) { - return do_fsync(fd, 0); + return 1; }
What are the implications of doing something like this? Is "sync" going to stop working or isn't it using this function?
Thanks,
Francesco
Signature · 4 lines
Dr. Francesco Biscani Dipartimento di Astronomia Università di Padova [email protected]
Quoted 16 lines · Francesco Biscani
Quoted 2 lines · David Masover
I got sick of waiting for it and nuked the fsync call. All my kernels have a custom patch such that
sys_fsyncjust returns true, no matter what.Mhh.. would it be something like this?
buffer.c 2005-11-16 02:37:11.125079752 +0100 renamed from buffer.c.old 2005-11-16 02:36:46.129829994 +0100 +1
-1@@ -376,7 +376,7 @@ asmlinkage long sys_fsync(unsigned int fd) { - return do_fsync(fd, 0); + return 1; }
Quoted 1 line
What are the implications of doing something like this? Is "sync" going to
One implication is following:
1 application like fetchmail downloads a mail message from the server
2 saves message in the mailbox
3 fsyncs the mailbox (which is a no-op in our case)
4 sends notification to the server, which deletes message
5 crash occurs (transaction made on the step 2 is not yet committed to the disk)
6 after reboot mailbox is restored to the state it had before step 2
7 message is lost.
Quoted 5 lines
stop working or isn't it using this function?
Thanks,
Francesco
Nikita.
That "return 1;" should be "return 0;"
a return value of 1 indicates failure.
Also, maybe this should be applied also to the
asmlinkage long sys_fdatasync(unsigned int fd)
function as well? There isn't much to choose from between these two functions...
Quoted 45 lines · Nikita Danilov
Quoted 17 lines · Francesco Biscani
Quoted 3 lines · David Masover
I got sick of waiting for it and nuked the fsync call. All my kernels have a custom patch such that
sys_fsyncjust returns true, no matter what.Mhh.. would it be something like this?
buffer.c 2005-11-16 02:37:11.125079752 +0100 renamed from buffer.c.old 2005-11-16 02:36:46.129829994 +0100 +1
-1@@ -376,7 +376,7 @@ asmlinkage long sys_fsync(unsigned int fd) { - return do_fsync(fd, 0); + return 1; }Quoted 2 lines
What are the implications of doing something like this? Is "sync" going to
One implication is following:
1 application like fetchmail downloads a mail message from the server
2 saves message in the mailbox
3 fsyncs the mailbox (which is a no-op in our case)
4 sends notification to the server, which deletes message
5 crash occurs (transaction made on the step 2 is not yet committed to the disk)
6 after reboot mailbox is restored to the state it had before step 2
7 message is lost.
Quoted 5 lines
stop working or isn't it using this function?
Thanks,
Francesco
Nikita.
Quoted 11 lines · Nikita Danilov
Quoted 10 lines · Francesco Biscani
Quoted 2 lines · David Masover
I got sick of waiting for it and nuked the fsync call. All my kernels have a custom patch such that
sys_fsyncjust returns true, no matter what.Mhh.. would it be something like this?
buffer.c 2005-11-16 02:37:11.125079752 +0100 renamed from buffer.c.old 2005-11-16 02:36:46.129829994 +0100 +0
-0@@ -376,7 +376,7 @@
Quoted 7 lines
Quoted 7 lines
buffer.c 2005-11-16 02:37:11.125079752 +0100 renamed from buffer.c.old 2005-11-16 02:36:46.129829994 +0100 +1
-1asmlinkage long sys_fsync(unsigned int fd) { - return do_fsync(fd, 0); + return 1; }What are the implications of doing something like this? Is "sync" going to
Yes, sync still works. That, or the "sync" command has found an entirely new way of wasting my disk bandwidth.
fsync != sync.
I also sincerely hope that no unmounting, hibernation, or other place the system _needs_ to sync or data WILL be lost depends on fsync. Then again, that shouldn't matter -- the kernel seems to have fsync and sys_fsync as separate functions.
Quoted 8 lines
One implication is following:
1 application like fetchmail downloads a mail message from the server
2 saves message in the mailbox
3 fsyncs the mailbox (which is a no-op in our case)
Quoted 8 lines
4 sends notification to the server, which deletes message
5 crash occurs (transaction made on the step 2 is not yet committed to the disk)
6 after reboot mailbox is restored to the state it had before step 2
7 message is lost.
Which is why I refuse to submit my patch. It's dangerous and shouldn't be needed, and considering that many users don't even bother to unmount flash drives in Windows, can you imagine how dangerous it'd be to make them run "sync" after every time they save an important document?
Some apps do have a legitimate use for fsync, though I wish it was more configurable -- for instance, vim, mailservers, etc. Some don't. Evolution fsyncing every pixel you drag a column is flat-out retarded, and I'm glad I never needed anything beyond Thunderbird.
Quoted 1 line · Francesco Biscani
What are the implications of doing something like this? Is "sync" going to stop working or isn't it using this function?
sync(8) won't stop working, because it's using sync(2):
% strace -T sync 2>&1 | grep sync execve("/bin/sync", ["sync"], [/* 20 vars */]) = 0sync() = 0 <0.213305>
...but can someone explain to me: what's the difference between sync(2) and fsync(2) ? why are there 2 systemcalls, why is fsync(2) expensive and (mis?)used so often by applications and sync(2) is cheap (not?) and used only by sync(8)? the manpages say:
fsync, fdatasync -
synchronize a file's complete in-core state with that on disk
sync -
commit buffer cache to disk
but both syscalls do not guarantee data integrity anyway, because "modern disks have large caches".
thank you,
Christian.
Signature · 3 lines
BOFH excuse #453: Spider infestation in warm case parts
Quoted 7 lines · Artur Makówka
My slowdown problems are on my web server, so its concerning different things than Evolution. but this slowdown was very easy to notice when writing something with vim.
Anyways, i remembered that i was using stable kernel without this happening some time ago. So i tested 2.6.14.x , 2.6.13.x mm and 2.6.13.x , and i still had system crashes. so i downgraded to 2.6.12.6 and the system is stable for more than 24 hours (first time in this month or even longer!)
probably some processes were doing fsync often (or something similar) and the effect was raising LA and lock-up at the end.
anyways, 2.6.12.6 (but other than .6 probably too) is, i think, bug free. maybe this will help.
ok, now im 100% sure that 2.6.12.6 kernel + 2.6.12-3 reiser4 patch doesnt have this fsync bug, or at least its not causing any big slowdowns. The difference is really noticable.
I don't know if i can do anything more to help you fix this bug. But do you know is it going to be fixed soon ?
Thanks in advance