   MSCDEX - Microsoft MS-DOS CD-ROM Extensions Version 2.21
                         Speed Tests
                              
     This document describes the file transfer test program
     CDSPEED. This program characterizes the performance of
     a CD-ROM drive, controller, and device driver.
     
About CDSPEED

     CDSPEED, a performance monitoring and evaluation tool,
     measures CPU utilization when transferring data from a
     CD-ROM drive at sustained data transfer rates into main
     memory. CPU utilization is an important measurement
     that indicates:
     
     * the CD-ROM drive's ability to transfer data at
       sustained data transfer rates
       
     * the efficiency of the CD-ROM device driver
      
     * the CPU bandwidth available to process the data after
       a read request and before the next required read operation
       
     CDSPEED is a DOS application. It will not run from
     inside a DOS window when Windows runs in the enhanced
     mode. CDSPEED is intended to be an indicator to assist
     you in evaluating overall system performance. It can
     help identify key areas in the device driver that might
     need to be tuned to optimize performance. By specifying
     the desired sustained transfer rate and data block
     sizes, you can characterize the CD-ROM drive over a
     range of operating conditions. You can have CDSPEED
     display the results in either detailed or terse
     formats.
     
The Need for Speed Tests

     Advantages of CD-ROM drives include not only the
     ability to store large volumes of information but also
     the ability to transfer data off the CD at a sustained
     data transfer rate. Transferring data at a sustained
     rate is called data streaming and is measured in the
     number of kilobytes per second transferred. For CD-ROM
     drives, this value is typically 150 kilobytes per
     second.
     
     Many applications, such as those for multimedia, rely
     upon the data stream coming off the disc at a
     guaranteed rate of 150 kilobytes per second. While the
     transfer rate on any one drive is fairly constant, it
     is often less than 150 kilobytes per second; sometimes
     it is much less. If the designers of an application
     decide to support a drive which cannot maintain 150
     kilobytes per second, then they have to decide the
     minimum transfer rate they will support. To
     intelligently select the minimum transfer rate, they
     need information about sustainable transfer rates.
     Therefore the sustainable transfer rate of your drive
     is important information which you should provide to
     your customers.
   
Multimedia PC (MPC) Speed Requirements

     You can use the CDSPEED test utility to test your CD-
     ROM drive against the speed requirements for the MPC
     specification. The MPC requirements for CD-ROM drives
     are:
     
       sustained 150 kilobyte/second transfer time
       
       1 second maximum seek time
       
       10,000 hours MTBF
       
       mode 1 capability (mode 2 and form 1 and 2 optional)
       
       subchannel Q (subchannels P and R-W optional)
       
       MSCDEX 2.2 (or greater) driver validated by Microsoft
       
       physical capability of vertical or horizontal
       orientation
       
     The drive must be capable of maintaining a sustained
     transfer rate of 150 kilobytes per second without
     consuming more than 40% of the CPU bandwidth in the
     process. This requirement is for read block sizes of
     between 8 kilobytes and 24 kilobytes and lead time of
     no more than is required to load the CD-ROM buffer with
     1 read block of data. We recommend that the drive have
     on-board buffers of 64 kilobytes and implement read-
     ahead buffering.
     
     For example, the SPEED.XLC file contains an Excel chart
     created from CDSPEED data shows a CD-ROM drive and
     device driver that meets the transfer rate
     specification. For the read block sizes of between 8
     and 24 kilobytes, the 150 KB/sec curve shows a CPU
     utilization of less than 40% utilization.
     
Operating Environment for CDSPEED

     Your computer will require the following software to
     run CDSPEED:
     
     * MS-DOS Version 3.31 or higher
      
     * MSCDEX Version 2.20 or higher
      
     * OEM Device Driver for the CD-ROM drive
      
