public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ext3 fs: no userspace writes == no disk writes ?
@ 2002-09-19 22:30 Rob van Nieuwkerk
  2002-09-19 23:04 ` Andrew Morton
  0 siblings, 1 reply; 11+ messages in thread
From: Rob van Nieuwkerk @ 2002-09-19 22:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: robn

Hi all,

I have a question about ext3 write activity.

I am considering using an ext3 fs on a CompactFlash disk for my
data-logging application (power can disapear anytime).
The quantity & frequency of the data logged itself is not a
problem at all considering flash wear.

But I'm a bit worried about the kernel/ext3 doing regular writes
by itself even when there are no userspace writes.  (worries are
partially caused by memories from long time ago about idle laptop
doing regular writes on disk).

Anybody out there who knows how this works ?

Can I use an ext3 fs without having regular "automatic" writes to
the device it is located on ?  (and thus not destroy my CompactFlash
devices !)

	greetings,
	Rob van Nieuwkerk


PS1: of course nothing from userspace should write frequently to
    the fs, and if there is regular read-activity the fs should
    be mounted with "noatime")

PS2: yes, I know that jffs exists

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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-19 22:30 ext3 fs: no userspace writes == no disk writes ? Rob van Nieuwkerk
@ 2002-09-19 23:04 ` Andrew Morton
  2002-09-19 23:25   ` Alan Cox
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Morton @ 2002-09-19 23:04 UTC (permalink / raw)
  To: Rob van Nieuwkerk; +Cc: linux-kernel

Rob van Nieuwkerk wrote:
> 
> Hi all,
> 
> I have a question about ext3 write activity.
> 
> I am considering using an ext3 fs on a CompactFlash disk for my
> data-logging application (power can disapear anytime).
> The quantity & frequency of the data logged itself is not a
> problem at all considering flash wear.
> 
> But I'm a bit worried about the kernel/ext3 doing regular writes
> by itself even when there are no userspace writes.  (worries are
> partially caused by memories from long time ago about idle laptop
> doing regular writes on disk).

Should be OK - it's a matter of careful monitoring and
tuning of system activity.

There are frequently written areas of an ext3 filesystem - the
journal, the superblock.  Those would wear out pretty quickly.

Increasing the commit interval to the maximum acceptable time
would reduce some of this wear and tear.

There seems to be some interest in doing this.  Might be helpful
to ask on ext3-users: https://listman.redhat.com/mailman/listinfo/ext3-users

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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-19 23:04 ` Andrew Morton
@ 2002-09-19 23:25   ` Alan Cox
  2002-09-19 23:52     ` Rob van Nieuwkerk
  0 siblings, 1 reply; 11+ messages in thread
From: Alan Cox @ 2002-09-19 23:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Rob van Nieuwkerk, linux-kernel

On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
> There are frequently written areas of an ext3 filesystem - the
> journal, the superblock.  Those would wear out pretty quickly.

CF is -supposed- to wear level.

> Increasing the commit interval to the maximum acceptable time
> would reduce some of this wear and tear.

Other one is the usual laptop noatime setting


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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-19 23:25   ` Alan Cox
@ 2002-09-19 23:52     ` Rob van Nieuwkerk
  2002-09-20  9:04       ` Padraig Brady
  0 siblings, 1 reply; 11+ messages in thread
From: Rob van Nieuwkerk @ 2002-09-19 23:52 UTC (permalink / raw)
  To: Alan Cox; +Cc: robn, linux-kernel, Andrew Morton


Hi Alan,

> On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
> > There are frequently written areas of an ext3 filesystem - the
> > journal, the superblock.  Those would wear out pretty quickly.
> 
> CF is -supposed- to wear level.

Yes I know.

But I haven't been able to find any specs from any CF manufacturer
about this mechanism, percentage of spare sectors or number of allowed
write-cycles in general.  Does it work by writing and than reading it
back and if it's different remapping the sector from a pool of spare
sectors ?

My guess is that it will work OK in a typical CF-in-a-camera situation:
after some thousands of photo's something gets remapped without the
user noticing.

But if you write every few seconds to the same block(s) (journal and/or
superblock, which I was/am afraid of happening with ext3 in my original
question) you'll run out of remap sectors and kill any CF reliably
within a couple of days.  Suppose there is a write to a certain sector
every 5 seconds and assume a 100000 allowed writecycles (I read this
number several times in several flashdocs, but not in any CF docs ..).
That results in a lifetime of 5.8 days for this particular sector.
Then it gets remapped.  How long you can get away with this depends on
how many "hot" sectors like this you have in your fs and how many spares
are available on your CF.  But in the (not so far away) end you *will* kill
your CF I think.

Now if there are NO kernel/ext3 "automatic" writes and your application
has the right behaviour (mine has I think) using ext3 on CF looks like
a nice, easy & stable solution in which killing your CF takes many years :-)

	greetings,
	Rob van Nieuwkerk

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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-19 23:52     ` Rob van Nieuwkerk
@ 2002-09-20  9:04       ` Padraig Brady
  2002-09-20  9:09         ` Rob van Nieuwkerk
  0 siblings, 1 reply; 11+ messages in thread
