Hello,
I thought I'd poke about with the eMMC in the Galaxy S4 which I have here to see if it supported a sufficient number of AUs to be worth switching to f2fs (I believe you need 7 simultaneous AUs minimum?).
Had a go at determining AUs, but I don't think I'm seeing any performance drop-off, but not sure if I'm doing something wrong?
Cheers,
Tim.
root@localhost:/# cd /sys/block/mmcblk0/device/ && grep ^ * 2> /dev/null caps:0x40080f4e caps2:0x00031927 cid:110100303136473934b0d49cac223006 csd:d00e00320f5903ffffffffff92400024 date:03/1997 enhanced_area_offset:18446744073709551594 enhanced_area_size:4294967274 erase_size:4194304 erase_type:MMC_CAP_ERASE enabled, type DISCARD, SECURE supportable, Sanitize enabled fwdate:0x0000000000000000 fwrev:0x0 hwrev:0x0 manfid:0x000011 name:016G94 oemid:0x0100 preferred_erase_size:4194304 serial:0xd49cac22 smart:0x0000000000000000 type:MMC uevent:DRIVER=mmcblk uevent:MMC_TYPE=MMC uevent:MMC_NAME=016G94 uevent:MODALIAS=mmc:block
root@localhost:/# flashbench -a /dev/block/mmcblk0 align 4294967296 pre 458µs on 523µs post 484µs diff 52.3µs align 2147483648 pre 445µs on 580µs post 501µs diff 107µs align 1073741824 pre 436µs on 549µs post 488µs diff 87.2µs align 536870912 pre 419µs on 475µs post 445µs diff 43.6µs align 268435456 pre 436µs on 497µs post 453µs diff 52.3µs align 134217728 pre 471µs on 549µs post 532µs diff 48µs align 67108864 pre 532µs on 562µs post 541µs diff 26.2µs align 33554432 pre 510µs on 593µs post 549µs diff 63.2µs align 16777216 pre 645µs on 724µs post 680µs diff 61µs align 8388608 pre 637µs on 702µs post 663µs diff 52.3µs align 4194304 pre 767µs on 859µs post 798µs diff 76.3µs align 2097152 pre 776µs on 841µs post 802µs diff 52.3µs align 1048576 pre 772µs on 846µs post 798µs diff 61µs align 524288 pre 776µs on 824µs post 811µs diff 30.5µs align 262144 pre 789µs on 793µs post 785µs diff 6.54µs align 131072 pre 789µs on 802µs post 793µs diff 10.9µs align 65536 pre 802µs on 802µs post 802µs diff 0ns align 32768 pre 824µs on 820µs post 793µs diff 10.9µs
root@localhost:~# gdisk -l /dev/block/mmcblk0 | egrep '^(Num| 18)' Number Start (sector) End (sector) Size Code Name 18 5894728 10134087 2.0 GiB 8300 cache
# since I only want to operate on this partition, I'll manually round up # the start offset of this partition to hit the first erase block (4M # according to the card) which is in side the start of the partition.
root@localhost:/# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] --open-au-nr=2 4MiB 26.8M/s 2MiB 25.8M/s 1MiB 25.1M/s 512KiB 23.5M/s 256KiB 20.5M/s
root@localhost:/# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] --open-au-nr=64 4MiB 24.7M/s 2MiB 25.2M/s 1MiB 25.2M/s 512KiB 24.1M/s 256KiB 20M/s
root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=2 4MiB 23.8M/s 2MiB 26.2M/s 1MiB 25M/s 512KiB 24.8M/s 256KiB 19.8M/s 128KiB 15.4M/s 64KiB 11.9M/s 32KiB 13.1M/s 16KiB 9.51M/s root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=33 4MiB 24.9M/s 2MiB 25.8M/s 1MiB 25.2M/s 512KiB 24.5M/s 256KiB 20M/s 128KiB 15.1M/s 64KiB 11.5M/s 32KiB 12.1M/s 16KiB 8.48M/s root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=65 4MiB 22.2M/s 2MiB 25.9M/s 1MiB 25.4M/s 512KiB 24.3M/s 256KiB 20.4M/s 128KiB 15.7M/s 64KiB 11.8M/s 32KiB 12.6M/s 16KiB 8.68M/s root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=1 4MiB 15.8M/s 2MiB 24.1M/s 1MiB 26.4M/s 512KiB 24.3M/s 256KiB 19.3M/s 128KiB 16M/s 64KiB 12M/s 32KiB 13.1M/s 16KiB 9.92M/s
# ... not really sure how to interpret that. Am I wrong in attempting # to just operate on the partition, with that offset?
Hi Tim,
On 12/17 12:46, Tim Small wrote:
Hello,
I thought I'd poke about with the eMMC in the Galaxy S4 which I have here to see if it supported a sufficient number of AUs to be worth switching to f2fs (I believe you need 7 simultaneous AUs minimum?).
Are you doing these tests on Linux or on Android?
Had a go at determining AUs, but I don't think I'm seeing any performance drop-off, but not sure if I'm doing something wrong?
Cheers,
Tim.
root@localhost:/# cd /sys/block/mmcblk0/device/ && grep ^ * 2> /dev/null caps:0x40080f4e caps2:0x00031927 cid:110100303136473934b0d49cac223006 csd:d00e00320f5903ffffffffff92400024 date:03/1997 enhanced_area_offset:18446744073709551594 enhanced_area_size:4294967274 erase_size:4194304 erase_type:MMC_CAP_ERASE enabled, type DISCARD, SECURE supportable, Sanitize enabled fwdate:0x0000000000000000 fwrev:0x0 hwrev:0x0 manfid:0x000011 name:016G94 oemid:0x0100 preferred_erase_size:4194304 serial:0xd49cac22 smart:0x0000000000000000 type:MMC uevent:DRIVER=mmcblk uevent:MMC_TYPE=MMC uevent:MMC_NAME=016G94 uevent:MODALIAS=mmc:block
This looks like a Toshiba eMMC. I have a 4 GB Toshiba eMMC which shows similar manfid, name, and oemid values and manfid 0x11 is listed as their Toshiba manfid in the datasheets I have.
My 4 GB Toshiba eMMC looks like:
root@unknown:~# cd /sys/block/mmcblk0/device/ && grep ^ * 2> /dev/null cid:11010030303447363002165498e353cd csd:d05e00320f5903ffffffffe7924000e3 date:05/2016 dsr:0x404 enhanced_area_offset:18446744073709551594 enhanced_area_size:4294967274 erase_size:524288 ffu_capable:1 fwrev:0x0100000000000000 hwrev:0x0 manfid:0x000011 name:004G60 ocr:00200000 oemid:0x0100 preferred_erase_size:4194304 prv:0x2 raw_rpmb_size_mult:0x4 rel_sectors:0x1 serial:0x165498e3 type:MMC uevent:DRIVER=mmcblk uevent:MMC_TYPE=MMC uevent:MMC_NAME=004G60 uevent:MODALIAS=mmc:block
root@localhost:/# flashbench -a /dev/block/mmcblk0 align 4294967296 pre 458µs on 523µs post 484µs diff 52.3µs align 2147483648 pre 445µs on 580µs post 501µs diff 107µs align 1073741824 pre 436µs on 549µs post 488µs diff 87.2µs align 536870912 pre 419µs on 475µs post 445µs diff 43.6µs align 268435456 pre 436µs on 497µs post 453µs diff 52.3µs align 134217728 pre 471µs on 549µs post 532µs diff 48µs align 67108864 pre 532µs on 562µs post 541µs diff 26.2µs align 33554432 pre 510µs on 593µs post 549µs diff 63.2µs align 16777216 pre 645µs on 724µs post 680µs diff 61µs align 8388608 pre 637µs on 702µs post 663µs diff 52.3µs align 4194304 pre 767µs on 859µs post 798µs diff 76.3µs align 2097152 pre 776µs on 841µs post 802µs diff 52.3µs align 1048576 pre 772µs on 846µs post 798µs diff 61µs align 524288 pre 776µs on 824µs post 811µs diff 30.5µs align 262144 pre 789µs on 793µs post 785µs diff 6.54µs align 131072 pre 789µs on 802µs post 793µs diff 10.9µs align 65536 pre 802µs on 802µs post 802µs diff 0ns align 32768 pre 824µs on 820µs post 793µs diff 10.9µs
On my Toshiba eMMC, I see basically unusable values for the read test, even when setting 'count' quite high:
root@unknown:~# flashbench -a /dev/mmcblk0 -c 100 --erasesize=$[512*1024] align 1073741824 pre 529µs on 530µs post 533µs diff -883ns align 536870912 pre 519µs on 520µs post 522µs diff -708ns align 268435456 pre 526µs on 526µs post 525µs diff 860ns align 134217728 pre 517µs on 519µs post 521µs diff -58ns align 67108864 pre 534µs on 533µs post 530µs diff 1µs align 33554432 pre 527µs on 527µs post 524µs diff 1.26µs align 16777216 pre 535µs on 533µs post 527µs diff 2.39µs align 8388608 pre 541µs on 547µs post 542µs diff 5.86µs align 4194304 pre 535µs on 542µs post 543µs diff 2.58µs align 2097152 pre 535µs on 539µs post 537µs diff 2.93µs align 1048576 pre 536µs on 538µs post 541µs diff -732ns align 524288 pre 529µs on 531µs post 531µs diff 802ns align 262144 pre 533µs on 532µs post 532µs diff -348ns align 131072 pre 531µs on 530µs post 530µs diff -279ns align 65536 pre 533µs on 532µs post 532µs diff -883ns align 32768 pre 527µs on 527µs post 529µs diff -906ns
root@localhost:~# gdisk -l /dev/block/mmcblk0 | egrep '^(Num| 18)' Number Start (sector) End (sector) Size Code Name 18 5894728 10134087 2.0 GiB 8300 cache
# since I only want to operate on this partition, I'll manually round up # the start offset of this partition to hit the first erase block (4M # according to the card) which is in side the start of the partition.
root@localhost:/# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] --open-au-nr=2 4MiB 26.8M/s 2MiB 25.8M/s 1MiB 25.1M/s 512KiB 23.5M/s 256KiB 20.5M/s
root@localhost:/# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] --open-au-nr=64 4MiB 24.7M/s 2MiB 25.2M/s 1MiB 25.2M/s 512KiB 24.1M/s 256KiB 20M/s
root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=2 4MiB 23.8M/s 2MiB 26.2M/s 1MiB 25M/s 512KiB 24.8M/s 256KiB 19.8M/s 128KiB 15.4M/s 64KiB 11.9M/s 32KiB 13.1M/s 16KiB 9.51M/s root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=33 4MiB 24.9M/s 2MiB 25.8M/s 1MiB 25.2M/s 512KiB 24.5M/s 256KiB 20M/s 128KiB 15.1M/s 64KiB 11.5M/s 32KiB 12.1M/s 16KiB 8.48M/s root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=65 4MiB 22.2M/s 2MiB 25.9M/s 1MiB 25.4M/s 512KiB 24.3M/s 256KiB 20.4M/s 128KiB 15.7M/s 64KiB 11.8M/s 32KiB 12.6M/s 16KiB 8.68M/s root@localhost:~# flashbench /dev/block/mmcblk0p18 --offset 1798144 --open-au --random --erasesize=$[4 * 1024 * 1024] --blocksize=$[16 * 1024] --open-au-nr=1 4MiB 15.8M/s 2MiB 24.1M/s 1MiB 26.4M/s 512KiB 24.3M/s 256KiB 19.3M/s 128KiB 16M/s 64KiB 12M/s 32KiB 13.1M/s 16KiB 9.92M/s
# ... not really sure how to interpret that. Am I wrong in attempting # to just operate on the partition, with that offset?
I don't think you're wrong to use that offset, I think the eMMC is hiding its real performance from you quite effectively. I'm not exactly sure how these Toshiba controllers work internally, but they seem pretty effective at evading investigation from flashbench.
Doing a 30 open-au random test on my 4 GB Toshiba eMMC shows similar results in the sense that no easy conclusion can be made as to how many actual open-au the controller supports:
root@unknown:~# flashbench /dev/mmcblk0 --open-au --erasesize=$[4*1024*1024] --blocksize=$[16*1024] --open-au-nr=1 4MiB 15.3M/s 2MiB 15.6M/s 1MiB 15.6M/s 512KiB 15.1M/s 256KiB 14.3M/s 128KiB 13M/s 64KiB 11.2M/s 32KiB 18.4M/s 16KiB 16.6M/s
root@unknown:~# flashbench /dev/mmcblk0 --open-au --erasesize=$[4*1024*1024] --blocksize=$[16*1024] --random --open-au-nr=30 4MiB 15.5M/s 2MiB 15.5M/s 1MiB 15.5M/s 512KiB 14.9M/s 256KiB 14M/s 128KiB 12.5M/s 64KiB 19.1M/s 32KiB 17.9M/s 16KiB 16.3M/s
I'd just give f2fs a try, see how the performance is. It'll probably be decent.
Thanks, Andrew
On 19/12/16 16:25, Andrew Bradford wrote:
I thought I'd poke about with the eMMC in the Galaxy S4 which I have here to see if it supported a sufficient number of AUs to be worth switching to f2fs (I believe you need 7 simultaneous AUs minimum?).
Are you doing these tests on Linux or on Android?
Under Android (within a Debian chroot) - the chroot is on an sdcard, and the phone is booted up using the 'twrp' recovery kernel+userspace combo - hence being able to monkey with the cache partition whilst booted up.
This looks like a Toshiba eMMC. I have a 4 GB Toshiba eMMC which shows similar manfid, name, and oemid values and manfid 0x11 is listed as their Toshiba manfid in the datasheets I have.
OK, thanks I found some references to Toshiba using an 0x11 manfid elsewhere.
# ... not really sure how to interpret that. Am I wrong in attempting # to just operate on the partition, with that offset?
I don't think you're wrong to use that offset, I think the eMMC is hiding its real performance from you quite effectively. I'm not exactly sure how these Toshiba controllers work internally, but they seem pretty effective at evading investigation from flashbench.
[...]
I'd just give f2fs a try, see how the performance is. It'll probably be decent.
OK, thanks. That's the conclusion I'd come to, I had some doubts about the validity of my results, but good to see that a similar eMMC seems to do the same thing in another system (with presumably a different kernel - I've not looked at this Android Samsung-derived kernel's source, but I'm assuming it's not pretty).
Cheers,
Tim.
flashbench-results@lists.linaro.org