Make the SD-card ext2, and it turns extremely slow?


moxie

The voice of reason, sense and exasperation
Staff member
Joined
Aug 15, 2006
Messages
2,704
Age
52
Location
South of Sweden
Quick sanity check here:

I copied all of the stuff on my SD-card to a directory, reformatted it to ext2 (by using fdisk to change the type and then mkfs.ext2 - The old-fashioned way), then copied everything back - And suddenly everything is s-l-o-w  a--s   h---e---l------l----! Starting up firefox takes 5-6 minutes, and the SD-card activity LED is on all the time. Deleting a directory with content (rm -rf appdata/foo/, for instance) takes several minutes. Something is weird. I see nothing weird in, for instance, dmesg, but I seem to have noticed the same effect when I used the card in the card reader (whilst copying stuff back). So, question:

* Is there any rational explanation why an SD-card would be extremely slow with ext2, but be reasonably spiffy with vfat?

* If not, where should I look to figure out what the error is? 
 
no clue, never used ext2. Its old. 20 years is a long long time.. Why not try ext4 or at least ext3(its safer). I don't see any benefit from using ext2
 
Last edited by a moderator:
By the way, is ext4 safe to use on Pandora ? No issue with the format itself ? Would there be any difference between ext4 format and FAT32 in terms of speed/reactivity of the system ? 
 
My SD card is ext2 formatted. Personally I am wary of using a journalling filesystem on removable media.  I did notice to my surprise the other day when copying files from a FAT formatted microSD card that the ext2 formatted full size SD did seem busier than the FAT microSD, which surprised me - although the full sized SD is a 64GB SDXC card while the microSD was some size of SDHC which might explain things.

My system isn't nearly as slow as yours though.  In use it's still pretty nippy.
 
no clue, never used ext2. Its old. 20 years is a long long time.. Why not try ext4 or at least ext3(its safer). I don't see any benefit from using ext2
Well, my reasoning is that I prefer to do something simple. Ext3 is, if I'm not completely mistaken, ext2+journal, and thus using ext2 over ext3 means there are less writes (as Levi alluded to) and less complexity. Breaks easier, of course, but is simpler.

Still: The problem cannot reasonably be that I used ext2 over ext3 - If anything, the journal writes would have locked things up even more. Any other ideas?
 
My cards are ext2-formatted.  They were very slow when deleting folders or opening archives.  I fixed this by modifying /etc/udev/scripts/mount.sh and changing it so it didn't mount them with the 'dirsync' option (there's 3 references to 'dirsync' in that file, 2 at line 39, 1 at line 47).  Without this option though, you'll need to unmount the cards before ejecting them, to ensure you don't lose data (this isn't a issue for me, because I have the same cards permanently in the same slots). 
 
Maybe it's just the FTL that gets confused, as you may already know they are sometimes that optimized for FAT based filesystems by using dirty hacks that they are going rampage with other filesystems.
 
Hm. That bit was also interesting. How would I recognize if my card is one of Those?
 
Don't know, I'd just test some other non-FAT filesystems like ReiserFS or the like to see if there's more weirdness. Eventually someone already did some more testing and you'll find the result in the compatibility list in the Wiki.
 
Both my main Linux computers are running ext2 from flash drives and one of them has been doing so for years with no complaints. I take note of the dire warnings above, but I suspect I'll have long stopped using whatever flash device long before it even thinks of failing due to an imperfect format. I'd be interested in sorting out my partitions for performance reasons if it were easy, but it appears it's not, and I can more than live with my current performance levels as is.
 
My problem is not that I worry about breaking the SD-card, but that it turns out to be extremely slow. Unfortunately, it doesn't seem to change when I followed this advice (to the best of my understanding, anyway) :(
 
I'm curious about ReiserFS too, I've heard its performance is killer.
what-you-did-there-i-see-it.thumbnail.jpg
 
* Is there any rational explanation why an SD-card would be extremely slow with ext2, but be reasonably spiffy with vfat?
First, try running `dmesg` in a terminal, to see if the kernel is having any trouble with your SD card.  If you have a Linux PC, try to see if it also runs slow with the PC.

If you deleted and re-created the partition, or it was wrong to begin with, the blocks won't be aligned correctly and it would be slower.  As I understand, the first partition should start at 4MB, not .  Here's the wiki page about partitioning and formatting SD cards, check the "Partitions" section.  Try that parted command on a Linux PC (or on Pandora if you can find it), or use the Panasonic SD formatter then fix the partition type and reformat.

By the way, is ext4 safe to use on Pandora ? No issue with the format itself ? Would there be any difference between ext4 format and FAT32 in terms of speed/reactivity of the system ? 
I'm using ext4 on two SD cards, it works well and I suppose avoids corruption / slow fsck issues that you would have with FAT or ext2.  I think either ext4 or ext2 should out-perform FAT.  From my experience, I can recommend to use ext4.  And fast SD cards of course.
 
Last edited by a moderator:
Back
Top