Showing entries tagged [ar-4]

Effects of Clearing the Cache on Benchmarks

How to win friends and influence benchmarks...

I note that I have a shell in my nc_test4 directory, clear_cache.sh. I have to sudo to run it, but when I do, it has a dramatic effect on the time that the time series read takes.

The following uses the new (not yet checked in) test program tst_ar4_3d.c, which seeks to set up a simpler proxy data file for the AR-4 tests. I want to show that a simpler file (but with the same-sized data variable) has similar performance to the slightly more dressed up pr_A1 file from AR-4 that I got from Gary. That's because my simpler file is easier to create in a test program.

bash-3.2$ ./tst_ar4_3d -h 
cs[0] cs[1] cs[2] cache(MB) deflate shuffle read_hor(us) read_time_ser(us)
64    256   128   4.0       0       0       1420         2281847
bash-3.2$ ./tst_ar4_3d -h cs[0] cs[1] cs[2] cache(MB) deflate shuffle read_hor(us) read_time_ser(us) 64    256   128   4.0       0       0       81           3159
bash-3.2$ ./tst_ar4_3d -h cs[0] cs[1] cs[2] cache(MB) deflate shuffle read_hor(us) read_time_ser(us) 64    256   128   4.0       0       0       76           2983
bash-3.2$ sudo bash clear_cache.sh
bash-3.2$ ./tst_ar4_3d -h cs[0] cs[1] cs[2] cache(MB) deflate shuffle read_hor(us) read_time_ser(us) 64    256   128   4.0       0       0      1410         2504315

Wow, what a difference a cleared cache makes!

Here's the clear_cache.sh script:

#!/bin/bash -x 
# Clear the disk caches.
sync
echo 3 > /proc/sys/vm/drop_caches

NetCDF-4 AR-4 Performance Data With One Time Series

Another concern that Russ and Dennis and I had was that by taking 5 time series, we were involving the cache too much. Might the data not be already pre-loaded after the first time series is retrieved?

So in this run I do one one time series read. This is all on the 3D precip flux data that Gary gave us.

cs[0] cs[1] cs[2] cache(MB) deflate shuffle read_hor(us) read_time_ser(us)
0     0     0     0       0       0       247          5073
256   64    128   4        0       0       238          2162
256   64    128   32        0       0       172          47050
256   64    128   128       0       0       165          42516
256   64    256  4         0       0       89           2061
256   64    256   32        0       0       136          83352
256   64    256   128       0       0       112          80282
256   128   128   4         0       0       217          2119
256   128   128   32        0       0       153          83400
256   128   128   128       0       0       128          80055
256   128  256   4         0       0       78           2250
256   128  256   32        0       0       188          188474
256   128   256   128       0       0       133          177679
1024  64    128   4         0       0       230          1952
1024  64    128   32        0       0       108690       52045
1024  64    128   128       0       0       216          49018
1024  64    256   4         0       0       88           2100
1024  64    256   32        0       0       87           1964
1024  64    256   128       0       0       175          95524
1024  128   128   4         0       0       218          2064
1024  128   128   32        0       0       218          1991
1024 128   128   128       0       0       194          95595
1024  128   256   4         0       0       76           2128
1024  128   256   32        0       0       76           2041
1024  128   256   128       0       0       198          197824
1560  64    128   4         0       0       229          1973
1560  64    128   32        0       0       229          1915
1560  64    128   128       0       0       161078       37119
1560  64    256   4         0       0       87           2178
1560  64    256   32        0       0       87           2105
1560  64    256   128       0       0       160058       72695
1560  128   128   4         0       0       214          2048
1560  128   128   32        0       0       213          1980
1560  128   128   128       0       0       159984       73765
1560  128   256   4         0       0       78           2284
1560  128   256   32        0       0       76           1954
1560  128   256   128       0       0       76           1947

Sorry about the alignment of the columns, but they show up fine for me in emacs. Obviously this fancy web technology is only a few years away from doing what emacs could do in 1981...

NetCDF-4 AR-4 Performance Data With Horizonatal and Time Series Reversed

Russ, Dennis and I discussed some of the chunking results yesterday. We were concerned that the horizontal reads were causing all the data to be preloaded into cache for the subsequent time series read. So I swapped the order - now the time series read is done first.

Here's some results. The first line are the results for reading a classic netCDF file.