Installing CDSPEED

     Install CDSPEED and other related files onto your
     system by copying the distribution disk to your hard
     disk. The following procedure places these files in a
     directory called CDSPEED:
     
    1. From the DOS prompt, enter the following command and
       press ENTER to create the CDSPEED directory on your
       hard disk:

           MD \CDSPEED

    2. Copy the files from the distribution disk to CDSPEED.
       The following command assumes the distribution disk
       is in drive A and the current drive is a hard disk:

           COPY A:*.*   \CDSPEED

       The following files are included in this package:

           BLKTEST.BAT    Batch file that calls CDSPEED with varying
                          requested block size

           CDTEST.BAT     Batch file that calls BLKTEST.BAT with 
                          varying requested transfer rates

           CHARTCD1.XLM   Excel 3.0 macro to chart actual
                          transfer rate versus block size and 
                          overall CPU utilization versus block size

           CHARTCD2.XLM   Excel 3.0 macro to chart background CPU 
                          utilization versus block size and CPU blocked
                          by readings versus block size

           CDSPEED.EXE    Test program

           README.TXT     Text file containing the latest information 
                          on CDSPEED

    3. Change the current working directory to CDSPEED with
       the following command:

           CD \CDSPEED

Running CDSPEED

     You can run CDSPEED directly from the DOS prompt or
     from the batch files included with CDSPEED. These batch
     files characterize the CD-ROM by running a standard
     series of tests that vary the requested data transfer
     rates and data block sizes for each test. After
     obtaining the initial information from the batch files,
     you might run CDSPEED directly with your selection of
     parameters to further characterize the CD-ROM drive in
     the areas that you are most interested.
     
Running CDSPEED From Batch Files

     The batch files CDTEST.BAT and BLKTEST.BAT test a wide
     range of CD ROM performance parameters by successively
     calling CDSPEED.EXE. Test results from the batch files
     are stored in a text file that you specify.
     
     CDTEST.BAT calls the second batch file BLKTEST.BAT
     passing it the requested data transfer rate in
     increments of 30 kilobytes per second. (CDTEST starts
     at 30 kilobytes per second and ends with 150 kilobytes
     per second.) CDTEST also passes the name of the test
     file located on the CD-ROM to BLKTEST.
     
     During execution, BLKTEST.BAT calls CDSPEED.EXE and
     specifies the following command line options:
     
     *  Name of the test file located on the CD ROM
       
     *  Requested transfer rate (ranges in value from 30
        kilobytes per second to 150 kilobytes per second)
       
     *  Requested block size (ranges from 4 kilobytes to 64
        kilobytes)
       
     *  Requested primer size (Matches the requested block
        size)
       
     *  Terse output mode switch
       
     *  Name of the log file
       
     These batch files perform a basic set of tests. To
     perform additional tests, edit the batch files--
     including the appropriate conditions for your tests.
     Or, run CDSPEED directly from the DOS prompt.
     
To run CDSPEED from the batch files:

    1. Start at the DOS prompt. If you are running Windows
       in the enhanced mode, exit from the Windows Program
       Manager.  CDSPEED needs a more precise timer than is
       available from the Virtual Timer Device.

    2. Type the following command at the DOS prompt and
       press Enter:

           CDTEST <FileName> <LogFileName>

       Replace <FileName> with the name of the test file to
       be accessed from the CD-ROM drive. Specify a file of
       at least 1.5 megabytes to obtain accurate results.

       Also, replace <LogFileName> with the name of a file
       to hold the results of the test.

     The following example runs CDSPEED from the batch files
     and specifies the D:\IMMPOST\CNTRL.C00 file as the test
     file accessed by the CD-ROM drive. (If you want to use
     CNTRL.C00 as the test file, it is located on the
     Windows with Multimedia extensions MODK CD-ROM.) The
     example stores test results in the TEST.LOG file
     located in the current working directory. This test
     takes approximately 2-1/2 hours to complete.
     
          CDTEST   D:\IMMPOST\CNTRL.C00   TEST.LOG
     
