Project

General

Profile

UFS

Universal Flash Storage is the default boot media for the MitySOM-QC.

Booting from UFS

To boot from UFS, make sure BOOT-1 (GPIO_120), BOOT-2 (GPIO_122) and BOOT-3 (GPIO 124) should all be left floating (there are pull down resistors on the MitySOM-QC).

Additionally the UFS needs to be programmed programmed.

Lastly, see Booting the MitySOM QC6490 on how to initiate the boot process.

Performance

The MitySOM-QC supports UFS 3.1 gear four 1 × 2-lane.

This gives us a theoretical raw data maximum throughput of 2224.12 MiB/s.

Read Speeds

In testing we have seen read speeds up to 2100 MiB/s (on 256 GB UFS).

These results can be reproduced by running the following command:

fio --name=ufs-test --filename=/root/ufstestfile --size=10G --rw=read --bs=512k --iodepth=16 --numjobs=1 --ioengine=libaio --direct=1 --loops=10

Write Speeds

In testing we have seen write speeds range from 300 MiB/s to 1500 MiB/s (on 256 GB UFS).

The wide range here is due a UFS feature call the WriteBooster. This is essentially a buffering mechanism within the UFS device that allows for certain amount of data (e.g. 4GB) to be written quickly to a buffer in the UFS and then the chip's internal controller will handle writing it to long term storage cells.

See Configuration Options for details on how to configure the WriteBooster.

Longevity

UFS is a NAND based non-volatile storage device and thus has a lifespan that needs to be taken into account when implementing a design.

Below we will outline some details on how you might calculate a rough estimate for UFS lifespan. Please note that a more accurate calculation would require details on your specific workload as well as some UFS manufacturer specific details.

Manufacturers often refer to UFS longevity in terms of TBW, sometimes referred to as Total Bytes Written or Terabytes Written. This is essentially a metric for how many writes a device can handle in its lifetime.

TBW is typically calculated as:

TBW = (Device Capacity) * (PE Cycles) / (WAF)

Device Capacity

This simply refers to the size of the part being used (e.g. 256 GB).

Program Erase Cycles (PE Cycles)

The units where the values of memory bits are stored are referred to as cells. Updating the bit(s) stored in a cell requires erasing the cell and writing the new bit(s), which results in degradation of the cell as the operation is repeated.

Note that cells can typically operate in two modes: MLC (Multi-Level Cell) and pSLC (Pseudo Single-Level Cell). In MLC mode multiple bits are stored in a cell, resulting in a larger available disk space, but slower access and faster degradation. In pSLC you will have smaller disk space (e.g. what was 210 GB in MLC mode becomes 70 GB), but device longevity will increase.

An example difference in PE Cycles of MLC of pSLC would be a rating of 3,000 PE Cycles for MLC and 30,000 for pSLC.

See Configuration Options for details on how to configure the Cell Mode.

Write Amplification Factor (WAF)

This metric is meant to capture how efficiently writes are taking place in regards to how the data is actually written by the UFS internal controller. In general, longer sequential writes result in a lower WAF (and improve longevity), while short random writes result in a higher WAF (and result in faster device degradation).

Configuration Options

The purpose of this section is to outline some configuration options you may want to consider when deciding how your system will utilize UFS. These options can help you setup the ideal balance of power, size, performance and longevity for your system.

The following resources may be helpful for exploring UFS configuration options in more detail:
  • Kernel UFS sysfs Documentation
  • The UFS Standard from JEDEC
    • JESD220E is the document for the UFS 3.1 Standard (this currently is available for purchase or available with a paying JEDEC membership)
    • JESD220C-2.2 is the document for the UFS 2.2 Standard (this is available after registering for a free account with JEDEC)

WriteBooster

The WriteBooster buffer size is specified in the provision xml via shared_wb_buffer_size_in_kb=. Our default provision file sets this to 4 GB. If set to 0, the WriteBooster will be disabled.

Note that you can check the WriteBooser size/status via the following formula using sysfs entries:

wb_shared_alloc_units=$(cat /sys/devices/platform/soc@0/1d84000.ufs/device_descriptor/wb_shared_alloc_units)
allocation_unit_size=$(cat /sys/devices/platform/soc@0/1d84000.ufs/geometry_descriptor/allocation_unit_size)
segment_size=$(cat /sys/devices/platform/soc@0/1d84000.ufs/geometry_descriptor/segment_size)
wb_size_bytes=$(( $wb_shared_alloc_units * 512 * $allocation_unit_size * $segment_size ))

pSLC Mode

The mode that the cells operate in can be defined at provision time. This is done via bMemoryType= for LUNum="0" with desc="LU 0 - User LUN - Rest of the device". A value of 0 corresponds to MLC mode, while 3 corresponds to pSLC mode. See Program Erase Cycles PE Cycles for details on how cell mode selection can affect longevity, size and performance.

Go to top
Add picture from clipboard (Maximum size: 1 GB)