Command Probability Sequencer Application – Part 2

Introduction

In part one we introduced the CPS Command Probability Sequencer application, showing how to define commands and add them to the command execution list.

In part 2 we will continue the introduction to CPS by showing the two execution modes, and analyze the CPS output using BAM.

Executing the test – sending the commands in Sequential Mode

Referring to the CPS setup we left off with, now turn your attention to the highlighted and commented sections show here:

Note: our command sequence is made up of seven different commands, one of which has a DATA OUT phase, two of which have no data phase, and four of which have DATA IN.

For this section we are going to issue the commands in the list in the order they appear – Sequential Mode.

Clicking the “Start I/O” button will issue the sequence of commands over and over until 1,000 I/O’s have been executed.

Examination of the I/O output via a BAM trace (viewed in Excel) we see our command sequence begin and repeat…

A quick look back at our CPS screen shows our command list…

TEST UNIT READY

INQUIRY

MODE SENSE

READ(10) – 1 block from LBA 65280

READ(10) – 32 blocks from LBA 0

WRITE(10) – 32 blocks to LBA 0

SEEK – to LBA 61440

Repeat…

Asking Excel to tell us the total number of CDB’s gives us the number 1002 – there are always CDB’s issued at the beginning of the test run to confirm that the selected device exists, etc. These discovery commands are READ CAPACITY, INQUIRY.

Thus BAM confirms that our command list was executed in the defined order, and that the number of I/O’s that we defined was the number of I/O’s generated.

Executing the test – sending the commands in Random Mode

Now we will explore the most powerful mode of CPS – Random Mode.

In random mode CPS will generate the requested number of I/O’s – in the case of our example 1,000 – and will automatically insure that each command gets executed the number of times defined by each commands Probability Percentage. Rather than being executed in order as in Sequential Mode the command sequence will now be random. CPS will insure that each command gets issued the correct number of times, based on the Probability Percentage for each command and the Number of I/O’s to Issue number entered.

Looked at this way our command list shows that we defined:

TEST UNIT READY – 10% – should be executed 100 times…

INQUIRY – 10% – should be issued 100 times…

MODE SENSE – 20% – should be issued 200 times…

READ(10) 1 block from LBA 65280 – 20% – should be issued 200 times…

READ(10) 32 blocks from LBA 0 – 10% – should be issued 100 times

WRITE(10) 1 block to LBA 0 – 10% – should be issued 100 times

SEEK – to LBA 61440 – 20% – should be issued 200 times

Let’s execute the test again now, this time in Random mode, and then examine the BAM trace…

Pretty close to the 1,000 that we asked for, and the numbers of each command are pretty close to the percentages we specified. CPS does its’ best to meet the requested test parameters, sometimes its’ calculations will generate a few more I/O’s.

Here is a picture of a piece of the trace, showing that the commands are not in any particular order –

Conclusion

CPS is a very powerful test tool. Sequential Mode is perfect for testing scenarios such as command compliance testing. Random mode is perfect for testing how a drive responds to random occurrences of random or illegal commands, or testing which simulates real-world situations.