Storage media performance impact system performance in various aspects including system boot time. In embedded system nowadays we have diversity for selecting end storage devices like emmc, NAND flash(on-board NAND on USB), SSD (at high level, internally it can be series of flash storage). Throughput on these storage devices can be varied across system depends on hardware layers involvement start from CPU cores.
Selection of hardware components matter most to get the best throughput from storage media. In this article I am going to highlight those points which should be considered to get best possible throughput from storage media on a system, basically it is about storage media selection:
- CPU cores, clock rates: When it comes to system and storage media performance, CPU cores, CPU clocks matter. Higher CPU clock with higher CPU cores will lead to faster instructions processing, would ultimately result into higher performance. Storage media access has software side overhead like application initiated/requested access would translate into kernel thread blocking call to read/write/erase storage media, hence software level latency would decrease on higher cpu cores system, operating at higher clocks.
- USB controller selection: These end storage devices generally sits on USB BUS and USB BUS is controlled via USB controllers. With the evolvement in USB technology, we have USB controllers version from 1.0 to 4.0. Speed range is 1.5Mbps to 40Gbps. USB controller selection makes big differences in storage media performance. Current USB standard in industry is USB 4.0(2019).
- ONFI specification: Flash storage device is NAND or NOR. In case of NAND(from here onwards we will be discussing around NAND flash media/storage), NAND controller and NAND flash chip selection is also play vital role for max possible throughput. Let's say you selected NAND controller from a specific vendor, supports ONFI 2.0 standard it means you are limiting speed to 133MBPS(in case of synchronous mode to data transfer) whereas the current/latest ONFI specification is 5.0(2021) with enhanced speed of 2400MT/s.
- SLC v/s MLC: NAND flash chip vendors provide variety of NAND flash chip f.e. SLC based chip, MLC based chip, TLC, PSLC, synchronous data transfer mode supported flash chip, asynchronous data transfer mode supported flash chip. SLC v/s MLC is like lifespan v/s performance. If you are going to ship your products with five years of warranty then you literally don't need to compromise the speed and should choose MLC, even for ten years of warranty. In case of 10 to 20 years of life, SLC would be appropriate choice while compromising performance.
- Synchronous v/s Asynchronous mode: Asynchronous data transfer mode supports max 40MBPS and in case of synchronous mode with ONSF 5.0 specification 2400MT/s, you can see the difference.
40MBPS(asynchronous mode, however meta data overhead is applicable in synchronous mode as well) is bandwidth consists of meta data transitions like command, address which further reduce throughput to ~5MBPS. Write operation has more overhead than read operation, write operation almost consume double clock cycles of read operation, hence write operation throughput is supposed to lesser than read than almost by half.
Note: We should be very careful in component selection at initial stage of project. Clock level analysis of each and every module of system (i.e. primary BUS, CPU cores, integrated SOC components, on board ASICs, etc.) should be done as well before freezing it by HW design team.
Thanks for reading it, suggestions are welcome !!