From: Padraig Brady @ 2002-09-20  9:04 UTC (permalink / raw)
  To: Rob van Nieuwkerk; +Cc: linux-kernel, Andrew Morton

Rob van Nieuwkerk wrote:
> Hi Alan,
> 
>>On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
>>
>>>There are frequently written areas of an ext3 filesystem - the
>>>journal, the superblock.  Those would wear out pretty quickly.
>>
>>CF is -supposed- to wear level.
> 
> Yes I know.
> 
> But I haven't been able to find any specs from any CF manufacturer
> about this mechanism, percentage of spare sectors or number of allowed
> write-cycles in general.

me either.

Why don't you just mount the fs ro ?

Pádraig


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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-20  9:04       ` Padraig Brady
@ 2002-09-20  9:09         ` Rob van Nieuwkerk
  2002-09-20  9:15           ` Padraig Brady
  0 siblings, 1 reply; 11+ messages in thread
From: Rob van Nieuwkerk @ 2002-09-20  9:09 UTC (permalink / raw)
  To: Padraig Brady; +Cc: Rob van Nieuwkerk, linux-kernel, Andrew Morton


Hi Pádraig,

Pádraig Brady wrote:
> Rob van Nieuwkerk wrote:
> > Hi Alan,
> > 
> >>On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
> >>
> >>>There are frequently written areas of an ext3 filesystem - the
> >>>journal, the superblock.  Those would wear out pretty quickly.
> >>
> >>CF is -supposed- to wear level.
> > 
> > Yes I know.
> > 
> > But I haven't been able to find any specs from any CF manufacturer
> > about this mechanism, percentage of spare sectors or number of allowed
> > write-cycles in general.
> 
> me either.
> 
> Why don't you just mount the fs ro ?
> 
> Pádraig

Ehm .., because I need to store data on it ..

	greetings,
	Rob van Nieuwkerk

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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-20  9:09         ` Rob van Nieuwkerk
@ 2002-09-20  9:15           ` Padraig Brady
  2002-09-20  9:19             ` Padraig Brady
  2002-09-20  9:23             ` Rob van Nieuwkerk
  0 siblings, 2 replies; 11+ messages in thread
From: Padraig Brady @ 2002-09-20  9:15 UTC (permalink / raw)
  To: Rob van Nieuwkerk; +Cc: linux-kernel, Andrew Morton

Rob van Nieuwkerk wrote:
> Hi Pádraig,
> 
> Pádraig Brady wrote:
> 
>>Rob van Nieuwkerk wrote:
>>
>>>Hi Alan,
>>>
>>>
>>>>On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
>>>>
>>>>
>>>>>There are frequently written areas of an ext3 filesystem - the
>>>>>journal, the superblock.  Those would wear out pretty quickly.
>>>>
>>>>CF is -supposed- to wear level.
>>>
>>>Yes I know.
>>>
>>>But I haven't been able to find any specs from any CF manufacturer
>>>about this mechanism, percentage of spare sectors or number of allowed
>>>write-cycles in general.
>>
>>me either.
>>
>>Why don't you just mount the fs ro ?
>>
>>Pádraig
> 
> 
> Ehm .., because I need to store data on it ..

Ehm, well remount,rw before you store data on it
and remount,ro when finished?

Pádraig.


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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-20  9:15           ` Padraig Brady
@ 2002-09-20  9:19             ` Padraig Brady
  2002-09-20  9:26               ` Rob van Nieuwkerk
  2002-09-20  9:23             ` Rob van Nieuwkerk
  1 sibling, 1 reply; 11+ messages in thread
From: Padraig Brady @ 2002-09-20  9:19 UTC (permalink / raw)
  To: Rob van Nieuwkerk; +Cc: linux-kernel, Andrew Morton

Padraig Brady wrote:
> Rob van Nieuwkerk wrote:
> 
>> Hi Pádraig,
>>
>> Pádraig Brady wrote:
>>
>>> Rob van Nieuwkerk wrote:
>>>
>>>> Hi Alan,
>>>>
>>>>
>>>>> On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
>>>>>
>>>>>
>>>>>> There are frequently written areas of an ext3 filesystem - the
>>>>>> journal, the superblock.  Those would wear out pretty quickly.
>>>>>
>>>>>
>>>>> CF is -supposed- to wear level.
>>>>
>>>>
>>>> Yes I know.
>>>>
>>>> But I haven't been able to find any specs from any CF manufacturer
>>>> about this mechanism, percentage of spare sectors or number of allowed
>>>> write-cycles in general.
>>>
>>>
>>> me either.
>>>
>>> Why don't you just mount the fs ro ?
>>>
>>> Pádraig
>>
>>
>>
>> Ehm .., because I need to store data on it ..
> 
> 
> Ehm, well remount,rw before you store data on it
> and remount,ro when finished?

Note you can organise things (links from /etc/various /dev/various /var
to ramdisk/tmpfs/...) so that you never have to mount the CF rw.

Pádraig.


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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-20  9:15           ` Padraig Brady
  2002-09-20  9:19             ` Padraig Brady
@ 2002-09-20  9:23             ` Rob van Nieuwkerk
  1 sibling, 0 replies; 11+ messages in thread