cs[0] cs[1] cs[2] cache(MB) deflate shuffle read_hor(us)  read_time_ser(us)
0     0     0     0         0      0        247           5908
256   64    128   4         0      0        241           2039
256   64    128   32        0      0        168           31384
256   64    128   128       0      0        140           17096
256   64    256   4         0      0        93            2548
256   64    256   32        0      0        136           55722
256   64    256   128       0      0        106           26892
256   128   128   4         0      0        216           2035
256   128   128   32        0      0        152           55488
256   128   128   128       0      0        121           26698
256   128   256   4         0      0        79            2392
256   128   256   32        0      0        188           191120
256   128   256   128       0      0        136           186396
1024  64    128   4         0      0        236           1945
1024  64    128   32        0      0        108356        53812
1024  64    128   128       0      0        220           19551
1024  64    256   4         0      0        89            1930
1024  64    256   32        0      0        89            1864
1024  64    256   128       0      0        209           40942
1024  128   128   4         0      0        222           2065
1024  128   128   32        0      0        220           1833
1024  128   128   128       0      0        227           41183
1024  128   256   4         0      0        77            1894
1024  128   256   32        0      0        76            1839
1024  128   256   128       0      0        199           207533
1560  64    128   4         0      0        234           1885
1560  64    128   32        0      0        233           1850
1560  64    128   128       0      0        161596        14921
1560  64    256   4         0      0        88            1969
1560  64    256   32        0      0        87            1929
1560  64    256   128       0      0        160939        30848
1560  128   128   4         0      0        218           1924
1560  128   128   32        0      0        218           1875
1560  128   128   128       0      0        161316        30876
1560  128   256   4         0      0        77            1857
1560  128   256   32        0      0        76            1797
1560  128   256   128       0      0        76            1796

Again, there are many chunk size selections which beat the classic netCDF file performance.

Even More Performance Data for NetCDF-4 On AR-4 File

Here's a set of benchmarking results to ponder:

