public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Ext4 and the "30 second window of death"
@ 2009-03-29 10:24 Alberto Gonzalez
  2009-03-31 12:25 ` Theodore Tso
  0 siblings, 1 reply; 60+ messages in thread
From: Alberto Gonzalez @ 2009-03-29 10:24 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

Reading this discussion about the fsync performance problems, the reliability 
of delayed allocation, etc... made me a bit confused, so as a normal user I 
would like to ask a clear question with an example so I can get a clear answer 
and understand the implications of all this.

- Let's say I'm a writer and I like to take my laptop to a cafe every day to 
write there for a few hours.

- As such, I want to get good battery life so I'm fine with my data being 
written to death say every 30 seconds instead of waking up the disk 
immediately if I save the document I'm working on.

- I use Ext4 as my filesystem (default in next Fedora release).

- Let's say I've been working on my book for the last 14 months and I've 
written about 400 pages on an ODF file.

- My usual workflow is that every time I finish a paragraph, say every 2-3 
minutes, I hit Ctrl+S to save the changes.

- So one day, while I'm working on the book the following happens: I finish a 
paragraph and his Ctrl+S to save it. 5 seconds later the system freezes for 
some reason. Let's suppose that in that 5 window timeframe between pressing 
Ctrl+S and the crash the data has not been written to disk (which happens 
every 30 seconds). So as a result I:

A - Lose that last paragraph
B - Lose the whole book

If it's 'A', then that's ok, as expected. Bad luck. But if it's 'B', then I 
think that's totally unexpected by any user, and totally unacceptable too. 
Sure I want good performance and good battery life, but not at such cost. 
(Yes, you can argue I should have a recent backup at home, and you'd be right, 
but that doesn't change things fundamentally).

As far as I understand, with Ext3 (defaults), the behavior was A. Will this 
change to B with Ext4 and all "modern" filesystems (XFS, Btrfs,...)?

Thanks for any answer.

^ permalink raw reply	[flat|nested] 60+ messages in thread
* Re: Ext4 and the "30 second window of death"
@ 2009-04-05 18:13 Tomasz Chmielewski
  0 siblings, 0 replies; 60+ messages in thread
From: Tomasz Chmielewski @ 2009-04-05 18:13 UTC (permalink / raw)
  To: LKML

>> The replace-via-truncate and replace-via-rename workarounds are there
>> for the benefit of KDE, and GNOME, which in some configurations
>> apparently will replace hundreds of dot files when the desktop is
>> started up, for no reason that I can understand.  (Not such a great
>> idea for SSD write endurance!)  Some people apparently spend hours
>> making sure that their windows are exactly positioned the way they
>> want it when their desktop starts up, and if the system crashes while
>> their desktop is starting up, those they could lose their window
>> positions, which apparently made a whole bunch of users cranky.  In
>> practice, most of the editors that I'm familiar with have been around
>> for a while, have needed to make sure that that cases such as yours
>> wouldn't result in data loss, and so are pretty good about using
>> fsync() so that users' files wouldn't be lost, no matter what the
>> filesystem or operating system being used.
> 
> Its more than losing window postions.  I've been using ext4 with kde 4.2.1 
> along with some experimental modules (drm for xorg for r600 support, btrfs) 
> and a few patches.  As expected this has caused a few crashes.  I have had 
> kde lose desktop setup info (eg. it forgot it was using xrender accel).  I 
> have also had kmail lose all its configuration - which is a pita to rebuild.  
> Note that these crashes occur long after kde has been started...

I've lost contents of my /etc/shadow file some time ago.
Great fun after reboot.

But it also means that the problem begins not with KDE and Gnome, but 
much, much earlier.


-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2009-04-06 22:01 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 10:24 Ext4 and the "30 second window of death" Alberto Gonzalez
2009-03-31 12:25 ` Theodore Tso
2009-03-31 12:52   ` Alberto Gonzalez
2009-03-31 13:45     ` Theodore Tso
2009-03-31 14:45       ` Alberto Gonzalez
2009-04-01  0:04         ` Theodore Tso
2009-04-01  1:14           ` Alberto Gonzalez
2009-03-31 22:02       ` Alberto Gonzalez
2009-03-31 23:22         ` Andreas T.Auer
2009-04-01  1:25           ` Alberto Gonzalez
2009-04-01  1:50           ` Theodore Tso
2009-04-01  5:20             ` Sitsofe Wheeler
2009-04-01 15:12               ` Matthew Garrett
2009-04-01 17:35                 ` Theodore Tso
2009-04-01 17:43                   ` Matthew Garrett
2009-04-01 21:21                     ` Ray Lee
2009-04-01 21:26                       ` Matthew Garrett
2009-04-02 11:25                       ` Sitsofe Wheeler
2009-04-02 18:22                     ` david
2009-04-02 18:29                       ` Matthew Garrett
2009-04-02 18:44                         ` david
2009-04-02 20:07                           ` Ray Lee
2009-04-02 20:59                             ` Andreas T.Auer
2009-04-02 23:38                               ` Theodore Tso
2009-04-03  0:00                                 ` Matthew Garrett
2009-04-03  7:33                                 ` Pavel Machek
2009-04-03  8:14                                 ` Andreas T.Auer
2009-04-02 22:36                           ` Bron Gondwana
2009-04-02 23:46                           ` Matthew Garrett
2009-04-03  0:55                             ` david
2009-04-03  1:06                               ` Matthew Garrett
2009-04-03  1:16                                 ` david
2009-04-03  1:19                                   ` Matthew Garrett
2009-04-03  1:24                                     ` david
2009-04-03  1:36                                       ` Matthew Garrett
2009-04-03  3:08                                         ` david
2009-04-03 13:42                                           ` Matthew Garrett
2009-04-03  4:54                                         ` Theodore Tso
2009-04-03 11:09                                           ` Sitsofe Wheeler
2009-04-03 13:07                                           ` Alberto Gonzalez
2009-04-03 13:45                                           ` Matthew Garrett
2009-04-02 18:34                       ` Nick Piggin
2009-04-02 18:38                         ` Matthew Garrett
2009-04-02 18:56                           ` Nick Piggin
2009-04-02 23:47                             ` Matthew Garrett
2009-04-03  0:59                               ` david
2009-04-03  1:09                                 ` Matthew Garrett
2009-04-03  1:17                                   ` david
2009-04-03  1:22                                     ` Matthew Garrett
2009-04-03  2:22                             ` Ric Wheeler
2009-04-02 21:47                         ` david
2009-04-06 21:32                     ` supporting laptops fs-semantic changes (was Re: Ext4 and the "30 second window of death") Linda Walsh
2009-04-02 11:37                   ` Ext4 and the "30 second window of death" Sitsofe Wheeler
2009-04-01  8:51             ` Andreas T.Auer
2009-04-03  7:13   ` Bojan Smojver
2009-04-05  4:07     ` Bojan Smojver
2009-04-05  4:51       ` Bojan Smojver
2009-04-05  5:41       ` Bojan Smojver
2009-04-05 17:27   ` Ed Tomlinson
  -- strict thread matches above, loose matches on Subject: below --
2009-04-05 18:13 Tomasz Chmielewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox