home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / sysb094e.zip / dontread.hch < prev    next >
Text File  |  1997-11-30  |  21KB  |  560 lines

  1.  
  2. Prelude for those that don't read the documentation:
  3.   Do not mail me bug reports. I can't fix them... Other opinions on the 
  4.   program are welcome.
  5.   I do not know if this program works on a CPU without math co-proc (like the
  6.   486-SX)
  7.  
  8. System Benchmark "SysBench" 0.9.0
  9. ---------------------------------
  10.  
  11. (C) 1994 Henrik Harmsen
  12. The disk IO code: (C) 1994 Kai Uwe Rommel
  13.  
  14. Contents:
  15.  
  16.   1 Introduction
  17.   2 Tests
  18.   3 Copyright notice
  19.   4 Thanks
  20.  
  21.   Appendix A : Todo
  22.   Appendix B : Building
  23.   Appendix C : Example results
  24.  
  25. ---
  26.  
  27.  
  28.  
  29. 1 Introduction
  30.  
  31.  
  32. I thought OS/2 needed a benchmark program, so I wrote one. This
  33. program is not quite finished, and probably never will be, not by me
  34. anyway, since I'm saying goodbye to OS/2 and turning my attention to
  35. Linux. The reasons for this has not so much to do with OS/2, which is
  36. still a great OS, as it has to do with Linux. Linux is slick,
  37. super-fast, finally has drivers for my Viper card, has free TCP/IP and
  38. last but not least, Linux is Unix.
  39.  
  40. This means I am probably not going to make updates to this program,
  41. since I won't have OS/2 on my disk anymore. I'm saying probably, since
  42. I can't read the future. Maybe one day my whimsical mind will think
  43. OS/2 is more fun that Linux, who knows ? :-)
  44.  
  45. It also means that I am donating this program to anyone who is willing
  46. to continue working on it. If you think you want to continue working
  47. on this program, make sure you clearly note that this is released by
  48. you, not me. To do this, change the version number to 0.9.0xxx, where
  49. xxx are your initials. For example 0.9.0hch, which would indicate that
  50. I (Henrik C Harmsen) has made this release. The version numbering
  51. scheme should follow that of GCC. The first number is the major
  52. release number, to be increased when major enhancements have been made
  53. to the program or it is considered out of beta. The second number is
  54. the minor release number, increase it when you have made small changes
  55. to the program. The last number should be increased when making
  56. bug-fixes only.
  57.  
  58. Take a look at the appendices for more information on what needs to be
  59. done, what's not quite finished yet, and how to re-build the
  60. program. Among other things, this document needs rewriting.
  61.  
  62. Do not send me complaints about bugs and errors, since I will have no
  63. way of fixing them...
  64.  
  65. Now, that said, let's take a look at what this program tests.
  66.  
  67.  
  68.  
  69.  
  70. 2 Tests
  71.  
  72. HANDLE WITH CARE! DO NOT BLINDLY TRUST BENCHMARK VALUES. THEY ARE ONLY
  73. GOOD IF YOU KNOW WHAT THEY ARE TESTING AND KNOW WHAT THEY ARE NOT
  74. TESTING...
  75.  
  76. The values obtained here are not useful for comparing against values
  77. obtained from other benchmarks programs. Even though one of the tests
  78. for example measure Linpack performance and yields a value in MFLOPS,
  79. this value is not useful in comparing with other values from a
  80. different benchmark program. The only exception here is the dhrystone
  81. 2.1 value which might possibly be compared to values from other
  82. dhrystone 2.1 benchmarks. As a rule: Only compare values with people
  83. running this same benchmark program.
  84.  
  85. Almost all tests are adaptive in that they will first measure the
  86. approximate speed of your computer so the test will take about 10-15
  87. seconds in total, no matter how slow or fast your computer is.  The
  88. ones that are not adaptive are the floating point tests and the
  89. CPU integer tests with the exception of the dhrystone test.
  90.  
  91.  
  92. 2.1 Graphic tests
  93.  
  94. These tests test how fast the video hardware/display driver
  95. combination can pump pixels to the screen. OS/2 has long had abysmal
  96. display drivers for many cards, these tests are meant to sort out
  97. whether they really are bad, good or stink.
  98.  
  99. Most window operations are using only a few key operations of the
  100. video card accelerator. Take a look at your windows, they're mostly
  101. built from filled rectangles, with some text and vertical and
  102. horizontal lines. Maybe a few bitmaps here and there (icons and such).
  103.  
  104. The PM-marks are calculated from the other values as a weighted
  105. arithmetic mean-value.
  106.  
  107.  
  108. 2.1.1 BitBlit S->S Copy
  109.  
  110. Tests the speed of the bitblit screen->screen copy operation. One of
  111. the most important values, since it affects how fast you can scroll
  112. text, and move large windows.
  113.  
  114.  
  115. 2.1.2 BitBlit M->S Copy
  116.  
  117. Tests the speed of the bitblit memory->screen copy operation. This
  118. affects how fast updates of large bitmaps are and all operations that
  119. copy data from RAM to Video RAM.
  120.  
  121.  
  122. 2.1.3 Filled rectangle, patterned filled rectangle.
  123.  
  124. Tests how fast the blitter can blank areas with a color or stipple
  125. pattern. When updating a window, the background is usually blanked
  126. with a single color or pattern before text or other things are drawn
  127. on it.
  128.  
  129.  
  130. 2.1.4 Lines
  131.  
  132. Tests the speed of line-drawing in different directions. The
  133. horizontal and vertical line drawing speed is important when drawing
  134. frames around windows and such.
  135.  
  136.  
  137. 2.1.5 Text render
  138.  
  139. Extremely important function for speedy updates in text editors, shell
  140. windows, word processors etc.
  141.  
  142.  
  143.  
  144. 2.2 CPU Integer tests
  145.  
  146. The CPU tests are divided into two sections, one to test 'integer'
  147. performance, meaning not only integer arithmetics but also every other
  148. 'normal' program that does some kind of data processing. 99% of all
  149. applications do not use floating-point arithmetic. Those that do are
  150. usually ray-tracers, scientific engineering type of programs etc.
  151.  
  152. The CPU-int marks are calculated as a weighted mean average of the other 
  153. tests.
  154.  
  155. 2.2.1 Dhrystone VAX MIPS
  156.  
  157. When reading about how many MIPS a computer performs, that is usually
  158. tested by running this Dhrystone test and adjusting the result to be
  159. relative to one VAX 11/780 MIPS. That means, this test does not
  160. benchmark the number of million instructions per second (MIPS) as
  161. defined by machine instructions, but rather a weighted value against
  162. the base reference of one VAX 11/780 MIPS.
  163.  
  164. This test uses very little memory, meaning it will measure the CPU
  165. performance only, not taking into account other vital parts as memory
  166. speed etc.
  167.  
  168. Here is an excerpt from the sources from where I got this program:
  169.  
  170.  "Dhrystone is a short synthetic benchmark program intended to be
  171. representative for system (integer) programming. Based on published
  172. statistics on use of programming language features: see original
  173. publication in CACM 27,10 (Oct 1984). Orginally published in ADA, now
  174. mostly used in C. Version 2 (in C) published in SIGPLAN Notices 23,8
  175. (Aug 1988), together with measurement rules. Version 1 is no longer
  176. recommended since state-of-the-art compilers can eliminate too much
  177. 'dead code' from the benchmark (However, quoted MIPS numbers are often
  178. based on version 1).  Problems: Due to its small size (100 HLL
  179. statements, 1-1.5 KB code), the memory system outside the cache is not
  180. tested; compilers can too easily optimize for Dhrystone; string
  181. operations are somewhat over-represented.  Recommendation: Use it for
  182. controlled experiments only; don't blindly trust single Dhrystone MIPS
  183. numbers quoted somewhere (don't do this for any benchmark)."
  184.  
  185. This test is based on the C-version of Dhrystone 2.1.
  186.  
  187. 2.2.2 Hanoi
  188.  
  189. An integer program which solves the Towers of Hanoi puzzle using
  190. recursive function calls.  It uses very little memory, and thus does
  191. not test memory speed.
  192.  
  193. 2.2.3 Heapsort
  194.  
  195. Tests how fast your computer can sort a large array of random values
  196. using the heapsort algorithm. Tests both CPU and memory speed.  The
  197. MIPS are just a measurement against some arbitrary base MIPS
  198. reference.  This test uses about 1 MB memory.
  199.  
  200. 2.2.4 Sieve
  201.  
  202. Tests how fast your computer can find lots of prime numbers using the
  203. sieve of Eratosthenes using arrays from 8 kB to 1.2 MB. The result is
  204. a weighted mean value of the different speeds. Tests both CPU and
  205. memory speed.
  206.  
  207.  
  208.  
  209. 2.3 CPU floating point tests
  210.  
  211. These tests measure how fast your computer is at floating point
  212. arithmetics. (Floating point means non-integer numbers like 2.3,
  213. 0.24 etc.)
  214.  
  215. The CPUfloat-marks are calculated as a weighted mean average of the
  216. other values.
  217.  
  218. 2.3.1 Linpack
  219.  
  220. This is the Linpack program (floating-point) converted to C.  Results
  221. here are sensitive to cache effects and memory speed. This version
  222. tests only the rolled double precision version.
  223.  
  224.  
  225. 2.3.2 Flops
  226.  
  227. Estimates MFLOPS rating for specific FADD, FSUB, FMUL, and FDIV
  228. instruction mixes. Four distinct MFLOPS ratings are provided based on
  229. the FDIV weightings from 25% to 0% and using register-register
  230. operations. Works with both scalar and vector machines. Since the
  231. program trys to maximize register usage the results are NOT sensitive
  232. to main memory speed. In this sense flops yields a peak rating. The
  233. four different values are used to get a weighted mean average.
  234.  
  235. 2.3.3 The Fast Fourier Transform
  236.  
  237. This program performs FFT's using the Duhamel-Hollman method for FFT's
  238. from 32 to 262,144 points in size.
  239.  
  240.  
  241.  
  242. 2.4 DIVE tests
  243.  
  244. DIVE means Direct Interface to video extensions. It is a library in
  245. OS/2 that gives fast access to video routines used for programming
  246. games or other very demanding graphic applications. It gives the games
  247. programmer access to the Holy Graal - a pointer to the frame buffer.
  248. The tests here are not incorporated into the benchmark since the DIVE
  249. functionality will not actually appear until OS/2 3.0. I will describe
  250. them, nonetheless.
  251.  
  252. The DIVE-marks are calculated as a weighted mean average of the other values.
  253.  
  254. 2.4.1 Video bus bandwidth
  255.  
  256. This test makes a copy of the frame buffer and copies it back to the
  257. screen a lot of times in order to measure how many bytes per second
  258. you can pump data to the video RAM. On my 486-66 machine with a
  259. Diamond Viper card this amounts to about 13 MB/s! That means about 42
  260. frames per second in 640x480x256...
  261.  
  262. 2.4.2 DIVE fun
  263.  
  264. This was an entry I added since I had a few ideas on fun screen hacks
  265. you can do with DIVE. One of them is smoothly turning the screen
  266. upside down and back again. The value obtained here will be highly
  267. correlated with the Video Bus Bandwidth test.
  268.  
  269. 2.4.3 Memory to screen copy with DIVE
  270.  
  271. DIVE has built-in routines for copying a large amount of data from RAM
  272. or Video RAM to the display with the help of an hardware blitter (if
  273. one is available), or software. There are three such tests. The first
  274. test just blits an image to the screen, the second performs
  275. pixel-doubling, effectivly doubling the size of the display. The third
  276. test tests arbitrary stretching of the bitmap when displaying it on
  277. screen. If you have Warp II or OS/2 3.0 you will have seen the ability
  278. to stretch a running video clip to any size you want. These tests are
  279. not finished yet.
  280.  
  281. 2.5 Disk IO tests
  282.  
  283. These tests were programmed by Kai Uwe Rommel, although I have made a
  284. lot of changes to his source code. Thanks Kai Uwe!. The tests are
  285. available as a free-standing package called diskio14.zip at
  286. ftp.cdrom.com. If there are any errors or strange behaviour in these
  287. tests then blame me, not Kai Uwe.
  288.  
  289. The test can test all you fixed disks in your system. There is a menu
  290. choice to change which disk to test.
  291.  
  292. The DiskIO-marks are calculated as a weighted mean average of the
  293. other values.
  294.  
  295. 2.5.1 Average seek time
  296.  
  297. Tests the average seek time of the currently selected disk. I have
  298. seen that this is often a bit higher than what the disk manufacturers
  299. promise... This is most likely due to different ways of testing
  300. things.
  301.  
  302. 2.5.2 Disk transfer speed.
  303.  
  304. Measures how fast the disk can be read NOT using the cache. When I
  305. first came across the diskio program by Kai Uwe, my disk performed at
  306. about 1.0 MB/s. I thought that was not very good, but perhaps
  307. acceptable. Then I started to muck around with the CMOS parameters and
  308. by changing the IO block read delay (I think that is what it was
  309. called) the speed of the disk jumped from 1.0 to 1.5 MB/s ! Not bad, I
  310. thought. But when I upgraded to Warp II the disk performance suddenly
  311. jumped to 2.2 MB/s. This is probably due to OS/2 using multiple mode
  312. block transfer mode. Then finally, I changed the AT bus speed from 8.3 MHz
  313. to 11 MHz and the disk transfer speed jumped again from 2.2 to 
  314. 2.6 MB/s !  
  315.  
  316. From this can be learned that there seems to be a lot that can be done
  317. about slow IO. Just be careful when you muck around with the CMOS
  318. parameters though, since there is a very high likelyhood of making
  319. mistakes that can make the machine unusable or prone to strange
  320. errors. Usually, this is not dangerous, just reset the value to the
  321. old one and your machine should perform as before. Sometimes, though,
  322. you _can_ destroy your computer by changing values incorrectly. Be
  323. warned...
  324.  
  325.  
  326.  
  327. 2.6 Memory speed tests
  328.  
  329. Memory speed seems to be a forgotten area when talking about the speed
  330. of a computer. You hear a lot about CPU speed and disk speed and video
  331. speed and such, but rarely of memory speed. This is wrong IMHO, since
  332. a lot of the performance of a computer has to do with memory IO. When
  333. PC Magazine measured memory speed in one of their grande tests they
  334. discovered a lot of difference between the good and bad performers. I
  335. would like to bring this fact into focus: Memory IO speed is a vital
  336. part of the performance of your computer, even more so with faster and
  337. faster processors. A really fast RISC processor can execute as much as
  338. 40 instructions in one memory read...
  339.  
  340. Of course, memory speed timing is a complex issue. How fast a memory
  341. access is depends on:
  342.   The pattern of the access     : Random, sequential, local, global ?
  343.   Cache                         : Primary and secondary cache size and type.
  344.   Virtual memory                : Paging algorithm, disk IO performace.
  345.   Motherboard Memory controller : This is the key component to fast mem IO
  346.   Speed of SIMMS                : 60, 70 or 100 ns?
  347.  
  348. etc. etc.
  349.  
  350. These tests are also limited. They cannot test the whole truth about
  351. the speed of your memory IO.
  352.  
  353. The Mem-marks are calculated as a weighted mean average of the other values.
  354.  
  355. 2.6.1 Memory copy
  356.  
  357. This test first allocates a chunk of memory and then reads and writes
  358. it back and forth a few times to "activate" the memory: Initialize the
  359. physical pages, and read it into the caches. This is done to obtain as
  360. stable as possible value between measures. It also has the effect of
  361. maximizing the access speed.
  362.  
  363. Then it proceeds to copy the first half of the memory to the second
  364. and then the second half to the first. This is to diminish the strange
  365. effects you get from write-through and copy-back caches.  When it says
  366. 5 kB copy, that means copying 2.5 kB back and forth.
  367.  
  368. You can clearly see the effects of your caches. As long as the access
  369. is within the cache, it is a lot faster. There is also another factor
  370. that will make the larger (80-160kB) values jump up and down, and that
  371. is the effect of virtual memory. The second level cache performs well
  372. on a sequential memory range, but the virtual memory will chop the
  373. physical memory into 4kB pages and shuffle them around in physical
  374. memory. If you are lucky, the physical pages are sequential but they
  375. don't have to be. When they are not, the pages are scattered around
  376. and the second level cache (which is almost always a direct-mapped
  377. cache) will have a larger probability of mapping several physical
  378. pages to the same area. Higher level cache (2-way, 4-way) techniques
  379. should help here, but that is not certain.
  380.  
  381. Again, CMOS settings can very much affect the speed of your memory
  382. access. Be sure to use as low value as possible on the various wait
  383. state entries and make sure the whole memory is cached, not just the
  384. first 16 MB if you have more.
  385.  
  386. 2.6.2 Memory read
  387.  
  388. Tested by calculating the checksum over the specified amount of bytes
  389. over and over again.
  390.  
  391. 2.6.3 Memory write
  392.  
  393. Tested by writing a value into all longwords of the specified amount
  394. of memory.
  395.  
  396.  
  397.  
  398. 3 Copyright notice
  399.  
  400. There is no warranty. Use this software at your own risk. Due to the
  401. complexity and variety of today's hardware and software which may be
  402. used to run this program, I am not responsible for any damage or loss
  403. of data caused by use of this software. It was tested and is expected
  404. to work correctly, but nobody can actually guarantee this for any
  405. circumstances. And because this software is free, you get what you pay
  406. for...
  407.  
  408. This program can be used freely for non-commercial purposes.
  409.  
  410.  
  411. 4. Thanks
  412.  
  413. Thanks to Kai Uwe Rommel (rommel@ars.muc.de) for supplying the disk IO
  414. benchmark code and to Al Aburto (aburto@marlin.nosc.mil) for supplying
  415. the CPU integer and CPU float benchmark code.
  416.  
  417.  
  418.  
  419.  
  420.  
  421.                           -- Henrik Harmsen 
  422.  
  423.  
  424. Email: harmsen@eritel.se
  425.  
  426.  
  427.  
  428.  
  429.  
  430. Appendix A - TODO
  431.  
  432.   1  Make the CPU integer and CPU float tests adaptive to the speed of the 
  433.      computer.
  434.  
  435.   2  DIVE: Support for bank-switched cards. Better error handling. Finish the
  436.      Memory->Screen bitblit tests.
  437.  
  438.   3  Graphics test: The Memory to screen bitblit copy is probably not
  439.      correct for 16 and 24 bit displays.
  440.  
  441.  
  442.  
  443.  
  444.  
  445. Appendix B - Building
  446.  
  447.   You need Cset++ 2.1. Cd src, run nmake. It is probably quite easy to 
  448.   port to emx-gcc.
  449.  
  450.   Why are all the source code files named pmb_* ? Well I first wanted
  451.   to call it PMBench, as a play with WinBench, but it turned out that
  452.   PC Magazine already had a PMBench program... So I changed the name
  453.   to SysBench, but I did not have time to change all the 'pmb' to 'sysb'...
  454.  
  455.  
  456.  
  457.  
  458.  
  459. Appendix C - Example results
  460.  
  461.  
  462. Example of a result file, when benchmarking my own system, which is:
  463.  
  464. Software:
  465. --------------
  466.   OS/2 2.11
  467.   Diamond Viper display drivers 1.02beta running 1024x768x8
  468.  
  469. Hardware:
  470. --------------
  471.   CPU     : 486DX2-66
  472.   Chipset : UMC
  473.   Cache   : 8 kB level 1, 256 kB copy-back level 2.
  474.   Memory  : 20 MB 70ns.
  475.   Harddisk: disk 1: Seagate 340 MB. disk 2: Conner CFA540A 540 MB.
  476.   Video   : Diamond Viper VLB, 2MB VRAM, 2.02 BIOS.
  477.  
  478. -------
  479.  
  480. Sysbench 0.9.0 result file created Sat Oct 22 14:31:27 1994
  481.  
  482.  
  483.  Graphics
  484.    BitBlt S->S cpy       :       52.640    Mpixels/s
  485.    BitBlt M->S cpy       :       15.581    Mpixels/s
  486.    Filled Rectangle      :      356.366    Mpixels/s
  487.    Pattern Fill          :       90.477    Mpixels/s
  488.    Vertical Lines        :        6.233    Mpixels/s
  489.    Horizontal Lines      :        9.656    Mpixels/s
  490.    Diagonal Lines        :        7.545    Mpixels/s
  491.    Text Render           :       18.553    Mpixels/s
  492.    ------------------------------------------------------------
  493.    Total                 :       73.835    PM-marks
  494.  
  495.  CPU integer
  496.    Dhrystone             :       39.800    VAX 11/780 MIPS
  497.    Hanoi                 :       27.083    moves/25 usec
  498.    Heapsort              :       19.290    MIPS
  499.    Sieve                 :       37.741    MIPS
  500.    ------------------------------------------------------------
  501.    Total                 :       32.938    CPUint-marks
  502.  
  503.  CPU float
  504.    Linpack               :        2.535    MFLOPS
  505.    Flops                 :        3.572    MFLOPS
  506.    Fast Fourier Tr.      :        4.291    VAX FFT's
  507.    ------------------------------------------------------------
  508.    Total                 :        3.472    CPUfloat-marks
  509.  
  510.  Direct Interface to video extensions - DIVE
  511.    Video bus bandw.      :       --.---    MB/s (on Warp II, this was ca. 13 MB/s)
  512.    DIVE fun              :       --.---    fps
  513.    M->S, DD,   1.00:1    :       --.---    fps
  514.    M->S, DD,   2.00:1    :       --.---    fps
  515.    M->S, DD,   2.43:1    :       --.---    fps
  516.    ------------------------------------------------------------
  517.    Total                 :       --.---    DIVE-marks
  518.  
  519.  Disk I/O - disk 2: 528 MB
  520.    Average seek time     :       16.852    ms
  521.    Transfer speed        :        1.990    MB/s
  522.    ------------------------------------------------------------
  523.    Total                 :        1.465    DiskIO-marks
  524.  
  525.  Memory
  526.    5    kB copy          :       61.561    MB/s
  527.    10   kB copy          :       49.211    MB/s
  528.    20   kB copy          :       33.167    MB/s
  529.    40   kB copy          :       25.707    MB/s
  530.    80   kB copy          :       25.571    MB/s
  531.    160  kB copy          :       17.578    MB/s
  532.    320  kB copy          :       15.526    MB/s
  533.    640  kB copy          :       13.385    MB/s
  534.    1280 kB copy          :       11.941    MB/s
  535.    5    kB read          :       70.885    MB/s
  536.    10   kB read          :       42.156    MB/s
  537.    20   kB read          :       42.970    MB/s
  538.    40   kB read          :       32.170    MB/s
  539.    80   kB read          :       31.747    MB/s
  540.    160  kB read          :       21.777    MB/s
  541.    320  kB read          :       19.533    MB/s
  542.    640  kB read          :       17.150    MB/s
  543.    1280 kB read          :       15.710    MB/s
  544.    5    kB write         :       50.263    MB/s
  545.    10   kB write         :       47.512    MB/s
  546.    20   kB write         :       49.802    MB/s
  547.    40   kB write         :       50.763    MB/s
  548.    80   kB write         :       48.561    MB/s
  549.    160  kB write         :       47.028    MB/s
  550.    320  kB write         :       44.140    MB/s
  551.    640  kB write         :       44.034    MB/s
  552.    1280 kB write         :       42.258    MB/s
  553.    ------------------------------------------------------------
  554.    Total                 :       28.007    Mem-marks
  555.  
  556.  
  557.  
  558.  
  559.  
  560.