cs[0]  cs[1]  cs[2]  cache(MB)  deflate  shuffle  read_hor(us) read_time_ser(us)
0    0    0    0        0    0        246         3908
1     16     32    4        0     0        678        158842
1     16    32    32       0     0        703         60649
1     16     32    128        0    0        704         60073
1    16     128    4       0     0        233        50186
1     16     128    32         0    0        253         121418
1     16    128    128        0    0        251        23324
1    16    256    4        0    0        151         40377
1     16     256    32         0    0        167         106875
1     16     256    128        0    0        184        22115
1     64     32    4        0    0        269         49471
1     64    32    32         0    0        286         86265
1     64    32    128        0    0        285         22933
1    64     128    4         0    0        144        39626
1     64     128    32        0     0        158         93995
1    64     128    128        0    0        176        19252
1     64    256    4         0    0        125         59562
1     64    256    32         0    0        127         89096
1     64     256    128        0    0        141        38744
1     128    32    4         0    0        217         45392
1     128    32     32        0     0        224        110270
1     128    32     128        0    0        239         24357
1    128    128    4        0     0        130         55016
1     128    128    32        0    0        137        84879
1    128    128    128        0     0        150         37176
1     128    256    4        0    0        102        82356
1     128    256    32        0     0        108         101119
1    128    256    128        0    0        120         143347
10     16    32     4        0     0        560        3862
10     16    32    32        0    0        574         3023
10    16    32    128        0     0        596        2165
10     16    128    4        0    0        211         6783
10    16    128    32        0     0        222       7965
10     16    128    128        0    0        235         3805
10    16    256    4        0     0        135        9760
10     16    256    32        0    0        148         11471
10     16    256    128        0     0        157         6161
10    64    32     4        0     0        241        6165
10     64    32     32         0    0        250         7304
10     64    32     128        0     0        263        3517
10    64    128    4        0     0        135         18767
10     64    128    32        0     0        145         21202
10    64    128    128        0     0        155        5397
10     64    256    4        0     0        102         31856
10    64    256    32         0     0        110        34256
10     64    256    128        0     0        120         11744
10     128   32     4        0     0        186         9587
10     128   32     32        0     0        198        11277
10     128   32     128        0     0        208         5963
10    128   128    4         0     0        118        31822
10     128   128    32         0    0        127         34339
10     128   128    128        0     0        137         11778
10     128   256    4         0     0        95          66583
10     128   256    32        0     0        101         65303
10    128   256    128        0     0        116        61578
256     16    32     4        0     0        10728        1370
256     16    32     32        0     0        555         1350
256     16    32     128        0     0        566        765
256    16    128    4        0     0        10924        4929
256    16    128    32        0    0        228        5459
256     16    128    128        0     0        247         3526
256     16    256    4        0     0        11189        9961
256     16    256    32        0     0        154        9276
256    16    256    128        0     0        159        5912
256    64    32     4        0     0        10965        4973
256     64    32     32        0     0        263         4827
256     64    32    128        0     0        267        2684
256     64    128    4         0     0        225         1637
256    64    128    32        0     0        163        19207
256    64    128    128        0     0        160         4680
256     64    256    4         0     0        83        1602
256     64    256    32         0     0        139       35278
256     64    256    128        0     0        134         12680
256    128   32     4        0     0        11319        9963
256    128   32     32        0     0        208        9266
256     128   32    128        0     0        212         5892
256     128   128    4         0     0        216        1693
256     128   128    32        0     0        155         35481
256    128   128    128        0     0        148        12731
256    128   256    4         0     0        69         1598
256     128   256    32         0     0        164        160629
256     128   256    128        0     0        155         154782
1024    16   32     4        0     0        42966        1616
1024    16    32     32         0     0        40867        1431
1024    16    32     128        0     0        565        973
1024    16    128    4         0     0        302         1622
1024    16    128    32         0     0        49018        6434
1024    16    128    128        0     0        256        4686
1024    16    256    4         0     0        120         1452
1024    16    256    32         0     0        38800        10148
1024    16    256    128        0     0        169        9740
1024    64    32     4        0     0        681         1463
1024    64    32     32         0     0        40196        5385
1024    64    32    128        0     0        274        4271
1024    64    128    4        0    0        231        1599
1024    64    128    32        0     0        92258        46865
1024    64    128    128        0    0        204         13802
1024    64    256    4         0     0        81        1541
1024    64    256    32         0    0        79         1531
1024    64    256    128        0     0        178        35534
1024    128   32     4        0    0        641        1580
1024    128   32     32         0     0        39225        10224
1024    128   32     128        0    0        223         9788
1024    128   128    4        0     0        221        1622
1024    128   128    32        0    0        221         1613
1024    128   128    128        0     0        194        35413
1024    128   256    4         0    0        68         1574
1024    128   256    32         0     0        68         1562
1024    128   256    128        0     0        169        178748
1560    16   32     4        0     0        64666        1225
1560    16    32     32         0     0        62167        995
1560    16    32     128        0     0        59672        610
1560    16    128    4        0     0        300        1491
1560    16    128    32        0     0        59760        4155
1560    16    128    128        0     0        58138        2532
1560    16    256    4         0     0        128         1631
1560    16    256    32         0    0        74452        9566
1560    16    256    128        0     0        77289        8045
1560    64    32     4        0     0        695         1570
1560    64    32     32         0     0        74121        4917
1560    64    32     128        0     0        78406        3328
1560    64    128    4        0     0        228         1657
1560    64    128    32        0     0        227         1655
1560    64    128    128        0    0        158447       8447
1560    64    256    4         0     0        96         1721
1560    64    256    32        0    0        96         1726
1560    64    256    128        0     0        157660       31986
1560    128   32     4         0    0        637         1621
1560    128   32     32         0     0        75336        9685
1560    128   32     128        0    0        77909        8133
1560    128   128    4         0     0        221        1827
1560    128   128    32        0     0        219        1814
1560    128   128    128        0     0        157832       32289
1560    128   256    4         0     0        76        1754
1560    128   256    32         0    0        75        1751
1560    128   256    128        0    0        76        1750

Does (Cache) Size Matter, Continued...

Now for this file, I get results that make sense:

bash-3.2$ ./tst_ar4 -h pr_A1_50_16_64.nc 
cs[0] cs[1]  cs[2] cache(MB)  deflate  shuffle  read_hor(us)  read_time_ser(us)
50    16    64    4        1    0        157932        155803
50    16     64    16         1    0        3473         155237
50    16    64    32         1    0        3479        146510
50    16    64    64        1    0        3487        120306
50    16     64    128        1    0        3499         64149

Now the best performance comes from the largest cache.
Unidata Developer's Blog
A weblog about software development by Unidata developers*
Unidata Developer's Blog
A weblog about software development by Unidata developers*

Welcome

FAQs

News@Unidata blog

Take a poll!

What if we had an ongoing user poll in here?

Browse By Topic
Browse by Topic
« April 2024
SunMonTueWedThuFriSat
 
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today