maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Ext4! (https://talk.maemo.org/showthread.php?t=71653)

vi_ 2011-03-30 16:54

Ext4!
 
According to this EXT4 is a much faster file system for flash media. Can I convert 2GB /opt partition to ext4? Is this a good idea or is there obvious fail I am oblivious to? (I am running power kernel 46 which has EXT4 support).

Discuss

bekkra 2011-03-31 07:26

Re: Ext4!
 
Real world performance analysis is non-trivial, especially on our Internet tablets, which are not made for achieving the best possible performance.

The opt files are already on ext3 which has reasonable performance on this device. I have seen no comparisons between the available file systems, so you will have to try this out.


---

The risks with repartitioning the internal eMMC are obvious; failure in mounting the /home and /opt directories lead to the infamous reboot loop from which there is no other way of recovery than reflashing.

As usual, you should back up what data you hold valuable before exploring the possibilities of the device beyond what the maker considered is normal use.

Good luck !

retsaw 2011-03-31 11:20

Re: Ext4!
 
Early versions of ext4 had issues, after a bit of googling I found this, is this issue fixed in the version of ext4 included with kernel power?

There is also the consideration that ext4 isn't included in the stock kernel, which might cause a problem if you need/want to switch back.

jprobichaud 2011-03-31 19:05

Re: Ext4!
 
why not brtfs like what MeeGo uses. it is quite performant and with the ability to compress on the fly, you could save some good space too! I must admit that I don't know if power-kernel does contain the support for btrfs...

JadeH 2011-04-01 01:25

Re: Ext4!
 
there's a patched compiled kernel somewhere in this subforum with btrfs (2 topics under this one right now), you might want to look into that

iDont 2011-04-09 14:51

Re: Ext4!
 
If anyone is still interested in this topic, I've created a wiki page on how to change the eMMC its filesystem:

http://wiki.maemo.org/Changing_the_eMMC_filesystem

I reformatted my /home as Reiser4 because of its transparent LZO compression support and the existence of a native kernel 2.6.28 patch. However, as it is not included in kernel-power I've oriented the wiki page as if you want to format the partition as ext4.

Additions to the wiki page are welcome of course :)

evan 2011-04-09 19:44

Re: Ext4!
 
thanks, very much for the wiki. I managed to convert /home to ext4 with your instructions.
So now I am dependent on power kernel I guess.

tenkom 2011-04-09 20:46

Re: Ext4!
 
Notice any improvement?

tHMZ 2011-04-09 20:56

Re: Ext4!
 
I am in bed and too lazy to Google, but is ext4 a memory format, like fat32? If you change to ext4, will you be able to store files larger than 4Gb?

Nokia 5700 2011-04-09 23:49

Re: Ext4!
 
Quote:

Originally Posted by tHMZ (Post 984741)
I am in bed and too lazy to Google, but is ext4 a memory format, like fat32? If you change to ext4, will you be able to store files larger than 4Gb?

Ext-filesystems with and beyond ext2 are capable of storing files larger than 4Gbs. Only FAT and alike that are 16-bit can't handle 4Gb files.

fasza2 2011-04-10 00:15

Re: Ext4!
 
When the fat file systems were created the developers didn't think that files larger then 4 GB will be used in the near future. FAT32 was created 15 years ago...

evan 2011-04-10 04:14

Re: Ext4!
 
the wiki guides you to convert the 2gb /home and not the big fat partition. I prefrer it that way,although tempted to resize the thing.
I think now it boots faster and operations like installing apps with appman is faster.
I tried some time with dd commands to test speed of wriiting files but it does not seem consistent, so there.

9000 2011-04-10 04:38

Re: Ext4!
 
ext4 is faster than ext2 and ext3 for transferring large amount of small files, while vfat is good for transferring small amount of large files. Therefore, if the purpose of your external flash is to store media files, you may not need to reformat.

In addition, without wear levelling, ext4 is not the best choice for flash media. I'm not sure if the latest development has included wear levelling in ext4, you may search 'wear levelling' in t.m.o for detail discussion.

iDont 2011-04-10 13:58

Re: Ext4!
 
Quote:

Originally Posted by evan (Post 984703)
thanks, very much for the wiki. I managed to convert /home to ext4 with your instructions.
So now I am dependent on power kernel I guess.

I'm glad to hear that :)
And yes, you must keep using a kernel that supports the chosen filesystem (like kernel-power).

Quote:

