LS1028ARDB - Low Write Speed with eMMC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1028ARDB - Low Write Speed with eMMC

Jump to solution
5,229 Views
igor_franco
Contributor IV

Hello,

I am using an LS1028ARDB development kit configured as LS1027AE. 

I have done some write performance tests with eMMC (MTFC8GAKAJCN according to the board Reference Manual). The eMMC datasheet says that it can reach 22MB/s of writing, running as HS200. However, sending a file of 8MB to the eMMC, which is split into 16 packets of 512kB, the write speed was around 12,5MB/s (each 512kB taking 40ms).

Therefore, I have made the same test with an SD Card Class 10 UHS SDR50. The time was around 22ms for each 512kB, which is ~22MB/s. I don't understand why there is too much difference between the SD Card and eMMC. Is there a way to improve the eMMC write speed?

 

P.s.:

I have tried to use the eMMC configured as HS400, but the kernel was not able to tune the device:

[ 70.605712] mmc1: Tuning timeout, falling back to fixed sampling clock
[ 70.612419] mmc1: tuning execution failed: -110

 

Thank you in advance,

Igor

0 Kudos
1 Solution
5,111 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following update from LSDK development team.

So the eMMC mode was 8-bit, HS400, 150MHz, if customer was using LSDK-20.12-V5.4-RT.

The write performance customer got was 8MB/s ~ 16MB/s. (“When I write an 8MB file, the eMMC takes from ~500ms to ~1s to finish the process.”)

 

Per eMMC datasheet of RDB, the reference write performance is 22MB/s with 8-bit,  HS400, 200MHz, and sequential access.

I also did fio test with log attached. The performance matched the datasheet. (A little better than datasheet since SD clock in using was 150MHz.)

 

Run status group 0 (all jobs):

   READ: bw=171MiB/s (179MB/s), 171MiB/s-171MiB/s (179MB/s-179MB/s), io=10.0GiB (10.8GB), run=60002-60002msec

 

Run status group 1 (all jobs):

  WRITE: bw=19.9MiB/s (20.8MB/s), 19.9MiB/s-19.9MiB/s (20.8MB/s-20.8MB/s), io=1193MiB (1251MB), run=60038-60038msec

 

So I don’t think there is performance issue. The write speed is limited by eMMC chip.

View solution in original post

0 Kudos
9 Replies
1,601 Views
JRNDigital
Contributor I

The variation in write speeds between the eMMC and SD Card is indeed puzzling. To potentially boost eMMC write speed, consider these steps:

  1. File System Optimization: Ensure your eMMC is using a file system optimized for fast writes, such as a journaled file system.

  2. Driver/Firmware Updates: Check for driver and firmware updates for your eMMC. Updates might enhance performance.

  3. eMMC Wear-Leveling: eMMC wear-leveling algorithms could affect write speeds. See if you can configure or optimize these settings.

  4. Background Tasks: Check for background tasks or processes that may impact eMMC performance.

  5. Hardware Constraints: Review the hardware specs, ensuring they support the expected performance level.

  6. Device-Specific Tweaks: Explore device-specific optimizations in the eMMC manual.

If these don't yield better results, reaching out to the manufacturer or supplier for further guidance could be beneficial. JRNDigital

0 Kudos
5,222 Views
yipingwang
NXP TechSupport
NXP TechSupport

Which version LSDK are you using now?

Please check whether the following patches have been applied in your Linux Kernel source.

https://patchwork.kernel.org/project/linux-mmc/patch/20190814072649.8237-1-yinbo.zhu@nxp.com/

0 Kudos
5,218 Views
igor_franco
Contributor IV

Hello yipingwang,

I am using the Kernel SDK-20.04-V4.19-RT-update-290520.

I have tried to put the same configurations presented in the patch you sent. This caused the tuning error I sent before (in the "P.s."). However, even in HS200, the eMMC should reach a speed higher than 12,5MB/s, should not it?

 

Best regards,

Igor

0 Kudos
5,205 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please add "bus-width = <8>;" in device node &esdhc1 in arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts.

In SDK-20.04-V4.19-RT-update-290520, the bus width is 4 bit mode.

 

0 Kudos
5,201 Views
igor_franco
Contributor IV

Hello yipingwang,

I updated my kernel Linux to the new LSDK-20.12-V5.4-RT. Also, I have already added the bus width for 8. I noticed that it is required to work in HS400. However, even using HS400 and this new kernel version, the problem didn't disappear. I am using a 64MB partition formatted as BTRFS. When I write an 8MB file, the eMMC takes from ~500ms to ~1s to finish the process. I can not observe this with the SD Card, which reached fast speeds: ~300ms for the same 8MB file. I know that the driver used for both eMMC and SD Card is the same. Also, I noticed that the CodeWarrior takes too long to program the eMMC. It takes around 3,3s to program 512 bytes. Is there any known problem regarding the eMMC in the LS1028A-RDB?

Best regards,

Igor

0 Kudos
5,164 Views
yipingwang
NXP TechSupport
NXP TechSupport

I have reported this issue to LSDK development team.

Would you please provide your console to see how you tested the performance?

0 Kudos
5,145 Views
igor_franco
Contributor IV

Hello yipingwang,

Find the code I used to test the eMMC attached in this reply.
Just a brief explanation of what I have tried to do:

First, I have generated ten files with 8MB of random data each (using this site: https://pinetools.com/random-file-generator). Then, I use the firmware in an SD Card to run with RAMdisk. I have done this to avoid any access to SD Card or eMMC during the Linux execution. The program loads the file and writes it to the eMMC. After writing to the memory, the program set the eMMC to inactive to block any other action. The test executes in a high priority thread.

My kernel is the LSDK-20.12-V5.4-RT with Real-Time enabled. Just remember to compile with "-pthread" flag.

Best regards,
Igor

0 Kudos
5,112 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following update from LSDK development team.

So the eMMC mode was 8-bit, HS400, 150MHz, if customer was using LSDK-20.12-V5.4-RT.

The write performance customer got was 8MB/s ~ 16MB/s. (“When I write an 8MB file, the eMMC takes from ~500ms to ~1s to finish the process.”)

 

Per eMMC datasheet of RDB, the reference write performance is 22MB/s with 8-bit,  HS400, 200MHz, and sequential access.

I also did fio test with log attached. The performance matched the datasheet. (A little better than datasheet since SD clock in using was 150MHz.)

 

Run status group 0 (all jobs):

   READ: bw=171MiB/s (179MB/s), 171MiB/s-171MiB/s (179MB/s-179MB/s), io=10.0GiB (10.8GB), run=60002-60002msec

 

Run status group 1 (all jobs):

  WRITE: bw=19.9MiB/s (20.8MB/s), 19.9MiB/s-19.9MiB/s (20.8MB/s-20.8MB/s), io=1193MiB (1251MB), run=60038-60038msec

 

So I don’t think there is performance issue. The write speed is limited by eMMC chip.

0 Kudos
4,995 Views
igor_franco
Contributor IV

Hello yipingwang,

It seems my test was not too useful to measure this speed. I didn't know this fio program. It is very interesting. Thank you for all your support.

Best regards,

Igor

0 Kudos