home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DISK / CT30.ZIP / CT30.DOC < prev   
Encoding:
Text File  |  1991-07-10  |  11.2 KB  |  249 lines

  1.                   Cache Test v 3.0
  2.  
  3.                         by
  4.  
  5.                   George Spafford
  6.  
  7.                   CopyRight 1991
  8.  
  9. Summary:
  10.  
  11. This program is designed to help a user evaluate the impacts
  12. of a cache, or the changes to an existing cache, on a drive's
  13. performance.  
  14.  
  15. Furthermore, with users' increasingly using caches during a 
  16. variety of tasks, it is important to find the optimal cache 
  17. settings given the task at hand.  Whereas a word processor 
  18. might make heavy usage of sequential files, a database 
  19. might make heavy usage of random access files.  With this 
  20. in mind, the memory requirements, sectors cached, write 
  21. delays and so forth have many possible variations.
  22.  
  23. By default, Cache Test creates a 10,000 record sequential file
  24. using 32 byte records and then a 10,000 record random access file
  25. that again uses 32 byte record lengths.  Note, even if the default is
  26. changed, any sample string length will be increased by two bytes by
  27. the addition of a CR/LF.  You may want to compensate accordingly if
  28. you wish to be exact in your measurements.  The sample record size
  29. indicator displays the TRUE sample string size.
  30.  
  31. This program uses BIOS to do all of its reads and writes, 
  32. so any hardware or software cache should be able to get 
  33. some good "hits."  In attempt to flush caches during the 
  34. test, files are frequently opened and closed.
  35.  
  36. All of the times that this program writes are the result of
  37. subtracting the beginning time from the ending time.  Nothing
  38. fancy, so the values are relatively accurate.  Note, if you do
  39. some math to compute access times per record, you will run into
  40. the age old problem of significant digits.  This program does not
  41. account for any decimal positions.  As such, if you try to take the
  42. timings out to 1/10th of a second, the resulting error factor can be
  43. quite high.  You will probably notice times when the Total Time does
  44. not equal the summation of the two measured times.  This is because
  45. the overall time is on a unique timer and not the other two values
  46. simply added together.  (You will also witness this on the test level
  47. where the total time for the random tests does not match the sum of
  48. the individual scores.  The same holds true for the sequential tests.)
  49.           
  50. A few definitions:
  51.  
  52.       "ButterFly Test"     The middle record is read and then a
  53.                            record is alternatingly and read in each
  54.                            direction from the middle.  Say you have
  55.                            a 100 record file, the read order would
  56.                            be 50,49,51,48,52,47,53 . . . and so on.
  57.                            
  58.       "CR/LF"              Carriage Return and Line Feed.  Decimal 13
  59.                            and 10 respectively (CHR$(13),CHR$(10)).  These
  60.                            two characters are used as "end of record"
  61.                            delimiters.  As such, they are included in the
  62.                            byte count when a record is written.  If the
  63.                            sample string is 10 bytes, these two additional
  64.                            bytes are added to the end resulting in a total
  65.                            of 12 bytes.  Bear this in mind if you want exact
  66.                            values.
  67.                                
  68.       "Crescendo Read"     Records are read alternatingly in from the end of
  69.                            the file and the beginning file.  This is to say,
  70.                            record 1, 10000, 2, 9999, 3, 9998, 4, 9997 etc.
  71.  
  72.       "Random Read/Write"  Random functions generate independent random
  73.                            reads and writes.
  74.  
  75.       "Read-by-1"          A random access file's records are being accessed
  76.                            one at a time.
  77.  
  78.       "Stepping-by-10"     A random access file's records are being accessed
  79.                            on every 10th record.
  80.  
  81.       "Write-by-10"        A random access file's records are being updated
  82.                            on every 10th record.
  83.  
  84.       "Overall"            This is the total time of all tests AND file
  85.                            deletes.  So, it might not reflect the sum
  86.                            of all tests exactly, but it should be very
  87.                            close.
  88.  
  89.       I just wanted to make those meanings a little clearer.
  90.  
  91.       ******************************************************************
  92.  
  93.           Usage of this program is:
  94.  
  95.           CT  </D:d><F:bbb></N:nnn></S></R></B></?>
  96.  
  97.             CT by itself will test the active drive that it is on with
  98.             the default record length of 32 bytes and 10,000 records.
  99.                             
  100.         Explanation of switches:
  101.  
  102.         /D:d    This specifies "d" as the drive to be tested.
  103.  
  104.         /F:b    This specifies the number of fixed bytes per record.
  105.                 It must be between 1 and 32,765.  The default is 32 bytes.
  106.                 Use this with the /N:n switch to enhance your testing.
  107.                 (Because of CR/LF usage in the file structure, the logical
  108.                 limit for a user input is 32,765 and not the allowable
  109.                 32,767)
  110.  
  111.         /N:n    This specifies the number of test records.
  112.                 Note, the only limitation here is the available space 
  113.                 on your test drive.  You can also go as small as
  114.                 you want, but you will reach a point where your test
  115.                 will lose its validity.
  116.                 The default value, if this switch is not used, is
  117.                 10,000 records.
  118.  
  119.         /B      Test both sequential and random access records.
  120.         /R      Test random access records only.
  121.         /S      Test sequential access records only.
  122.  
  123.  
  124. Suggestions:
  125.  
  126. You might want to set up a batch file that purges your cache
  127. before CT is run.  This will allow the cache to have a little
  128. fairer test, as opposed to starting out partially full.
  129. Also, if you are interested in the actual hits on your cache, most
  130. cache programs (PC-CACHE and NCACHE for sure) have status switches
  131. that allow you to see the results from the cache's point of view.
  132.  
  133. The test file is written in the root directory of the target drive.
  134. The file name is TEST$$CT.SPD.  If the critter appears, don't panic!
  135. It probably didn't get deleted because of an interrupted test.
  136.  
  137. HISTORY:
  138.  
  139.       V3.0  7/10/91
  140.  
  141.             Well, I accessed the BIOS segment for clock ticks to create
  142.             the decimal level counters.  The second decimal place is
  143.             weak in terms of its accuracy, but I decided to leave it in.
  144.             For those of you worried about significant digits, the 
  145.             algorithm used for this uses 18 clock ticks to generate one
  146.             second of time.
  147.  
  148.             The test records are now 32 bytes total.
  149.  
  150.             Output screen formatting is improved.
  151.  
  152.             If the program is invoked without any parameters, it executes
  153.             on the active drive with a 10,000 record test made up of 32
  154.             bytes.  All user input now occurs on the command line through
  155.             the use of switches.          
  156.  
  157.       V2.6  5/24/91
  158.  
  159.             I honestly did not intend another update so soon.  It was
  160.             pointed out to me that the file structure that I had been
  161.             using was variable.  As such, it made ratio comparisons
  162.             somewhat difficult.  Now, the default fixed record length
  163.             is 32 bytes (the test record count is still 10,000).  The
  164.             user can specify the record length by using the /F:bbbbb
  165.             switch.  "bbbbb" must be between 0 and 32,765.   Since the
  166.             values are now fixed, a user can do a little math (remember
  167.             that subject folks??) and discern the records per second and
  168.             so forth.  Do note, that two bytes are added to the test string
  169.             in the files (CR/LF to be exact) that is why the maximum byte
  170.             size that a user can specify is 32,765 and not the 32,767 legal
  171.             default limit.
  172.               
  173.       V2.5  5/22/91
  174.  
  175.             1.  An actual test file byte size field has been added.
  176.                 This should allow users to track the actual sizes of
  177.                 the test records being written.
  178.             2.  Some users suggested that truly random reads and writes
  179.                 should be added.  This serves to get away from any form
  180.                 of sequentialized data.
  181.             3.  Again, more cosmetic touchups.
  182.  
  183.       V2.0  5/16/91
  184.  
  185.             Due to some users having limited drive space, switches
  186.             were added to allow for different size tests to 
  187.             occur.  I was somewhat hesitant to do this because it
  188.             negated the ability to call results "standard," but 
  189.             what really is standard?
  190.  
  191.             Switches were also added to allow users to select 
  192.             what tests they want to run.  For now, all that can 
  193.             be specified is whether or not to run all tests, 
  194.             sequential tests only, or random tests only.
  195.  
  196.             The ButterFly test was also added in an attempt to 
  197.             give look-ahead caches a hard time.  Some of the 
  198.             caches that use a FIFO method of purging will have a 
  199.             heck of a time with this one.
  200.  
  201.             Added timers/cleared up timers for the sequential and 
  202.             overall tests.  Also speaking of timers, to avoid 
  203.             slowing down some routines, I have removed some of 
  204.             the video effects that were for the user's benefit 
  205.             only.
  206.  
  207.             Special thanks to Jonathan Fisk for all of his 
  208.             suggestions and debugging efforts.
  209.  
  210.             Special thanks also go out to Tim Akright, the sysop 
  211.             of Queued Access for all of his support.
  212.  
  213.  
  214.       V1.0  5/10/91
  215.  
  216.             Well, I released it.  That pretty well sums it up.
  217.  
  218.  
  219.         I hope this program helps you evaluate some of your problems
  220.         or even makes some solutions/benefits clear.  This program is
  221.         released as shareware.  Its price is $5 for each concurrently
  222.         used copy.  If you have any suggestions or comments, I'd REALLY
  223.         like to hear those too.
  224.  
  225.                 Sincerely,
  226.  
  227.                 George Spafford
  228.                 3001 LakeShore Drive, #329
  229.                 St. Joseph, MI 49085
  230.  
  231.         Data:  (616) 468-5026  Queued Access BBS 14.4Kb USR Dual HST
  232.                                FIDOnet: 1:227/250
  233.                                (File Req's allowed or give a call & 
  234.                                 say "hi" to Tim, the BBS's sysop).
  235.  
  236.         And now for the unpleasantries:
  237.  
  238.         Code CopyRight:  July 1991
  239.         
  240.         CT IS DISTRIBUTED AS IS.  THE AUTHOR (GEORGE SPAFFORD) MAKES NO
  241.         WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  242.         TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
  243.         WITH RESPECT TO THIS SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL
  244.         THE AUTHOR BE LIABLE FOR ANY DAMAGES, INCLUDING LOST PROFITS, LOST
  245.         SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  246.         OUT OF THE USE OF OR THE INABILITY TO USE THIS PROGRAM.
  247.         ----------------------------------------------------------------
  248.         
  249.