Apalis iMX6 write file performance

We are performing some tests in file writing on a mSATA SSD with an internal software (using C#). The software simply uses a BinaryWriter, writes the data, and closes the file. We got 40MB/s for binary files. Can this writing speed be optimized ? Thank you in advance for your answer. GuiP

Could you try to use the same SSD with the same C# code at your desktop/laptop and share a write speed?

Hello GuiP,
we did also a test with a similar result (but with another module). We wanted also to increase the read/write performance with our mSATA SSD. So we test some different scenarios and get a surprised result:

  • Performance-tests (iperf-network, mSATA, SPI) with Linux Kernel 4.9.0 are approx. 30 % better in comparison with using Kernel 4.14.141

We still get tips that it could be an issue because of spectre/meltdown fixes, the activation of NET_SCHED support, but we still cannot believe such an performance lost.

So maybe you have another cause, but maybe not.


Unfortunately I have no mSATA port on my Laptop. The SSD is a Delkin device MD1HAPC5X-3N000-2 of 128GB. The datasheet gives a writing speed up to 200MB/s.

Dear @GuiP,

Thank you for contacting support. Could you share your C# test application to test that and also I will try to use other tools to test the SATA and then would like to get back you a couple of days?

Which WinCE image version you are using?

Dear raja.tx,
I use WEC2013 v1.5. Please find attached the C# code of my test application. Thanks for your support !

Dear @GuiP,

Thank you for the test code.

We have the following options could be set through the registry: Drivers\builtin\sata

#define REG_VAL_DSK_PORT             (_T("Port"))             // heap address of associated CPort instance
#define REG_VAL_DSK_INTERRUPTDRIVEN  (_T("InterruptDriven"))  // {0, 1}; 0 => polled I/O, 1 => interrupt I/O
#define REG_VAL_DSK_DMA              (_T("DMA"))              // {0, 1}; 0 => PIO, 1 => DMA, 2 => ATA DMA only
#define REG_VAL_DSK_DOUBLEBUFFERSIZE (_T("DoubleBufferSize")) // {512, ..., 131072}; scatter/gather processing
#define REG_VAL_DSK_DRQDATABLOCKSIZE (_T("DrqDataBlockSize")) // {512}; when we support R/W multiple, increase
#define REG_VAL_DSK_WRITECACHE       (_T("WriteCache"))       // {0, 1}; 0 => disable write cache; 1 => enable write cache
#define REG_VAL_DSK_LOOKAHEAD        (_T("LookAhead"))        // {0, 1}; 0 => disable look-ahead; 1 => enable look-ahead
#define REG_VAL_DSK_DEVICEID         (_T("DeviceId"))         // initially (0, 1, 2, 3), then resolve re-written as (0, 1); 0 => master, 1 => slave
#define REG_VAL_DSK_TRANSFERMODE     (_T("TransferMode"))     // 1 byte transfer mode encoding; see ATA/ATAPI 8.46.11; 0xFF is default mode, 0x8 to0xc - PIOMode, 0x40 to 0x45 - UDMA_MODE, 0x20 to 0x22 MDMA_Mode.
#define REG_VAL_DSK_IORDYENABLE      (_T("IORDYEnable"))      // 0 to disable Host IORDY

Please do your own testing before deploying that in production. Let us know if it doesn’t help you.

Thank you.

Thank you for the answer, I will try to play with these parameters as soon as I can.
Just for my information, did you try/succeed to reproduce the test ? If answer is yes, what writing speed did you reached ?

Dear @Guip,

I was able to reproduce the issue and got below results with the last few releases that were tested on WEC7.

  • v1.2 : 44.129041 MByte/sec
  • v1.3.1: 43. 567024 MB/sec
  • v1.5: 40. 675,936MB/sec

Dear @raja.tx,
Thank you for this answer and your support. It confirms that we are limited in writing speed when we use the SATA link with an SSD on WEC7 & 2013.