Originally Posted by 9000 (Post 984853)
ext4 is faster than ext2 and ext3 for transferring large amount of small files, while vfat is good for transferring small amount of large files. Therefore, if the purpose of your external flash is to store media files, you may not need to reformat.

In addition, without wear levelling, ext4 is not the best choice for flash media. I'm not sure if the latest development has included wear levelling in ext4, you may search 'wear levelling' in t.m.o for detail discussion.

I don't completely agree with your post.

First things first: as said in the post above yours, the wiki is about reformatting the /home partition, not the big vfat one. Maybe this should be made more clear in the wiki page. The "need" to reformat might be an overstatement, it's more like "want" to reformat. Don't forget that the majority of users don't want to repartition/change FS at all.

Anyway, judging by my (simple) benchmarks, ext4 is quicker in copying big files too. A more extensive benchmark is to be found here.

As far as I know wear-leveling, at least on the N900 its NAND flash, is not managed by the filesystem so this should be a non-issue.

9000 2011-04-10 14:38

Re: Ext4!
 
Quote:

Originally Posted by iDont (Post 985035)
I don't completely agree with your post.

;)

Quote:

Originally Posted by iDont (Post 985035)
First things first: as said in the post above yours, the wiki is about reformatting the /home partition, not the big vfat one. Maybe this should be made more clear in the wiki page. The "need" to reformat might be an overstatement, it's more like "want" to reformat. Don't forget that the majority of users don't want to repartition/change FS at all.

I am not commenting the wiki, nor whether there's a need to reformat all partition in N900. It's okay if one wants to format any partition with any fs, as long as they're willingly to take the risk.

I'm just commenting on the suitability of using ext4 fs on flash media. May be I should have stated it explicitly next time before posting. ;)

Quote:

Originally Posted by iDont (Post 985035)
Anyway, judging by my (simple) benchmarks, ext4 is quicker in copying big files too. A more extensive benchmark is to be found here.

Thank you for sharing the links. However, I found that neither of them include vfat in the benchmark, rather I found one here.

Nevertheless, I'm not going to defend for vfat. I've no sentimental attachment toward vfat, I'm glad to know ext4 is better than vfat.

For the performance, we can always do our own benchmark to convince ourself. There's no need to argue on that. Take it easy. ^^

Quote:

Originally Posted by iDont (Post 985035)
As far as I know wear-leveling, at least on the N900 its NAND flash, is not managed by the filesystem so this should be a non-issue.

Again I'm not talking about reformatting NAND, I'm just talking about ext4 on flash media. BTW, NAND in N900 is formatted in UBIFS, which does not work on top block device, but still it's a file-system anyway.

UBI itself is a wear-leveling subsystem but I'm not referring to that in my point. Without wear-leveling, ext4 is not the best choice for flash media. Ext4 does not handle wear-leveling in its original design, but flash manufacturers consider including wear-leveling in hardware so the problem would be solved in the future.

Just for your information.

iDont 2011-04-10 17:38

Re: Ext4!
 
Thank you for your elaborate post :)

Quote:

Originally Posted by 9000 (Post 985061)
I am not commenting the wiki, nor whether there's a need to reformat all partition in N900. It's okay if one wants to format any partition with any fs, as long as they're willingly to take the risk.

I'm just commenting on the suitability of using ext4 fs on flash media. May be I should have stated it explicitly next time before posting.

Ah, that explains a bit. Considering the topic, I assumed you were talking about the N900.

Quote:

Originally Posted by 9000 (Post 985061)
Thank you for sharing the links. However, I found that neither of them include vfat in the benchmark, rather I found one here.

Nevertheless, I'm not going to defend for vfat. I've no sentimental attachment toward vfat, I'm glad to know ext4 is better than vfat.

For the performance, we can always do our own benchmark to convince ourself. There's no need to argue on that. Take it easy. ^^

Same goes here. As you can't use vfat as /home, I saw no value in including it in the benchmark. We weren't talking about the same thing ;)

I'm with you about everyone convincing their selves. In fact, I performed the benchmark to decide for myself which FS to choose (or more precise: which Reiser4 mkfs options were the best), but I thought I could post a summary anyway as it might be of use to other people. No need to start a religious (filesystem) war indeed; I hoped to make that point by stating in the wiki that "there is no 'one size fits all' type of filesystem" :)

Quote:

Originally Posted by 9000 (Post 985061)
Again I'm not talking about reformatting NAND, I'm just talking about ext4 on flash media. BTW, NAND in N900 is formatted in UBIFS, which does not work on top block device, but still it's a file-system anyway.

