home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DISK / CT41.ZIP / CT41.DOC < prev   
Encoding:
Text File  |  1991-11-13  |  13.7 KB  |  307 lines

  1.                   Cache Test v 4.1
  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 only accounts
  41. for one decimal location (0.1).  As such, if you try to take the
  42. timings out to 1/100th of a second, the resulting error factor can be
  43. quite high, relatively speaking that is.
  44.  
  45. Remember, if an outcome is in doubt, use a larger sample size!  That is
  46. to say, increase the number of bytes that are written to the disk.  The
  47. other alternative is to increase the number of sample passes.  You'll
  48. notice that results begin to stabilize with file sizes of 5000 records,
  49. 32 bytes, and 5 passes.
  50.  
  51.           
  52. A few definitions:
  53.  
  54.       "ButterFly Test"     The middle record is read and then a
  55.                            record is alternatingly and read in each
  56.                            direction from the middle.  Say you have
  57.                            a 100 record file, the read order would
  58.                            be 50,49,51,48,52,47,53 . . . and so on.
  59.                            
  60.       "CR/LF"              Carriage Return and Line Feed.  Decimal 13
  61.                            and 10 respectively (CHR$(13),CHR$(10)).  These
  62.                            two characters are used as "end of record"
  63.                            delimiters.  As such, they are included in the
  64.                            byte count when a record is written.  If the
  65.                            sample string is 10 bytes, these two additional
  66.                            bytes are added to the end resulting in a total
  67.                            of 12 bytes.  Bear this in mind if you want exact
  68.                            values.
  69.                                
  70.       "Crescendo Read"     Records are read alternatingly in from the end of
  71.                            the file and the beginning file.  This is to say,
  72.                            record 1, 10000, 2, 9999, 3, 9998, 4, 9997 etc.
  73.                            Okay, Okay ... so my definition of Crescendo is
  74.                            backwards... They didn't spell the Macintosh
  75.                            correctly either.
  76.  
  77.       "Random Read/Write"  Random functions generate independent random
  78.                            reads and writes.
  79.  
  80.       "Read-by-1"          A random access file's records are being accessed
  81.                            one at a time.
  82.  
  83.       "Stepping-by-10"     A random access file's records are being accessed
  84.                            on every 10th record.
  85.  
  86.       "Write-by-10"        A random access file's records are being updated
  87.                            on every 10th record.
  88.  
  89.       "Overall"            This is the total time of all tests AND file
  90.                            deletes.  So, it might not reflect the sum
  91.                            of all tests exactly, but it should be very
  92.                            close.
  93.  
  94.       I just wanted to make those meanings a little clearer.
  95.  
  96.       ******************************************************************
  97.  
  98.           Usage of this program is:
  99.  
  100.           CT  </D:d><F:bbb></N:nnn></S></R></B></?>
  101.  
  102.             CT by itself will test the active drive that it is on with
  103.             the default record length of 32 bytes and 10,000 records.
  104.                             
  105.         Explanation of switches:
  106.  
  107.         /D:d    This specifies "d" as the drive to be tested.
  108.  
  109.         /F:b    This specifies the number of fixed bytes per record.
  110.                 It must be between 1 and 32,765.  The default is 32 bytes.
  111.                 Use this with the /N:n switch to enhance your testing.
  112.                 (Because of CR/LF usage in the file structure, the logical
  113.                 limit for a user input is 32,765 and not the allowable
  114.                 32,767)
  115.  
  116.         /N:n    This specifies the number of test records.
  117.                 Note, the only limitation here is the available space 
  118.                 on your test drive.  You can also go as small as
  119.                 you want, but you will reach a point where your test
  120.                 will lose its validity.
  121.                 The default value, if this switch is not used, is
  122.                 10,000 records.
  123.  
  124.         /P:ppp  This specifies the number of test passes.  In other words,
  125.                 the number of times that the test will repeat.  If this
  126.                 option is > 1 then when the passes have all completed,
  127.                 a Summary screen appears with average sequential, random
  128.                 and total times.  If there is only one pass, then the
  129.                 summary screen will not be displayed
  130.  
  131.         /B      Test both sequential and random access records.
  132.         /R      Test random access records only.
  133.         /S      Test sequential access records only.
  134.         /W      Wait after each screen (pause).
  135.         /X      Exclude run-time screen counters.
  136.  
  137.  
  138. Suggestions:
  139.  
  140. You might want to set up a batch file that purges your cache
  141. before CT is run.  This will allow the cache to have a little
  142. fairer test, as opposed to starting out partially full.
  143. Also, if you are interested in the actual hits on your cache, most
  144. cache programs (PC-CACHE and NCACHE for sure) have status switches
  145. that allow you to see the results from the cache's point of view.
  146.  
  147. The test file is written in the root directory of the target drive.
  148. The file name is TEST$$CT.SPD.  If the critter appears, don't panic!
  149. It probably didn't get deleted because of an interrupted test.
  150.  
  151. While it was never the intention of Cache Test to allow cross-machine
  152. comparisons, I have decided to allow the counters to be disabled using
  153. the /X switch.  On my system, an identical test with the counters
  154. disabled was 42% faster than with the counters enabled.   If you want
  155. to actually test the drive/cache subsystem without the video bottleneck,
  156. use this switch.
  157.  
  158. HISTORY:
  159.  
  160.       V4.1  11/13/91
  161.   
  162.             Well Owen, I thought about it.  The screen counters can
  163.             now be disabled using the /X switch on the command line.
  164.             Note, there are many variables that affect cache performance.
  165.             It was never my intention to test cache performance across
  166.             machines.  BUT, it is a good idea to allow the user the
  167.             ability to decide for his/her self as to whether they want
  168.             to or not.  If you disable the counters, there can be some
  169.             long pauses - especially for the Random Read/Write test - so
  170.             be patient.  CT now has the extremes - a lot of counters or
  171.             none at all ;-)
  172.  
  173.       V4.0  10/29/91
  174.   
  175.             Whew... This one has quite a few updates:
  176.  
  177.             1.  COLOR (makes things a lot easier to read).
  178.             2.  Tracking of timer ticks has been tightened down.
  179.             3.  Created the ability to perform a number of tests
  180.                 and then present a summary screen with averages
  181.                 using the /P:ppp switch.
  182.             4.  /W switch added for pausing after screens.
  183.  
  184.  
  185.       V3.5  9/03/91
  186.  
  187.             In response to Mike Focke's request for counters in the
  188.             crescendo and butterfly tests, I have again enabled them.
  189.             And Mike, thanks for the suggestions ;-)
  190.  
  191.       V3.1  8/26/91
  192.  
  193.             The timing routine is now based on the presence of 18.2
  194.             clock ticks per one second.  The 100ths decimal location is
  195.             still weak, but improved.
  196.  
  197.       V3.0  7/10/91
  198.  
  199.             Well, I accessed the BIOS segment for clock ticks to create
  200.             the decimal level counters.  The second decimal place is
  201.             weak in terms of its accuracy, but I decided to leave it in.
  202.             For those of you worried about significant digits, the 
  203.             algorithm used for this uses 18 clock ticks to generate one
  204.             second of time.
  205.  
  206.             The test records are now 32 bytes total.
  207.  
  208.             Output screen formatting is improved.
  209.  
  210.             If the program is invoked without any parameters, it executes
  211.             on the active drive with a 10,000 record test made up of 32
  212.             bytes.  All user input now occurs on the command line through
  213.             the use of switches.          
  214.  
  215.       V2.6  5/24/91
  216.  
  217.             I honestly did not intend another update so soon.  It was
  218.             pointed out to me that the file structure that I had been
  219.             using was variable.  As such, it made ratio comparisons
  220.             somewhat difficult.  Now, the default fixed record length
  221.             is 32 bytes (the test record count is still 10,000).  The
  222.             user can specify the record length by using the /F:bbbbb
  223.             switch.  "bbbbb" must be between 0 and 32,765.   Since the
  224.             values are now fixed, a user can do a little math (remember
  225.             that subject folks??) and discern the records per second and
  226.             so forth.  Do note, that two bytes are added to the test string
  227.             in the files (CR/LF to be exact) that is why the maximum byte
  228.             size that a user can specify is 32,765 and not the 32,767 legal
  229.             default limit.
  230.               
  231.       V2.5  5/22/91
  232.  
  233.             1.  An actual test file byte size field has been added.
  234.                 This should allow users to track the actual sizes of
  235.                 the test records being written.
  236.             2.  Some users suggested that truly random reads and writes
  237.                 should be added.  This serves to get away from any form
  238.                 of sequentialized data.
  239.             3.  Again, more cosmetic touchups.
  240.  
  241.       V2.0  5/16/91
  242.  
  243.             Due to some users having limited drive space, switches
  244.             were added to allow for different size tests to 
  245.             occur.  I was somewhat hesitant to do this because it
  246.             negated the ability to call results "standard," but 
  247.             what really is standard?
  248.  
  249.             Switches were also added to allow users to select 
  250.             what tests they want to run.  For now, all that can 
  251.             be specified is whether or not to run all tests, 
  252.             sequential tests only, or random tests only.
  253.  
  254.             The ButterFly test was also added in an attempt to 
  255.             give look-ahead caches a hard time.  Some of the 
  256.             caches that use a FIFO method of purging will have a 
  257.             heck of a time with this one.
  258.  
  259.             Added timers/cleared up timers for the sequential and 
  260.             overall tests.  Also speaking of timers, to avoid 
  261.             slowing down some routines, I have removed some of 
  262.             the video effects that were for the user's benefit 
  263.             only.
  264.  
  265.             Special thanks to Jonathan Fisk for all of his 
  266.             suggestions and debugging efforts.
  267.  
  268.             Special thanks also go out to Tim Akright, the sysop 
  269.             of Queued Access for all of his support.
  270.  
  271.  
  272.       V1.0  5/10/91
  273.  
  274.             Well, I released it.  That pretty well sums it up.
  275.  
  276.  
  277.         I hope this program helps you evaluate some of your problems
  278.         or even makes some solutions/benefits clear.  This program is
  279.         released as shareware.  Its price is $5 for each concurrently
  280.         used copy.  If you have any suggestions or comments, I'd REALLY
  281.         like to hear those too.
  282.  
  283.                 Sincerely,
  284.  
  285.                 George Spafford
  286.                 3001 LakeShore Drive, #329
  287.                 St. Joseph, MI 49085
  288.  
  289.         Data:  (616) 468-5026  Queued Access BBS 14.4Kb USR Dual HST
  290.                                FIDOnet: 1:2340/6
  291.                                (File Req's allowed or give a call & 
  292.                                 say "hi" to Tim, the BBS's sysop).
  293.  
  294.         And now for the unpleasantries:
  295.  
  296.         Code CopyRight:  July 1991
  297.         
  298.         CT IS DISTRIBUTED AS IS.  THE AUTHOR (GEORGE SPAFFORD) MAKES NO
  299.         WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  300.         TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
  301.         WITH RESPECT TO THIS SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL
  302.         THE AUTHOR BE LIABLE FOR ANY DAMAGES, INCLUDING LOST PROFITS, LOST
  303.         SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  304.         OUT OF THE USE OF OR THE INABILITY TO USE THIS PROGRAM.
  305.         ----------------------------------------------------------------
  306.         
  307.