emmc cache On/Off ,performance性能差异之大!!!
discard /erase/ trim /santinize , performance的影响!!!
参考另一篇文章,需进一步研究!
三星16G TLC emmc 为了延长使用寿命、提升write performance ,emmc controller可能将emmc运行在TLC nand 、SLC ==》TLC 切换、
SLC nand状态 (剩余空间充足的情况下) 三种状态。
如下图:
这三种工作状态对应的的write performance 差异也是惊人的!!!,如下图:
从上图可以看出同一颗TLC emmc 运行在不同状态时,性能差异是非常大的。
iozone 对TLC emmc 好和坏情况的性能对比数据如下:
iozone -a -s 2G -+n -i 0 -i 1 -f /data/iozone.tmp -Rb /storage/sdcard0/iozone.xls
Writer Report | |||||||||||||
4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | |
2097152 | 55143 | 55622 | 54318 | 54598 | 54103 | 54789 | 55101 | 54776 | 55174 | 55334 | 55666 | 55784 | 55975 |
Reader Report | |||||||||||||
4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | |
2097152 | 139094 | 133405 | 125010 | 119449 | 121387 | 116444 | 113972 | 120090 | 120404 | 121261 | 116745 | 115610 | 120769 |
Writer Report | |||||||||||||
4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | |
2097152 | 12557 | 24317 | 23393 | 24727 | 23892 | 22474 | 21438 | 20323 | 19149 | 18441 | 18753 | 16872 | 16983 |
Reader Report | |||||||||||||
4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | |
2097152 | 106191 | 100467 | 92003 | 106630 | 105283 | 105421 | 99729 | 86286 | 91746 | 97118 | 101032 | 93107 | 84510 |
bonnie++对TLC emmc 好和坏情况的性能对比数据如下:
bonnie++-d /data/ -s 1024 -m S3 -u 0:0
Version 1.03e ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
S3 4048M 6405 98 51895 41 36630 26 5870 99147249 65 4295 21
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 997 100 +++++ +++ 14394 112 1050 100 +++++ +++ 3820 102
S3,4048M,6405,98,51895,41,36630,26,5870,99,147249,65,4295.0,21,16,997,100,+++++,+++,14394,112,1050,100,+++++,+++,3820,102
Version 1.03e ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
S3 4048M 4779 78 16461 12 10285 6 5785 99140367 71 3790 19
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 968 100 +++++ +++ 16455 0 1010 107 +++++ +++ 3790 101
S3,4048M,4779,78,16461,12,10285,6,5785,99,140367,71,3789.6,19,16,968,100,+++++,+++,16455,0,1010,107,+++++,+++,3790,101
但是三星32G TLC emmc 根据实测没有这种performance变化的现象?
参考:
Linux on eMMC: Optimizing For Performance.pdf