Skip to contentSkip to conversation

ReiserFS on a flash device?

DISCUSSION Steve Snyder 4 participants 8 messages Jul 26, 2003 – Jul 28, 2003

lore
Share & tools
lore
#0 lore raw

I was taken aback by Yury Umanets' recent suggestion
(http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&safe=off&th=d50aa0bf6c7f26d0&seekm=1059231274.28094.40.camel%40haron.namesys.com.lucky.linux.kernel#link11)
that ReiserFS is not an appropriate for a flash device.

I am currently using it (via Linux kernel v2.4.21) on an E-Disk
(http://www.bitmicro.com/products_edisk_35_scsiw.php) flash device as the front-end of a low-traffic Squid Web cache. The Squid experts recommend the use of ReiserFS (with the notail option) for it's superior performance in handling lots of small files. I understand that flash has a finite number of write cycles, but for this application performance is critical, and disk I/O (access times, not STR) is the bottleneck in Squid performance.

A quote from the post referred to above:

Quoted 5 lines

But, if you are still want to use reiserfs for flash device, you should do at least the following:

(1) Make the journal substantial smaller of size.
(2) Don't turn tails off. This is useful to prolong flash live.

More detail, please? How is journal size a factor? How does notails reduce flash longevity?

Thanks.

#1 lore raw

I wanted to use ReiserFS for an embedded system, but on a 32 or 64 meg CF card, v3 takes up too much of it for a journal, so it wasn't practical. Is there a way to make the journal much smaller, or have it grow on-demand rather than being fixed-size? In practice the CF card won't be written to very much (for longevity reasons), but I don't ever want an embedded system to waste time fscking itself and prompting what to do about any errors; and at the same time don't see why it should be required to be a read-only filesystem, as is often done, because it makes the occasional upgrade harder. And apparently JFFS2 is only for simple memory-mapped FLASH chips without built-in write-balancing like CF cards have.

I use the mainstream ReiserFS in Linus' kernels on all my home machines and love it. It's so fast and stable as a rock, and the only problems I've had were hardware-related.

Quoted 27 lines · Steve Snyder

I was taken aback by Yury Umanets' recent suggestion
(http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&safe=off&th=d50aa0bf6c7f26d0&seekm=1059231274.28094.40.camel%40haron.namesys.com.lucky.linux.kernel#link11)
that ReiserFS is not an appropriate for a flash device.

I am currently using it (via Linux kernel v2.4.21) on an E-Disk
(http://www.bitmicro.com/products_edisk_35_scsiw.php) flash device as the front-end of a low-traffic Squid Web cache. The Squid experts recommend the use of ReiserFS (with the notail option) for it's superior performance in handling lots of small files. I understand that flash has a finite number of write cycles, but for this application performance is critical, and disk I/O (access times, not STR) is the bottleneck in Squid performance.

A quote from the post referred to above:

Quoted 5 lines

But, if you are still want to use reiserfs for flash device, you should do at least the following:

(1) Make the journal substantial smaller of size.
(2) Don't turn tails off. This is useful to prolong flash live.

More detail, please? How is journal size a factor? How does notails reduce flash longevity?

Thanks.

Signature · 3 lines
  _______                                                Shawn T. Rutledge
 (_  | |_)                      [email protected] * http://ecloud.org:8080
 __) | | \________________________________________________________________
#3 lore raw
In reply to Steve Snyder
Quoted 11 lines · Steve Snyder

I was taken aback by Yury Umanets' recent suggestion
(http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&safe=off&th=d50aa0bf6c7f26d0&seekm=1059231274.28094.40.camel%40haron.namesys.com.lucky.linux.kernel#link11)
that ReiserFS is not an appropriate for a flash device.

I am currently using it (via Linux kernel v2.4.21) on an E-Disk
(http://www.bitmicro.com/products_edisk_35_scsiw.php) flash device as the front-end of a low-traffic Squid Web cache.

The Squid experts recommend
the use of ReiserFS (with the notail option) for it's superior performance in handling lots of small files.

Yes, but they probably did not mean use it with flash device?

Actually I have took a look onto edisk specifications. It has SCSI interface. System will not be concerned about its physical details. Also it has lots of data security features, and probably you should not be worry about its exhausting :)

Quoted 8 lines

I understand that flash has
a finite number of write cycles, but for this application performance is critical, and disk I/O (access times, not STR) is the bottleneck in Squid performance.

A quote from the post referred to above:

Quoted 7 lines
Quoted 5 lines

But, if you are still want to use reiserfs for flash device, you should do at least the following:

(1) Make the journal substantial smaller of size.
(2) Don't turn tails off. This is useful to prolong flash live.

More detail, please? How is journal size a factor?

Default journal size is too big (32MB) for usual embedded device. I mean, that flash is expensive and it is pity to loss 32MB for journal :)

Quoted 2 lines

How does notails
reduce flash longevity?

Tail policy "tails turned on" causes do not use redundant block (4K) for small piece of data, as it may be saved in tree. This may be considered as compression with very bad rate :)

Quoted 4 lines

Thanks.

Signature · 1 line
We're flying high, we're watching the world passes by...
#2 lore raw
In reply to Shawn Rutledge
Quoted 5 lines · Shawn Rutledge

I wanted to use ReiserFS for an embedded system, but on a 32 or 64 meg CF card, v3 takes up too much of it for a journal, so it wasn't practical.

Is there a way to make the journal much smaller, or have it grow on-demand rather than being fixed-size?

You can use smaller journal. Say 512 blocks (2MB). And in this case you need patches for supporting non-standard journal. Or use last kernel pre or wait next kernel release.

If you want boot from that flash with non-standard reiserfs on it, use GRUB patch from our website for supporting non-standard journal.

Quoted 11 lines

In practice the CF card won't
be written to very much (for longevity reasons), but I don't ever want an embedded system to waste time fscking itself and prompting what to do about any errors; and at the same time don't see why it should be required to be a read-only filesystem, as is often done, because it makes the occasional upgrade harder.

And apparently JFFS2 is only for simple
memory-mapped FLASH chips without built-in write-balancing like CF cards have.

As I know, JFFS2 uses compression for storing data. And if so, driver cannot map flash data to memory.

Quoted 33 lines

I use the mainstream ReiserFS in Linus' kernels on all my home machines and love it. It's so fast and stable as a rock, and the only problems I've had were hardware-related.

Quoted 27 lines · Steve Snyder

I was taken aback by Yury Umanets' recent suggestion
(http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&safe=off&th=d50aa0bf6c7f26d0&seekm=1059231274.28094.40.camel%40haron.namesys.com.lucky.linux.kernel#link11)
that ReiserFS is not an appropriate for a flash device.

I am currently using it (via Linux kernel v2.4.21) on an E-Disk
(http://www.bitmicro.com/products_edisk_35_scsiw.php) flash device as the front-end of a low-traffic Squid Web cache. The Squid experts recommend the use of ReiserFS (with the notail option) for it's superior performance in handling lots of small files. I understand that flash has a finite number of write cycles, but for this application performance is critical, and disk I/O (access times, not STR) is the bottleneck in Squid performance.

A quote from the post referred to above:

Quoted 5 lines

But, if you are still want to use reiserfs for flash device, you should do at least the following:

(1) Make the journal substantial smaller of size.
(2) Don't turn tails off. This is useful to prolong flash live.

More detail, please? How is journal size a factor? How does notails reduce flash longevity?

Thanks.

Signature · 1 line
We're flying high, we're watching the world passes by...
#4 lore raw
In reply to Yury Umanets
Quoted 2 lines · Yury Umanets

Default journal size is too big (32MB) for usual embedded device. I mean, that flash is expensive and it is pity to loss 32MB for journal :)

What? You mean it isn't reduced in size based on block device size like with ext3?

IIRC, it defaults to 2-4MB on a 100MB device.

#5 lore raw
Quoted 6 lines · Mike Fedyk
Quoted 2 lines · Yury Umanets

Default journal size is too big (32MB) for usual embedded device. I mean, that flash is expensive and it is pity to loss 32MB for journal :)

What? You mean it isn't reduced in size based on block device size like with ext3?

Yes, is isn't. Use reiserfstune to make it smaller.

Quoted 2 lines

IIRC, it defaults to 2-4MB on a 100MB device.

Signature · 1 line
We're flying high, we're watching the world passes by...
#6 lore raw
Quoted 9 lines · Yury Umanets
Quoted 6 lines · Mike Fedyk
Quoted 2 lines · Yury Umanets

Default journal size is too big (32MB) for usual embedded device. I mean, that flash is expensive and it is pity to loss 32MB for journal :)

What? You mean it isn't reduced in size based on block device size like with ext3?

Yes, is isn't. Use reiserfstune to make it smaller.

Well I'm glad to hear it's possible to use ReiserFS on small devices, but I think that requiring a kernel patch, or a GRUB patch, to handle different journal sizes is not good. Are there plans to have the kernel and GRUB detect it at runtime?

Signature · 3 lines
  _______                                                Shawn T. Rutledge
 (_  | |_)                      [email protected] * http://ecloud.org:8080
 __) | | \________________________________________________________________
#7 lore raw
Quoted 9 lines · Shawn Rutledge
Quoted 8 lines · Yury Umanets
Quoted 6 lines · Mike Fedyk
Quoted 2 lines · Yury Umanets

Default journal size is too big (32MB) for usual embedded device. I mean, that flash is expensive and it is pity to loss 32MB for journal :)

What? You mean it isn't reduced in size based on block device size like with ext3?

Quoted 7 lines
Quoted 1 line

Yes, is isn't. Use reiserfstune to make it smaller.

Well I'm glad to hear it's possible to use ReiserFS on small devices, but I think that requiring a kernel patch, or a GRUB patch, to handle different journal sizes is not good. Are there plans to have the kernel and GRUB detect it at runtime?

Support for non-standard journal is merged to kernel recently. Use last pre or wait until next stable kernel is released.

GRUB is able to with with it too. Use ftp://ftp.namesys.com/pub/misc-patches/grub-0.93-reiserfs-non-standard-journal.diff for that.

Regards.

Signature · 1 line
We're flying high, we're watching the world passes by...