From: Rob van Nieuwkerk @ 2002-09-20  9:23 UTC (permalink / raw)
  To: Padraig Brady; +Cc: Rob van Nieuwkerk, linux-kernel

> Rob van Nieuwkerk wrote:
> > Hi Pádraig,
> > 
> > Pádraig Brady wrote:
> > 
> >>Rob van Nieuwkerk wrote:
> >>
> >>>Hi Alan,
> >>>
> >>>
> >>>>On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
> >>>>
> >>>>
> >>>>>There are frequently written areas of an ext3 filesystem - the
> >>>>>journal, the superblock.  Those would wear out pretty quickly.
> >>>>
> >>>>CF is -supposed- to wear level.
> >>>
> >>>Yes I know.
> >>>
> >>>But I haven't been able to find any specs from any CF manufacturer
> >>>about this mechanism, percentage of spare sectors or number of allowed
> >>>write-cycles in general.
> >>
> >>me either.
> >>
> >>Why don't you just mount the fs ro ?
> >>
> >>Pádraig
> > 
> > 
> > Ehm .., because I need to store data on it ..
> 
> Ehm, well remount,rw before you store data on it
> and remount,ro when finished?
> 
> Pádraig.

Will think about it.  Wondering how much this would impact performance
(in my application).

	greetings,
	Rob van Nieuwkerk

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

* Re: ext3 fs: no userspace writes == no disk writes ?
  2002-09-20  9:19             ` Padraig Brady
@ 2002-09-20  9:26               ` Rob van Nieuwkerk
  0 siblings, 0 replies; 11+ messages in thread
From: Rob van Nieuwkerk @ 2002-09-20  9:26 UTC (permalink / raw)
  To: Padraig Brady; +Cc: Rob van Nieuwkerk, linux-kernel

> Padraig Brady wrote:
> > Rob van Nieuwkerk wrote:
> > 
> >> Hi Pádraig,
> >>
> >> Pádraig Brady wrote:
> >>
> >>> Rob van Nieuwkerk wrote:
> >>>
> >>>> Hi Alan,
> >>>>
> >>>>
> >>>>> On Fri, 2002-09-20 at 00:04, Andrew Morton wrote:
> >>>>>
> >>>>>
> >>>>>> There are frequently written areas of an ext3 filesystem - the
> >>>>>> journal, the superblock.  Those would wear out pretty quickly.
> >>>>>
> >>>>>
> >>>>> CF is -supposed- to wear level.
> >>>>
> >>>>
> >>>> Yes I know.
> >>>>
> >>>> But I haven't been able to find any specs from any CF manufacturer
> >>>> about this mechanism, percentage of spare sectors or number of allowed
> >>>> write-cycles in general.
> >>>
> >>>
> >>> me either.
> >>>
> >>> Why don't you just mount the fs ro ?
> >>>
> >>> Pádraig
> >>
> >>
> >>
> >> Ehm .., because I need to store data on it ..
> > 
> > 
> > Ehm, well remount,rw before you store data on it
> > and remount,ro when finished?
> 
> Note you can organise things (links from /etc/various /dev/various /var
> to ramdisk/tmpfs/...) so that you never have to mount the CF rw.

Yes I know.  That will happen for the root partition anyway.
The whole discussion is about a dedicated data logging partition/fs
on the CF.

	greetings,
	Rob van Nieuwkerk

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

* Re: ext3 fs: no userspace writes == no disk writes ?
@ 2002-09-20 23:31 Ricardo Galli
  0 siblings, 0 replies; 11+ messages in thread
From: Ricardo Galli @ 2002-09-20 23:31 UTC (permalink / raw)
  To: robn, linux-kernel

> Can I use an ext3 fs without having regular "automatic" writes to
> the device it is located on ? (and thus not destroy my CompactFlash
> devices !)

I was going to write you directly, but I prefered to translate to English a 
previous article I had written in Spanish that explain how to save battery 
energy in an iBook with ext3. Hope it helps:

http://bulmalug.net/body.phtml?nIdNoticia=1510


-- 
  ricardo galli       GPG id C8114D34
       A paperless office has about as much a chance as a paperless bathroom

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

end of thread, other threads:[~2002-09-20 23:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-19 22:30 ext3 fs: no userspace writes == no disk writes ? Rob van Nieuwkerk
2002-09-19 23:04 ` Andrew Morton
2002-09-19 23:25   ` Alan Cox
2002-09-19 23:52     ` Rob van Nieuwkerk
2002-09-20  9:04       ` Padraig Brady
2002-09-20  9:09         ` Rob van Nieuwkerk
2002-09-20  9:15           ` Padraig Brady
2002-09-20  9:19             ` Padraig Brady
2002-09-20  9:26               ` Rob van Nieuwkerk
2002-09-20  9:23             ` Rob van Nieuwkerk
  -- strict thread matches above, loose matches on Subject: below --
2002-09-20 23:31 Ricardo Galli

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