UBI itself is a wear-leveling subsystem but I'm not referring to that in my point. Without wear-leveling, ext4 is not the best choice for flash media. Ext4 does not handle wear-leveling in its original design, but flash manufacturers consider including wear-leveling in hardware so the problem would be solved in the future.

Just for your information.

I mixed up some terms by stating NAND everywhere in my posts instead of eMMC. Of course ext4, or any 'regular' FS for that matter, can't be used on a raw flash device like the NAND. I've just corrected the name of the wiki page.

9000 2011-04-11 01:30

Re: Ext4!
 
Quote:

Originally Posted by iDont (Post 985128)
I'm with you about everyone convincing their selves. In fact, I performed the benchmark to decide for myself which FS to choose (or more precise: which Reiser4 mkfs options were the best), but I thought I could post a summary anyway as it might be of use to other people. No need to start a religious (filesystem) war indeed; I hoped to make that point by stating in the wiki that "there is no 'one size fits all' type of filesystem" :)

Yep reiser4 is the fastest fs around. It's a .....real killer :D

Since you're interested in that subject. FYI. I performed some tests on all the fs years ago for a major enterprise deployment. It's concluded that JFS scored the best on almost all categories, especially fault tolerant. Say you can cold boot the system multiple times during journal recovery without losing any data. Only jfs and ext3 can survive this test (survival of ext3 is obvious, as it's just ext2+plain text journal ;))

Tigerite 2011-05-20 11:04

Re: Ext4!
 
Quote:

Originally Posted by retsaw (Post 979081)
Early versions of ext4 had issues, after a bit of googling I found this, is this issue fixed in the version of ext4 included with kernel power?

There is also the consideration that ext4 isn't included in the stock kernel, which might cause a problem if you need/want to switch back.

From what I can tell, no. However, I generated a diff (which can be found here) between the 2.6.28.10 snapshot and latest on http://git.kernel.org/?p=linux/kerne...-stable-2.6.28 and fixed the few discrepancies, so that it now patches against kernel-power47 (and BFS ;) ). Some had already been applied, some had been partially applied and one had had "force_da_alloc=1" added whereas the diff had an if statement added as well (so I went with the latter).

Please note that the patch has been updated since my original post - I'd erroneously included part of the ioctl.c diff that had already been applied, and although it would patch successfully it wouldn't compile (due to a duplicate case statement).

PS: I tried Reiser4, even added an edit into the wiki, but I had to backtrack as it was hammering my CPU and also I had the dmesg errors even with cluster=32K. Basically, my N900 just didn't like it one bit, which is a real shame :( I'd love to try out btrfs, but I can't find a backport to 2.6.28 anywhere (and it's only really been stable since 2.6.32 anyway) so it's probably not worth the trouble.

evan 2011-05-20 12:55

Re: Ext4!
 
I should say that I am running /home on ext4 for over a month now and I have not had any incident with filesystem corruption.

vi_ 2011-05-20 13:00

Re: Ext4!
 
Quote:

Originally Posted by evan (Post 1011061)
I should say that I am running /home on ext4 for over a month now and I have not had any incident with filesystem corruption.

Do you 'feel' any improvment in emmc access?

evan 2011-05-20 13:12

Re: Ext4!
 
It's not about feelings. I compared with some measurements I had from before, creating and copying files and it is indeed faster, not by much, but faster. I would like to test it better but I have only one device. what I had not timed but I 'feel' is improved is starting of heavy apps, like maps and mypaint.

Tigerite 2011-05-20 13:30

Re: Ext4!
 
You may not have noticed any file corruption thusfar, but nevertheless, the kernel-power "shipped" ext4 doesn't have the patch from 2.6.30 which prevents it from happening. Hopefully, pali will include my diff in kernel-power48 but in the meantime you can compile your own with it (I have).

Tigerite 2011-05-20 13:37

Re: Ext4!
 
PS I also included all of the other ext4 "cherry-picks" for 2.6.28 that hadn't made it into kernel-power thusfar, namely the May 2009 git commits labelled "for-stable-2.6.28". This means that issues like this one won't occur either (albeit, that one's less likely to occur on an N900 - I'm not aware of anyone who works with 10GiB files in /home on a regular basis - but you never know..)

Radicalz38 2011-05-25 12:42

Re: Ext4!
 
@Tigerite
Since pali seem to have not compiled your patch would you mind providing to us a temporary binary (for those who don't use linux PC's and not into kernel compiling)

