ext2/3/4 group size

Arnd Bergmann arnd at arndb.de
Sun Apr 3 22:01:13 EDT 2011


On Saturday 02 April 2011, Yioryos Asprobounitis wrote:

> 
> Thanks for the info.
> I got a new Transcend 4GB class 10 card: oemid 0x4142(AB???), manfid 0x00001e(RS???), hwrev 0x1, fwrev 0x0, serial 0x00000aec 
> and I checked it with flashbench when formatted as vfat (factory) 
> standard ext3 (mkfs.ext3 /dev/mmcblk0p1) 
> and ext3 with groups aligning to the 4MB erase block (mkfs.ext3 -b 4096 -i 4096 -g 1024 -m 2 -O ^resize_inode  /dev/mmcblk0p1)

I'm sorry you did extra work here. Flashbench ignores the file system
entirely and just writes to the raw blocks. In fact, the existing file
system normally gets destroyed by flashbench and you should reformat
it afterwards.

> Could not see any difference other than that in the last case the 4MB and 16KB (page size?!) boundaries where much more clear.

The difference is because in the last case, the blocks have been written once,
while in the others they were in erased state. I'm surprised to hear that the
difference is so big, but it makes sense. So at least I learned something
from your experiment.

Note that when writing one block group per 4 MB, the card will have to write
every single erase block on the disk, so it takes about the same time as
writing the entire card with dd. Using the uninit_bg option in mk2fs probably
improves this.

> However, and despite the ability of the card to have 5 blocks open the card performed terribly in real life giving often I/O errors.
> This was corrected when the ext3 file system was was made with 1KB, instead of the default 4KB block size, ie the `-b 1024' argument :?
> However, under these conditions the card became considerably slower in real life use (though flashbench detected no difference)

Right, you should never use anything but the largest possible block size. Your card has
a native page size of 16 KB, so writing a single 1 KB block takes the same time
as writing 16 KB that are naturally aligned.

I hope you still have warrenty on the card. As soon as you get I/O errors, you should
consider it broken, and get a refund. It definitely should not happen on a brand new
card.

Further notes: I have never seen OEM "AB" or manfid 0x1e before, but that doesn't
mean much. The serial number 0x0aec is really low, which could indicate that it's
not from any large production run and could be very low quality. While the algorithm
is relatively good (random access with 5 erase blocks at full speed), having only
7.3 MB/s as the maximum in linear access is definitely not enough to get the class 10
rating, which is another reason to return the card to the shop. You could also send
a photograph of the card to the manufacturer and ask them to confirm its authenticity.

	Arnd



More information about the Devel mailing list