Partager via


Flash Memory Read Write Performance Test (Compact 2013)

3/26/2014

The Flash Memory Read/Write and Performance Test assesses the functionality of a mass storage block driver for a flash memory device. With this test, you can assess a driver that implements sector management in software, for example a driver for a NAND flash or NOR flash device. This test is not designed for a flash driver that implements sector management in hardware, for example a driver for a CompactFlash card.

The Flash Memory Read/Write and Performance Test performs the following actions:

1. Reads, writes, and deletes information from sectors on a flash memory device.

2. Writes to and reads from a flash memory device when the device is nearly full.

3. Assesses reading and writing performance on a flash memory device under a variety of conditions.

Note:During the test, all information on the storage device is destroyed. The test writes to and reads from sectors on the storage device without preserving the contents of the sectors. We recommend that you back up data on all cards and disks that are attached to the tested device before running the test.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following table shows the hardware requirement for the Flash Memory Read/Write and Performance Test.

Requirement

Description

Flash memory device

A flash memory device with a driver that implements sector management in software.

The following table shows the software requirements for the Flash Memory Read/Write and Performance Test.

Requirements

Description

Tux.exe

Test harness, required for test execution

Kato.dll

Logging engine, required for logging test data

Perflog.dll

Logging library that provides functionality for timing and logging the performance data generated by the test dll

Flshwear.dll

Library containing the test

Subtests

The table below lists the subtests included in this test.

SubTest ID

Description

1001

Repeat at sector zero.

Writes data repeatedly to sector zero and reads it back. The total count of write operations is equal to the number of sectors multiplied by the value specified in the repeat command-line parameter.

1002

Repeat sector sequential.

Writes data to each sector in sequence, starting at sector zero. The total count of write operations is equal to the number of sectors multiplied by the value specified in the /repeat command line parameter.

1003

Repeat sector random.

Writes data to randomly selected locations. The total count of write operations is equal to the number of sectors multiplied by the value specified in the /repeat command-line parameter.

1004

Repeat write on filled disk.

Writes to every sector of the disk until it is full, and then deletes and writes repeatedly to a single location.

2000

Fill FLASH linearly, and test read/write throughput. Fills the disk to XX percent, where 20XX is the number of the test case, by writing data to each sector in sequence starting from sector zero. After the disk fills to the specified percentage, read/write performance is tested.

3000

Fill FLASH randomly and test read/write throughput .Fills the disk to XX percent, where 30XX is the number of the test case, by writing data to random sector locations. After the disk fills to the specified percentage, read/write performance is tested

4000

Fill FLASH fragmented and test read/write throughput. Fills the disk to XX percent, where 40XX is the number of the test case, in a way that maximizes fragmentation of free space. After the disk fills to the specified percentage, read/write performance is tested.

5000

Fill FLASH completely, free linearly and test read/write throughput. Fills the disk to 100% of capacity, and then frees XX percent of sectors consecutively starting at sector zero, where 50XX is the number of the test case. After space is freed to the specified percentage, read/write performance is tested.

6000

Fill FLASH completely, free randomly and test read/write throughput. Fills the disk to 100% of capacity, and then frees XX percent of sectors randomly, where 60XX is the number of the test case. After space is freed to the specified percentage, read/write performance is tested.

7000

Fill FLASH completely, free fragmented and test read/write throughput. Fills the disk to 100% of capacity, and then frees XX percent of sectors in a way that maximizes fragmentation of free space, where 70XX is the number of the test case. After space is freed to the specified percentage, read/write performance is tested.

Setting Up the Test

To run the default command line, the flash file system in the platform must use the "FlashDisk" profile name. If another profile name is used on your device under test, please update the command line to use the new profile name.

If your flash file system is based on the new MDD/PDD model, then you must include the "/store" option in order to access the file system using the OpenStore API.

Running the Test

You can modify the test by editing the command line. To specify one or more of the following optional command line parameters for this test, use the -c command line parameter, which forces Tux to pass the specified string to the test module. The following table shows the command line parameters for the Flash Memory Read/Write and Performance Test.

Command line parameter

Description

/disk disk

REQUIRED PARAMETER.Specifies the device name of the disk to be tested (for example, DSK1:). The default is the first disk detected.

/profile profile

Limits testing to the devices of the specified storage profile. The default is all profiles.

/store

Opens the disk using the OpenStore function instead of the CreateFile function.Opening a handle by using the OpenStore function is not required to test block driver functionality. Opening a handle by using the OpenStore function is useful for testing a storage device that Filesys.exe loads automatically if you cannot open the storage device as a stream device. For example, you can open a handle to a flash driver for ROM by using the OpenStore function.

/repeat count

Specifies the number of times to repeat each timed operation. The default value is 2.

/sectors count

Specifies the number of sectors to read or write during each timed operation. The default value is 1.

/rw count

Specifies the amount of storage space to be tested. This can be expressed as a percentage, as a number of bytes, or as a number of sectors, as follows: *## "p": percentage of the volume of the storage device to be tested; for example, "20p" means 20%.*##"( K | M | G )": amount of storage space in kilobytes|megabytes|gigabytes to be tested; for example, "10M" means 10 megabytes.*## "s": number of sectors to be tested; for example, "100s" means 100 sectors.The default value is the total volume of the storage device.

/log type

Specifies how to log the output, as follows:*"dbg": log to debug output.*"csv": log to ".csv" file.*"perflog": log through "PerfLog.dll". For more information about PerfLog, see Managing Performance Results Using PerfLog.The default value is "perflog".

/readlog filename

Specifies the location and name of the ".csv" file to which the test logs data about read performance.To specify a file in the release directory, use" \release\"filename".csv".If you do not specify this parameter, the test does not save data about read performance.

/writelog filename

Specifies the location and name of the ".csv" file to which the test logs data about write performance.To specify a file in the release directory, use "\release\"filename".csv".If you do not specify this parameter, the test does not save data about write performance.

/fill list

Specifies a list of filled percent of flash to test. The numbers should be separated by a comma (,) or a white space. For example, "/fill 5, 10 "tests with the conditions of 5% filled and 10% filled, separately.

/delete

Specifies that the test sends an IOCTL_DISK_DELETE_SECTORS command between each timed read/write operation.

/flash

Use IOCTL_FLASH rather then IOCTL_DISK to access the flash.

Note:During the test, all information on the storage device is destroyed. The test writes to and reads from sectors on the storage device without preserving the contents of the sectors. We recommend that you back up data on all cards and disks that are attached to the tested device before running the test.

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all sub-tests.

Troubleshooting the Test

* The default command line may not work properly if your disk file system does not support a "FlashDIsk" profile.

* Determine if your flash file system driver is using the MDD/PDD model. If so, then you need to add the "/store" option to the command line.

See Also

Other Resources

Storage Media - Flash Tests