vi_ 2011-06-15 22:24

Re: Ext4!
 
Is there any kind of guide on converting mydocs to ext3/4?

A guide that deals with all the camera saving, mountng at boot time ramifications that is?

Alecsandru 2013-05-14 08:57

Re: Ext4!
 
any simple tutorial to mount ext4 as home , formatted , to ext4 , moved home to other partition
but i'm stucked

pichlo 2013-05-14 10:49

Re: Ext4!
 
Alecsandru, search is your friend:

http://wiki.maemo.org/Changing_the_eMMC_filesystem
http://wiki.maemo.org/Repartitioning_the_flash
http://talk.maemo.org/showthread.php?t=73478
http://talk.maemo.org/showthread.php?t=82175

(True, I searched for "home ext3" but a small update to the instructions is an easy exercise for the reader. BTW the last one also deals with the camera application which apparently some people had problems with.)

FWIW, I've fiddled with ext4 myself and it worked pretty well but the next BackupMenu restore reformatted opt back to ext3. I did not feel like fiddling with BackupMenu so I left it at that. ext4 might be faster but at a price: it achieves speed mostly by lazy writes which is not always safe if you unexpectedly reboot.

Alecsandru 2013-05-17 21:35

Re: Ext4!
 
I/ve formatted home to ext4 with gparted ,flashed firmware(now home is in nand) , now how to proceed to use the new ext4 as home ? installed kernel 52 ,leafpad and rootsh

Alecsandru 2013-05-18 10:11

Re: Ext4!
 
evrika....dam it's fast , but I have some problems with fapman and advanced clock plugin , fapman tells me that I have no notwork connection , but download and install softwares , the problem is that I can't update catalogs with fapman

seanmcken 2014-05-01 02:44

Re: Ext4!
 
any procedure to make this system fast ??????

Alecsandru 2014-05-13 16:11

Re: Ext4!
 
1 Attachment(s)
my way:
1* install backupmenu ,cssu-t , kernel-power , recovery-boot,
2*modify backupmenulauncher.item for ext4(search ext3 and replace with ext4 ,mkfs , fsck , etc, read before replace) , after that copy extrafiles.tar.gz extract it (search ext3 in content and replace with ext4 , MKFS ,FSCK ") after you have edited the files , archive back to extrafiles.tar.gz and replace them
the path is :usr/share/backupmenu
IF THAT IS TO COMPLICATED , YOU CAN USE MY FILES (atached to this post) ,
1) download and extract them to usr/share/backupmenu.
2)reboot
3) slide keyboard and let it open
4)enter to backupmenu and make a backup of both rootfs and optfs
save-it to internal storage "MyDocs" , it's faster
5)reboot
6)go to recovery boot : and type:
mkfs.ext4 /dev/mmcblk0p2 *(wait to complete)
7)reboot
8)enter to backmenu and restore your backup created *(if doesn't succeed from first atempt , repeat steps from 5 to 8)

after a successfull boot , we can tweak the ext4 to it's limits :D
coming next :)

Alecsandru 2014-05-13 16:33

Re: Ext4!
 
2 Attachment(s)
Tweaks for ext4
a)install leafpad
open terminal and enter:
root
leafpad /etc/evend.d/rcS-late (search for ext3 and replace with ext4)
reboot
slide keyboard and enter to recovery-console and type:
tune2fs -m 0 /dev/mmcblk0p2 (removes the reserved space)
reboot to maemo
b)
copy mount-opts-overwrite to /etc/default/
copy fstab to /etc/
reboot and voila

files are in the archive atached to this post

A new life for n900 put ext4 plus ext4 tweaks + the other tweaks (hw of hildon , swap on sd , oc, decrease swapiness ,dsp oc plus codecs) and you have a new phone :cool:

seanmcken 2014-05-14 14:25

Re: Ext4!
 
Is really important to have swap on sd to get ext4 on my phone? Cuz i cant afford sd and i dnt have it. Please tell

seanmcken 2014-05-16 06:08

Re: Ext4!
 
OPT as ext4 is it possible?

Alecsandru 2014-05-17 16:04

Re: Ext4!
 
this is optfs as ext4 , doable on phone without killing yourself with the terminal , when backupmenu restores a backup it formats optfs with ext4 instead of ext3 , that is the magic , sd swap isn't necessary for this
read instructions twice because this mod can make your phone unbootable


All times are GMT. The time now is 09:06.

vBulletin® Version 3.8.8