Running CDSPEED From the DOS Prompt

     If you are running Windows in the enhanced mode, exit
     from the Windows Program Manager. CDSPEED needs a more
     precise timer than is available from the Virtual Timer
     Device.
     
     At the DOS prompt, type the following command and press
     Enter.
     
          CDSPEED <FileName> <options>
     
     Replace <FileName> with the name of the test file to be
     accessed from the CD-ROM drive. Specify a file of at
     least 1.5 megabytes to obtain accurate results.
     
     The string <options> represents command line options
     that you can invoke with CDSPEED. To see a list of the
     CDSPEED options, run CDSPEED without using any command
     line arguments--no test file name and no options.
     
     The following list summarizes the command line
     arguments available for CDSPEED:
     
     FileName          Specifies the path and name of file to
                       test. The FileName is
                       required for operation of CDSPEED.
                  
     /r:[TransferRate] Specifies the transfer rate in bytes
                       per second. The transfer rate
                       can range from 1 to 4294967 with a
                       default of 150 kilobytes per
                       second. Use this value to specify the
                       sustained data read rate that
                       might be assumed by an application.
                  
     /b:[BlockSize]    Specifies the number of bytes
                       (BlockSize) read in each read
                       request. BlockSize can range from 1 to
                       65535 bytes with a default
                       of 10 kilobytes.
                  
     /p:[PrimerBytes]    Specifies the number of bytes used 
                         to prime the buffer. This parameter
                         fills a read-ahead buffer before the 
                         transfer rate timing begins. This is 
                         useful when testing transfer rates 
                         approaching the maximum rate available 
                         for CD-ROM drives. The number of bytes
                         range from 0 to 65535 with a default of
                         10 kilobytes.
                  
     /a:[PercentBlocked] Specifies the maximum percentage of read 
                         time interval that CPU should be blocked 
                         to perform the read request of data. Default 
                         is 40%. This value is used for scaling 
                         performance measurements but otherwise has 
                         no effect on actual values returned.
                  
     /t                  Requests terse output. The output is
                         useful for processing and analyzing with 
                         a spreadsheet program. Default is verbose
                         (non-terse) mode output. The order for
                         the terse output data is:
                  
                         <FileName>, <TransferRate>, <BlockSize>,
                         <PrimerBytes>, <%BackgroundCPU>,
                         <TotalBytesRead>, <MeasuredTransferRate>,
                         <%TimeBlockedByRead>, <%OverallUtilization>
                  
                         The following table describes the fields
                         of data returned in the terse mode:
                  
                         Field               Description
                  
                         FileName            Name of the file used
                                             during the test
                  
                         TransferRate        Requested transfer rate
                  
                         BlockSize           Block size used for test
                  
                         PrimerBytes         Number of bytes used to
                                             prime buffer
                  
                        %BackgroundCPU       Percentage of background
                                             CPU time

                        TotalBytesRead       Number of bytes read for test
                  
                        MeasuredTransferRate Transfer rate
                                             determined by test
                  
                        %TimeBlockedByRead   Percentage of time
                                             CPU blocked by the actual 
                                             read
                  
                        %OverallUtilization  The overall percent
                                             utilization including
                                             background activity of the
                                             driver
                  
     /?          Displays the list of command line options.
                  
     The values for the /r, /b, and /p switches use bytes as
     the default units. For convenience, you can append k or
     s after the number to indicate other units:
     
          k or K    Kilobytes (1024 bytes)
     
          s or S    Sectors (2 kilobytes)
     
     For example, /p:4s is equal to 8192 bytes (4 x 2048).
     
Reading the Output From CDSPEED

     CDSPEED's performance information is displayed on the
     standard output in either a detailed (verbose) or terse
     format. Terse format is suitable for analysis and
     charting using a spreadsheet such as Microsoft Excel.
     The terse format is described with the /t switch of the
     command line options. The verbose mode displays a table
     containing the results of the test. The following
     entries are listed in the table created by CDSPEED:
     
     Returned Value                 Description
     
     Test File Name                 The <FileName> specified.
                         
     Requested Transfer Rate        The <TransferRate> specified
                                    with the /r switch.
                         
     Delay Between Reads            The allowed time between reads to
                                    attain the requested data rate.
                         
     Allowed Percent Block          The maximum percentage of
                                    read interval time the CPU 
                                    should be blocked to perform the 
                                    read request.
                         
     Read Block Size                The <BlockSize> specified with the
                                    /b switch.
                         
     Primer Size                    The <PrimerBytes> specified with
                                    the /p switch.
                         
     Preparing for tests            Status message advising of the
                                    progress of preparation.
                         
     Priming XX kb--waiting YY ms   Status message advising of the progress 
                                    of priming the data buffer.
                         
     Performing transfer rate tests Status message advising
                                    of the progress of the test.
                         
     Total Data Read                The number of bytes read. The
                                    number of kilobytes and sectors 
                                    read are listed in parentheses.
                         
     Total Time Expired             The total elapsed time for the test.
                         
     Reads Exceeding XX ms          The number and percentage of
                                    reads exceeding the
                                    percentage specified for
                                    PercentBlocked; or the
                                    number and percentage of reads
                                    exceeding the read interval.
                         
     Longest Time Blocked by Read   Specifies the longest
                                    time blocked during a read.
                         
     Shortest Time Blocked by Read  Specifies the shortest
                                    time blocked during a read.
                         
     Overall Transfer Rate          The measure transfer rate in
                                    kilobytes per second.
                         
     Percent Time Blocked by Reads  The total percentage of
                                    time the CPU was blocked
                                    by reads.
                         
     Background CPU Usage           The percentage of background CPU
                                    usage.
                         
     Overall CPU Utilization        The overall percentage of CPU
                                    utilization during data streaming.
                         
Using the Results of CDSPEED

     Overall CPU utilization is displayed as a percentage of
     total time used per read request. Part of this time is
     the time required for the CPU to service the CD-ROM's
     interrupt requests to keep the read-ahead buffers full.
     Since elapsed time includes time for the overall system
     transfer (such as the DMA transfer rate), performance
     will vary on identical processors on different machines
     with varying DMA hardware, bus clock speeds, and other
     concurrent DMA activity, if any.
     
     CDSPEED determines several characteristics of a CD-ROM
     drive. Based on the results of CDSPEED, you might
     create the following performance curves:
     
     * Transfer rate as a function of block size
      
     * Transfer rate as a function of primer size
      
     * CPU usage (% time blocked) as a function of block size
      
     * CPU usage (% time blocked) as a function of expected
       transfer rate
      
     * CPU usage (% time blocked) as a function of both
       block size and expected transfer rate
      
How CDSPEED Measures the Results

     CDSPEED simulates an application that requests data
     from a CD at a user determined sustained data transfer
     rate. CDSPEED divides the read data block size by the
     desired transfer rate to determine the amount of time
     needed to read a data block. This time is called the
     read interval time. (For example, a 150 kilobyte per
     second data transfer rate and 15 kilobyte block size
     yields a read interval time of 100 milliseconds.) The
     CD-ROM system must read a block of data within the read
     interval time for it to maintain the requested data
     rate. Based on the values in the previous example, if a
     CD-ROM system takes exactly 100 milliseconds to
     complete a request, the CPU will not have any time
     available to process the read data before performing
     the next read operation. In this case, the CPU
     utilization is 100%.
     
     At every read interval time unit, CDSPEED issues a data
     read and transfer request and measures the amount of
     time it takes to complete the task. This time is
     measured as time that is blocked. While blocked, the
     CPU can do no other task until the transfer operation
     completes. Because some CD-ROM systems buffer their
     data, the time blocked by reads on these systems can be
     artificially low. In this case, this measurement
     determines the time to read data from the buffer rather
     than the CD-ROM. To account for buffering (and any
     other background CD-ROM operations), CDSPEED also
     determines the background CPU usage.
     
     To determine the background CPU usage, CDSPEED performs
     an internal task prior to performing any CD-ROM reads.
     CDSPEED uses the time it takes to perform this task as
     a baseline measurement. During the read interval period
     after the data read, CDSPEED performs the same task and
     measures the time it takes to complete this operation.
     The baseline measurement is then compared to the
     elapsed time measurement and any difference is
     attributed to the CD-ROM device driver maintaining it's
     fully cached or read-ahead data buffers in the
     background. This difference is the background CPU usage
     measurement.
     
     Note: On the very first read, CDSPEED issues a read
     request for 4 kilobytes of data and then waits for the
     device driver to return. After this read, the device
     driver continues to fill (or prime) its buffer with the
     data and CDSPEED waits for it to complete. Priming the
     buffer compensates for the amount of time it takes for
     the drive to perform an uncached read and seek. After
     priming, the drive should be ready for subsequent reads
     of data blocks from the cached memory buffer and to
     maintain data streaming at the sustained data transfer
     rate.
     
     CDSPEED continues executing read requests at calculated
     time intervals to sustain the specified transfer rate
     until it reaches the end of the test file. It then
     produces the summary results.
     
Error Messages

     The following section summarizes the error message
     CDSPEED can display. These error messages are directed
     to the standard error stream. For error handling in
     batch files, each error returns a unique DOS error
     return code. This value is listed with the error
     description.
     
     ** THIS PROGRAM CANNOT BE RUN IN A WINDOWS 3.X DOS VM **
          
          You cannot run CDSPEED in an enhanced mode Windows
          DOS VM. Timers accessed through the Virtual Timer
          Device in enhanced mode Windows do not have enough
          precision to obtain accurate results with CDSPEED.
          DOS error return code: 1
          
     Switch requires ':' separator.
          
          CDSPEED expected a colon ":" between a command
          line switch and the numeric value following it.
          DOS error return code: 2
          
     Memory allocation error.
          
          CDSPEED could not obtain enough memory to make the
          measurement. CDSPEED requests memory based on the
          block size and primer size. Try reducing these
          values if you need to run CDSPEED with limited
          memory.If this cannot be allocated, then you get
          this error. DOS error return code: 3
          
     Memory free error.
          
          CDSPEED could not free the memory it has
          allocated. This message will rarely occur. DOS
          error return code: 4
          
     Read error!
          
          CDSPEED encountered a read error during operation.
          DOS error return code: 5
          
     Unknown arguments on command line.
          
          The command line arguments contain an option
          CDSPEED does not recognize. DOS error return code: 6
          
     No test filename argument supplied.
          
          The command line arguments did not contain a name
          of a data file. CDSPEED uses this file as the
          source of the data it reads during the test. The
          test file should be greater than 1.5 megabytes.
          DOS error return code: 7
          
     More than one test filename argument supplied.
          
          CDSPEED interpreted more than one command line
          argument as a filename. Make sure that all numeric
          arguments have switches and check that spaces are
          not inappropriately placed in the command line.
          For example, check that the name used for the file
          does not contain spaces or the numeric values do
          not contain any spaces. DOS error return code: 8
          
     Can't open specified file.
          
          CDSPEED was unable to open the test file. DOS
          error return code: 9
          
     File is too small for test.
          
          Although 1.5 megabytes is recommended as the
          minimum file size to obtain the best measurement,
          CDSPEED can use smaller files. The smallest file
          CDSPEED can use is 4 kilobytes plus twice the
          blocksize. (CDSPEED uses 4 kilobytes for the
          initial prime. CDSPEED then uses two data blocks
          to obtain an average reading.) DOS error return
          code: 10
          
     Delay value between reads is too small for 1ms timer resolution.
          
          CDSPEED cannot obtain a valid measurement if the
          delay (the ratio of the block size to the transfer
          rate) between reads is less than twice the timer
          resolution. The delay must be greater than 2
          milliseconds. DOS error return code: 11
          
     Delay value between reads is too large.
          
          The delay (the ratio of the block size to the
          transfer rate) between data reads is too large to
          obtain a valid measurement. The delay must be less
          than 10 seconds. DOS error return code: 12
          
Warning Messages

     The following section summarizes the warning message
     CDSPEED can display. These messages are directed to the
     standard error stream. All of these messages return 1
     for the DOS error return code.
     
     MSCDEX is not installed.
          
          CDSPEED did not detect MSCDEX which is required
          for operation.
          
     Rate must be > 0 and < 65536, defaulting to 150k bytes/second.
          
          The value specified for the /r:[TransferRate]
          switch is outside the valid limits.
          
     Block size must be > 0 and < 65536 , defaulting to 10k bytes/read.
          
          The value specified for the /b:[BlockSize] switch
          is outside the valid limits.
          
     Primer must be >= 0 and < 65536 , defaulting to 10k bytes/read.
          
          The value specified for the /p:[PrimerBytes]
          switch is outside the valid limits.
          
     Percent blocked must be between 1 and 99 %, defaulting to 40 %.
          
          The value specified for the /a:[PercentBlocked]
          switch is outside the valid limits.
          
     File size should be at least 1.5 megabytes for accurate testing.
          
          For the most reliable results, the test file used
          by CDSPEED should be larger than 1.5 megabytes.
          
