CBC, Latches, and Response Time

Author: Craig Shallahamer (craig@orapub.com), Version 1d, 14-July-2011

Background and Purpose

The purpose of this notepad is to see if increasing CBC latches can decrease CPU and non-idle wait time per buffer get.

Experimental Data

Below is all the experimental data. The experiment was run on a Dell single four-core CPU, Oracle 11.2G. According to “cat /proc/version”: Linux version 2.6.18-164.el5PAE (mockbuild@ca-build10.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 02:28:20 EDT 2009. There was a tremendous CBC latch contention load, the OS was CPU bottlenecked at between 95% and 100% utilization and the CPU run queue between 5 and 12. For each sample set, 60 samples were collected each with an interval of 180 seconds. There was also a calm time of 4 seconds between each sample. When the number of latches was changed, the instance was (obviously) cycled, the number of latched  and chains checked, the identical CBC load program restarted, and the system was allowed to stabelize for three minutes before the sample collection began.

The order of sample data is sample number, elapsed time (seconds), buffer gets (session logical reads), instance non-idle wait time (sec), instance CPU consumption (sec), and DB time (sec).

ss256={1,181.093777,25616693,707.2,712.495681,1550.711189,2,180.24696,25259759,718.52,707.889377,1555.907435,3,180.605913,25387380,723.91,712.916611,1563.593177,4,180.739577,25302562,718.67,713.773486,1565.880753,5,181.073032,25340731,727.01,714.700339,1572.279433,6,180.891865,25187066,715.56,711.233875,1564.139884,7,180.303163,25235271,717.68,708.001367,1555.93942,8,180.327352,25232868,717.6,714.157421,1564.679035,9,181.135059,25171962,722.21,712.916613,1569.08229,10,180.749384,25158450,721.35,710.299014,1561.75544,11,180.354793,25146755,731.4,710.935912,1570.422466,12,180.423949,25272450,715.94,713.707492,1562.746141,13,181.27698,25161275,722.87,716.690035,1569.048431,14,180.910418,25234172,722.98,716.186117,1573.586826,15,180.442985,25217200,722.26,709.556125,1558.219369,16,180.453031,25136001,715.7,715.865163,1565.431488,17,180.400605,25105445,716.68,713.379542,1562.766046,18,180.363533,25078682,730.02,713.849473,1573.365168,19,181.134998,25090193,719.61,715.169263,1571.68373,20,180.771446,25109736,724.06,714.191418,1570.855844,21,180.306655,25086575,716.3,709.189186,1550.76848,22,180.776626,25078173,723.46,711.928761,1564.491226,23,180.376227,25116693,724.6,709.787092,1561.862668,24,180.450843,25112575,717.32,710.117036,1558.673067,25,180.594034,25033904,720.43,713.475535,1566.75662,26,180.493965,25078837,723.72,711.057898,1560.579815,27,180.534611,25039008,718.94,708.486281,1555.09808,28,180.525511,25038097,728.73,713.997452,1571.48528,29,180.868267,25053064,724.09,717.289955,1579.015314,30,180.726526,24990218,728.04,712.654654,1568.994234,31,181.064011,25074315,720.76,711.832778,1561.651717,32,180.842298,25005329,727.23,714.609357,1574.703246,33,181.394255,25035936,717.73,716.335097,1572.712571,34,180.460659,25051020,722.77,711.47683,1559.401316,35,180.570627,25039514,723.36,711.984756,1565.134863,36,180.427918,24989826,718.01,712.21372,1555.630302,37,180.998524,25002640,728.68,714.361392,1575.462081,38,181.062487,25007644,730.65,716.829024,1574.557354,39,180.934028,25005890,727.89,712.457681,1569.249521,40,181.68984,25027714,729.5,716.647043,1580.497725,41,181.118936,25005060,716.07,714.425386,1569.505682,42,180.238201,25014183,729.27,709.391153,1567.229449,43,180.745539,25011794,720.2,711.009901,1557.012562,44,180.439792,24934520,733.73,712.064739,1573.023074,45,180.417171,25004055,733.6,707.99536,1562.027266,46,180.446657,25012448,719.2,712.498677,1564.886116,47,180.549129,24924146,722.85,714.670351,1567.92741,48,181.238023,24968204,728.04,714.444378,1574.432192,49,181.225628,24929578,719.17,714.111438,1567.244159,50,180.747706,24899915,731.48,711.949759,1579.042365,51,180.586662,24960509,715.38,714.767333,1564.080677,52,180.452101,24897610,731.41,713.134579,1573.639061,53,181.218539,25012527,719.81,713.915463,1561.028973,54,180.386978,24872397,721.76,709.876075,1560.556377,55,180.670147,24993120,726.67,711.108889,1561.161963,56,180.346618,24854728,735.93,709.979059,1575.679359,57,181.389562,24974935,726.8,712.827631,1568.899526,58,180.855712,24850801,720.1,712.005754,1563.474324,59,180.786046,24923707,735.81,709.182183,1568.680915,60,180.805406,24991861,731.37,716.998998,1579.18981};
ss512={1,180.233063,39779831,454.43,709.958059,1364.234651,2,180.263832,38285018,478.07,711.783786,1387.57603,3,181.181679,38211836,473.41,715.570218,1395.601315,4,180.349925,38293845,479.54,712.224715,1395.112951,5,180.339543,38217153,481.25,714.968301,1397.939564,6,180.338193,38153874,473.07,716.177118,1392.458655,7,181.323378,38053395,475.87,716.275104,1400.867824,8,180.482484,38079312,490.14,714.399386,1409.831108,9,180.559139,37963737,475.87,718.143818,1396.964276,10,180.229625,37962643,471.32,710.550971,1382.137639,11,180.224537,37967643,485.12,709.816081,1396.612027,12,180.315353,38062847,491.64,713.834477,1404.260518,13,180.463202,38012250,474.79,715.409235,1396.526995,14,181.131785,38189095,475.63,714.906309,1395.623328,15,180.275086,38029210,483.91,710.707953,1394.321784,16,180.940879,38006493,471.6,715.927153,1394.704402,17,181.01487,37942398,481.79,718.120821,1407.713298,18,180.866583,38066258,469.19,717.267954,1397.959286,19,180.323329,38078626,481.74,711.470834,1392.440422,20,180.706259,37995711,481.34,714.724333,1397.557742,21,180.399353,37984356,477.88,711.687812,1386.71024,22,180.68622,37921962,478.66,715.26825,1402.772734,23,180.716063,38065041,471.53,715.199274,1389.023916,24,180.335274,37855384,476.82,711.290859,1392.013244,25,180.224958,37908019,475.23,709.877071,1391.716468,26,180.734148,37997775,476.98,714.199422,1394.816732,27,180.796058,38018006,467.62,710.800939,1376.857355,28,180.712536,38096550,485.27,715.289255,1401.551934,29,180.498593,37900926,475.15,714.12743,1392.047058,30,180.416971,38042364,486.97,712.917615,1392.213756,31,180.340371,38049305,469.93,715.103273,1394.43341,32,180.458729,38071866,488.08,716.685041,1402.47642,33,180.222422,37846863,472.73,715.49922,1391.545954,34,180.216384,37858211,475.23,709.918073,1388.967234,35,181.142408,37933529,485.62,719.622592,1414.920925,36,180.614386,37779994,476.86,713.334549,1392.772589,37,180.618187,37853855,473.47,715.414236,1397.025521,38,180.261776,37866309,479.68,716.789026,1400.222894,39,180.897266,37995511,489.23,714.310405,1400.836981,40,180.222029,37914375,473.14,713.832473,1392.761912,41,180.235059,37821973,469.19,713.286558,1391.469702,42,181.134755,37767491,478.03,717.989838,1405.016423,43,180.322757,37811689,481.45,713.571518,1397.092807,44,180.229962,37783181,489.84,715.014298,1407.828917,45,180.31336,37830132,480.12,716.196116,1402.243978,46,180.259489,37774428,470.83,710.727943,1387.514677,47,180.512944,37942862,479.99,714.468379,1404.008384,48,180.269362,37940420,482.96,713.578516,1395.056871,49,180.322419,37848657,474.09,714.180418,1391.899063,50,180.839975,37901488,480.28,715.811174,1399.56911,51,180.258246,37794157,482.94,711.698805,1396.066035,52,181.01761,38130278,483.63,714.406386,1396.148474,53,180.571228,37844856,484.83,714.902311,1395.308645,54,181.643591,37837865,493.12,716.463079,1416.081375,55,180.447364,37910446,474.74,716.227113,1397.185238,56,180.246418,37789291,467.61,713.317553,1384.04865,57,180.224919,37831146,479.99,710.355,1389.815216,58,180.422642,37815169,490.68,712.07574,1399.473327,59,180.267498,37748598,488.08,714.974308,1406.63575,60,180.324869,37793252,476.59,712.611659,1394.710783};
ss1024={1,180.227828,53511906,255.55,716.639049,1219.189951,2,180.295481,51829147,277.65,707.085496,1238.224708,3,180.294682,51951582,291.92,702.776155,1237.565301,4,181.089126,52276251,257.34,713.902461,1226.619335,5,180.584455,52158819,287.12,714.364394,1245.807111,6,180.501997,52488981,290.69,714.933313,1249.606903,7,180.67246,52472769,263.66,717.978844,1235.642777,8,180.356081,52152842,285.81,712.659657,1242.887298,9,180.218457,52016935,282.39,714.495366,1242.603546,10,180.305083,52538163,278.05,714.343395,1234.816517,11,180.365859,52111286,282.45,713.248563,1238.590969,12,180.220939,52059788,293.49,709.563125,1246.671279,13,180.402021,52100434,282.29,711.682804,1238.297702,14,180.218969,52116724,292.24,712.766631,1250.747495,15,180.289304,52204614,288.2,717.172965,1247.038756,16,181.115226,52318112,284.15,717.821872,1253.620634,17,180.886234,52324903,286.23,718.424777,1256.288,18,180.501416,51255012,291.43,703.174098,1241.120701,19,181.510528,51686588,286.25,708.231327,1246.059093,20,180.585591,51445208,283.6,705.231784,1245.422872,21,180.993198,51728769,288.97,712.377697,1245.900229,22,180.516338,51885737,273.99,712.043747,1233.995914,23,180.280839,51590830,253.95,705.752704,1214.866816,24,180.360141,51323478,302.32,703.835993,1255.218292,25,180.653379,51016098,308.41,695.199304,1257.672823,26,181.230848,52047598,292.01,712.629659,1250.979417,27,180.420856,51829394,294.06,711.106889,1247.757158,28,180.561004,51985783,292.68,714.231417,1253.849245,29,180.261731,51649907,295.24,707.277473,1242.050886,30,180.245699,51897751,293.88,712.797632,1251.372773,31,180.654776,52291327,279.34,716.161122,1242.390026,32,180.22165,51760385,286.53,712.3547,1247.284561,33,180.59866,51860494,247.18,714.78733,1212.984237,34,180.221648,51484486,283.17,710.984911,1238.425757,35,180.30421,51450240,277.33,711.057892,1245.320109,36,180.251284,51611997,268.58,710.566971,1230.892917,37,180.649321,51788738,271.96,713.60251,1242.040383,38,181.164405,51671885,288.2,715.851166,1252.854931,39,181.410594,51924776,286.68,715.319248,1252.818689,40,180.286354,51843528,287.68,710.993905,1243.069986,41,180.445623,50744522,291.83,699.201699,1249.551698,42,180.226128,51818393,251.33,711.871774,1219.936739,43,180.318359,51955374,294.96,713.566517,1253.766454,44,180.218161,52205533,284.46,715.839168,1255.492034,45,180.355895,51670391,277.35,710.598971,1232.624587,46,180.928183,51734966,289.18,710.313007,1247.941596,47,180.248328,51825440,282.2,707.951369,1237.340588,48,181.906506,51319988,289.89,712.842625,1257.103162,49,180.875368,51912704,282.53,718.191812,1248.971564,50,180.254102,51789207,295.18,713.903465,1255.749247,51,182.414748,52335278,291.38,721.892251,1263.872309,52,181.027473,52145082,300.47,718.637743,1262.942663,53,180.714668,51832110,283.07,718.220811,1247.533837,54,181.050815,51850253,285.94,718.368787,1251.98263,55,180.393616,51963262,278.23,718.274794,1243.96744,56,180.617253,51897672,296.91,716.091134,1251.59526,57,180.576648,51870355,292.61,717.121978,1255.674533,58,180.218878,51570780,283.96,713.158576,1240.872921,59,180.317543,51901468,292.98,711.638813,1244.788293,60,180.588831,51676381,263.79,708.106346,1228.153002};
ss2048={1,180.25324,64415689,116.01,699.938583,1088.331351,2,180.677454,63798716,104.94,709.352155,1098.480442,3,180.234369,63531645,123.6,695.120321,1095.681444,4,180.264392,63450441,116.46,703.684014,1096.875565,5,180.203889,63518543,115.42,701.301384,1089.518503,6,180.377959,63724194,125.51,704.829838,1099.03548,7,180.428746,63452186,122.32,704.103954,1098.827736,8,180.212122,63173629,123.08,703.072111,1102.507959,9,180.213185,63707261,108.71,708.952216,1096.046367,10,181.264772,62677351,188.2,712.167726,1161.850681,11,180.230775,61685314,291.02,713.953459,1186.969497,12,180.510684,60557042,320.63,702.782152,1192.279756,13,180.348218,61323405,288.37,712.887617,1186.366951,14,180.243004,60818542,312.89,702.759158,1191.055762,15,180.655557,61506640,295.09,711.885771,1186.24254,16,180.304786,61151583,299.48,710.381997,1191.937151,17,180.657685,61765140,283.94,715.194273,1184.69742,18,180.339888,61490889,292.37,711.563819,1183.54961,19,180.769007,59974194,309.29,711.208878,1195.505264,20,180.229635,59123423,307.63,717.74288,1210.622668,21,180.34817,59000546,306.95,712.455682,1197.397652,22,180.39317,58898086,313.26,713.313557,1207.374656,23,180.850871,58960104,309.43,714.53737,1200.56348,24,180.226265,59054411,303.14,711.394842,1193.782982,25,180.472308,59190988,310.76,716.213114,1213.016216,26,180.516322,59120751,310.01,716.453078,1203.110223,27,180.330106,59064292,306.54,715.607203,1202.145877,28,180.228721,59047902,309.9,713.250561,1205.74163,29,180.218604,58956637,309.3,711.994757,1199.57604,30,180.269555,58398819,308.05,706.262631,1197.213014,31,180.956597,58693845,311.34,710.071045,1197.012035,32,180.745797,59023043,300.86,714.593361,1202.062291,33,180.312287,59126031,304.64,713.318552,1196.665654,34,180.214622,59290946,304.56,712.892624,1195.850981,35,180.229548,58927025,310.26,717.630894,1209.874739,36,180.240638,59020185,302.22,712.847627,1195.556872,37,180.201784,58802108,314.03,712.534672,1206.180818,38,180.311521,59068153,309.14,716.385088,1204.673334,39,180.347255,59043657,299.33,711.878773,1191.778239,40,180.231803,58865529,305.35,711.0389,1196.964481,41,180.642941,58771608,312.45,715.04029,1213.529323,42,180.294671,58854350,312.7,709.556125,1198.552209,43,180.54439,58913513,300.37,714.226414,1199.052137,44,180.747228,58983156,309.57,709.507134,1194.386546,45,180.331381,59036979,313.86,710.976911,1201.323593,46,180.249918,59021772,311.13,712.163732,1197.533189,47,180.469864,58946912,314.16,718.435768,1214.312414,48,180.353224,59009564,310.21,712.63166,1205.406737,49,181.161106,58846982,308.99,717.343942,1205.928331,50,180.279246,58677871,304.75,716.176117,1202.678903,51,180.220738,58849304,313.79,712.708647,1205.55396,52,180.883722,58848509,315.09,714.669347,1208.130469,53,180.485361,58783433,313.76,710.124043,1199.844518,54,180.239983,58627165,309.98,707.533427,1203.458916,55,180.249819,58745042,314.35,709.742096,1204.36485,56,180.337676,58941001,307.54,715.347246,1202.712831,57,180.226582,58821309,310.55,712.452687,1203.498691,58,180.478155,58427190,319.66,711.607814,1208.383657,59,180.346022,58728118,305.71,710.404998,1195.714675,60,180.907704,58750018,314.36,716.455075,1207.958267};
ss4096={1,180.232239,70571051,82.2,705.472742,1060.38432,2,180.487527,70174358,84.76,697.244,1061.324129,3,180.329784,68885933,92.92,686.913569,1065.33443,4,180.212066,69583372,89.43,694.795369,1066.214295,5,180.235112,69226302,96.29,689.130225,1060.873715,6,180.228839,70190030,100.44,702.827147,1066.973286,7,180.344807,69541549,86.83,698.518807,1070.585292,8,180.224323,69231665,88.68,691.190919,1069.893493,9,180.225351,70065589,92.64,698.270842,1061.206138,10,180.452496,69767005,91.62,701.605336,1072.703582,11,180.217513,69908726,91.87,696.607092,1064.005011,12,180.243545,71058509,78.46,714.196417,1070.872383,13,180.228619,69708450,90.48,691.556857,1054.560259,14,180.213049,69200984,102.09,692.09078,1068.878659,15,180.38508,69410476,97.01,693.047635,1068.785337,16,180.306674,69813934,86.27,698.807764,1071.880178,17,180.226614,69616131,93.24,695.601248,1063.567817,18,180.228583,70973302,78.41,706.134646,1061.024904,19,180.32175,69591098,100.1,697.088017,1076.156751,20,180.229203,69857640,92.62,698.365833,1061.682449,21,180.342839,70252778,96.14,698.468808,1070.108779,22,180.28683,70359972,91.08,705.864687,1069.218363,23,180.218131,69787290,91.12,698.964738,1067.034371,24,180.203648,70236254,87.67,706.354614,1066.26405,25,180.22997,69875574,92.29,697.08602,1062.736081,26,180.229967,69475423,86.84,691.600852,1065.683106,27,180.229141,69777598,91.09,697.459966,1063.788653,28,180.289519,69652673,90.94,696.773071,1061.841847,29,180.411766,69541311,92.7,694.749376,1066.144783,30,180.401719,69425506,89.1,692.477717,1064.697137,31,180.223917,69947862,88.69,697.877909,1064.775108,32,180.230879,69622436,91.63,696.837054,1062.46581,33,180.227068,68444829,96.13,681.618376,1062.719365,34,180.212391,69259164,89.41,690.703988,1066.796985,35,180.239001,69806767,95.87,698.199851,1059.396323,36,180.203333,70185562,97.65,704.531889,1070.207848,37,180.23123,71079674,76.19,704.63487,1052.771673,38,180.382185,69581311,97,695.267297,1071.457738,39,180.24282,69870989,92.99,700.908437,1071.691932,40,180.224314,69067276,104.87,685.901719,1068.677237,41,180.221019,68701147,99.17,684.715903,1060.496365,42,180.219736,69836539,83.92,699.806611,1067.943415,43,180.222515,70554513,79.96,703.47805,1055.975699,44,180.214606,69966144,91.39,698.389821,1064.590124,45,180.252483,70109119,94.17,701.572338,1067.217335,46,180.214282,70072969,94.52,699.2127,1061.10434,47,180.20621,69335277,87.54,696.326133,1076.201408,48,180.230711,69670671,92.51,696.287149,1062.378861,49,180.228043,70719923,75.72,707.678411,1060.519277,50,180.329342,69518737,96.89,696.976035,1074.323707,51,180.225106,70604434,87.67,705.06881,1062.383584,52,180.223873,70233642,82.47,702.862144,1063.800171,53,180.21747,69353400,99.25,696.212155,1077.01888,54,180.484671,70245466,89.56,702.923127,1072.131412,55,180.221075,70266249,80.99,703.227089,1062.9361,56,180.331909,70221274,83.2,703.263078,1066.056114,57,180.224729,69451729,87.58,696.242154,1069.206024,58,180.364813,68513708,93.22,685.687756,1070.631064,59,181.065297,69278800,94.23,696.248148,1073.042319,60,180.325776,69336384,96.94,694.584399,1071.274958};
ss8192={1,180.217151,74774687,62.44,703.468057,1042.35379,2,180.327481,74174241,72.21,699.154709,1041.156993,3,180.211468,73783895,75.89,690.856971,1040.773831,4,180.222323,73859573,67.72,695.622242,1046.461231,5,180.245719,74516434,76.15,697.575945,1037.286037,6,180.254704,74477478,69.6,694.674382,1035.100829,7,180.227057,73496834,71.1,684.71991,1040.774794,8,180.239023,73294243,68.57,686.989551,1044.231262,9,180.207148,72719119,74.46,680.954474,1052.368837,10,180.203466,73967835,73.06,692.652698,1046.327069,11,180.204908,74164293,66.84,695.638241,1043.243571,12,180.214893,74318145,75.09,698.745767,1046.662023,13,180.2238,72707364,80.44,683.610065,1054.122634,14,180.224768,74563980,65.38,703.953978,1043.167261,15,180.225059,75515564,59.04,711.698799,1041.186799,16,180.284632,74144536,67.32,695.557255,1049.351286,17,180.212262,73964584,78.1,692.572704,1047.338677,18,180.209348,74515923,70.72,699.017724,1039.855161,19,180.2346,72836749,77.7,683.726052,1052.414187,20,180.21427,73917925,67.08,694.99134,1053.007201,21,180.301481,72882492,82.81,685.369797,1054.881146,22,180.221159,72727369,83.77,684.793889,1055.981079,23,180.304452,73604513,68.83,690.971953,1040.787689,24,180.222958,73926558,73.94,696.607095,1048.05399,25,180.225691,74420208,66.13,702.176251,1039.300812,26,180.524429,74385548,58.93,701.658326,1040.75932,27,180.21795,73353098,69.22,690.918962,1048.885365,28,180.225156,73492896,71.5,687.691448,1048.527491,29,180.225978,73031910,80.51,685.638763,1047.731584,30,180.22169,74920311,59.67,707.694406,1044.255024,31,180.204024,75021629,65.01,703.690017,1039.734588,32,180.218879,73871138,63.41,697.586947,1046.540396,33,180.199581,73992696,66.8,694.215459,1048.441411,34,180.204547,75091812,59.63,706.405607,1051.645423,35,180.215656,73089658,75.38,688.202372,1049.188833,36,180.214536,73606667,76.2,693.457575,1043.807614,37,180.227827,74089409,63.76,696.130164,1040.435586,38,180.288328,72132951,77.43,675.069374,1044.111584,39,180.223997,73685486,74.54,691.183914,1041.705398,40,180.540022,74030694,72.04,697.195,1048.246972,41,180.214898,73450822,72.37,689.067237,1045.821339,42,180.298144,74250910,62.07,700.253541,1049.841388,43,180.203861,74625508,69.59,704.349916,1049.366535,44,180.324255,74381608,70.75,700.140557,1052.036298,45,180.421725,73634208,76.95,689.358193,1049.910767,46,180.227527,73883141,75.07,694.35444,1050.662826,47,180.387704,73789272,75.74,691.395885,1049.925526,48,180.272468,74896511,71.96,705.726709,1048.157077,49,180.216496,74652629,68.89,702.213238,1043.864827,50,180.242258,72936229,76.37,687.022553,1057.02407,51,180.21773,73795957,66.69,693.34559,1043.471194,52,180.579614,73651964,69.86,691.450878,1035.464318,53,180.452077,73137216,67.9,687.856421,1050.241923,54,180.221084,74909478,65.13,706.314616,1039.305061,55,180.402252,73596745,70.42,694.168462,1042.749185,56,180.281802,74344658,66.27,699.915595,1048.477743,57,180.216348,73275708,80.62,685.698749,1047.813281,58,180.218054,72994584,73.85,689.825123,1050.728691,59,180.210265,75073286,58.17,706.591575,1039.044778,60,180.314091,72313566,77.96,682.558231,1053.498812};
ss16384={1,180.215349,77373280,51.71,686.631612,1027.614296,2,180.380316,77163621,58.7,685.980705,1034.444526,3,180.228241,77106547,55.13,694.413423,1030.652294,4,180.218476,77589190,59.65,698.492806,1034.387377,5,180.218211,77547566,55.04,691.718838,1030.996367,6,180.263145,77440897,57.27,695.157311,1026.579029,7,180.221478,77638335,53.98,698.992734,1031.320214,8,180.226113,75559455,59.94,678.069909,1034.388932,9,180.207072,75509464,64.8,675.814259,1031.111441,10,180.213587,77692943,47.8,699.549647,1030.125074,11,180.22802,76360880,53.62,684.803883,1028.262093,12,180.227229,76755096,55.15,690.798978,1042.708191,13,180.221887,76968092,58.12,692.632698,1028.900682,14,180.20058,76662995,57.47,687.965411,1031.451133,15,180.232063,78086796,51.03,703.95198,1032.452736,16,180.216498,78649268,44.73,708.203331,1028.68676,17,180.225004,76658709,56.78,691.3059,1025.562781,18,180.223577,75760112,60.76,677.835952,1037.063299,19,180.274714,77390353,50.46,700.089567,1032.160323,20,180.283951,76428450,58.78,678.426854,1026.658838,21,180.225642,76569214,60.85,690.292051,1034.803041,22,180.22199,76902324,62.89,689.578165,1031.263339,23,180.289481,77602953,46.16,697.368979,1035.291133,24,180.386353,77397277,59.67,694.40643,1034.611434,25,180.397675,77467412,54.1,699.219699,1030.770778,26,180.210083,77685151,51.67,699.020723,1028.659556,27,180.223676,76650738,55.82,687.615462,1030.89156,28,180.294165,76662569,63.31,690.43803,1033.575687,29,180.226663,77619526,53.97,698.37383,1025.209486,30,180.207361,76623068,62.22,687.912413,1029.555508,31,180.231645,77568392,50.71,699.564643,1033.695151,32,180.348731,76730859,57.64,685.663756,1024.170456,33,180.2014,76140411,58.87,682.693206,1028.58034,34,180.228987,77179820,57.58,692.250759,1034.32331,35,180.419846,77922214,50.53,701.127409,1026.124801,36,180.22072,76934709,53.81,694.032485,1040.112003,37,180.257346,77353474,55.28,692.257754,1031.914027,38,180.223291,76717985,61.49,681.294422,1035.939663,39,180.227064,75855291,60.83,679.969624,1037.46414,40,180.321929,75345971,61.28,675.600289,1031.36393,41,180.229913,77168746,60.34,690.416034,1029.205032,42,180.29841,76614313,57.51,689.298204,1037.248979,43,180.220131,77092195,53.71,692.546709,1031.651765,44,180.212871,77495174,57.26,692.98064,1028.855828,45,180.204962,78231167,56.18,701.097414,1026.771544,46,180.223032,76680202,60.48,687.565468,1027.282554,47,180.248907,75963415,61.7,682.764201,1040.598132,48,180.225463,76177329,55.37,679.518693,1022.885569,49,180.228136,77300473,58.7,695.465266,1035.219187,50,180.219599,77719143,48.79,697.809909,1024.707293,51,180.274418,78135391,47.7,701.229391,1027.555441,52,180.22831,78278027,48.37,703.299077,1021.536337,53,180.264032,76880751,58.6,684.822887,1031.19264,54,180.227736,76079351,57.28,683.294117,1030.918071,55,180.213643,76227489,56.72,687.03455,1034.108107,56,180.222601,77138147,58.94,692.588703,1023.617569,57,180.217255,76942224,54.38,693.84352,1034.432816,58,180.162974,76201005,59.86,683.485085,1028.318376,59,180.228363,77394448,53.9,695.016337,1028.8085,60,180.228755,75681642,62.18,683.560075,1042.166898};
ss32768={1,180.221966,79506939,42.28,694.707381,1026.291497,2,180.211351,78906286,40.69,692.206763,1023.600727,3,180.219132,79420875,42.04,696.317136,1019.857473,4,180.212147,79990447,40.34,699.910594,1010.762685,5,180.218121,79136233,43.72,692.216759,1019.455177,6,180.215492,78783081,41.25,690.470027,1023.058538,7,180.230688,78080951,41.57,679.200738,1019.53868,8,180.345352,79881493,42.55,699.955584,1027.648981,9,180.218346,79808867,39.64,702.665171,1022.395812,10,180.293365,78477958,46.92,688.770283,1027.856817,11,180.279518,77346282,47.52,676.12421,1032.783272,12,180.216328,78911091,40.94,690.677996,1024.492817,13,180.202331,77593892,50.83,680.302573,1037.934561,14,180.220083,79693790,39.26,699.201694,1025.220706,15,180.228393,79603452,41.45,697.802914,1029.293958,16,180.295237,79225056,40.79,694.322437,1019.941203,17,180.225775,78911364,48.76,694.90135,1025.644424,18,180.224265,80181088,35.02,703.070113,1014.655306,19,180.286651,78318355,48.2,684.483939,1027.240984,20,180.225806,79963006,36.02,702.684166,1021.267471,21,180.198353,79499380,39.17,695.396281,1015.472769,22,180.215055,79423434,41.59,694.80137,1016.511551,23,180.203219,78177286,48.56,685.933713,1022.891479,24,180.265777,78348334,46.46,685.813733,1021.282022,25,180.233047,77859326,53.96,679.940633,1020.827537,26,180.208007,78318995,40.08,686.504623,1023.08827,27,180.267015,79840537,37.5,696.902053,1017.34836,28,180.345499,78842213,42.11,689.10023,1024.845566,29,180.211357,79040430,42.1,693.476567,1021.92709,30,180.229785,77820566,47.57,680.120598,1016.550072,31,180.228556,78056777,44.44,678.480851,1015.013476,32,180.250292,78561598,40.95,687.746443,1019.610926,33,180.160254,78173122,42.57,679.099749,1029.776949,34,180.202751,79372434,44.45,695.743225,1035.079229,35,180.254637,79615557,45.75,699.275686,1018.333602,36,180.223347,78235862,44.95,682.153291,1018.761995,37,180.259318,80414661,40.4,706.368607,1021.132041,38,180.241543,80438323,37.05,705.170784,1012.170276,39,180.22492,78067232,43.03,684.265968,1024.77678,40,180.236676,78472277,45.06,688.709297,1026.893231,41,180.208485,79903193,38.59,702.457203,1023.952371,42,180.222234,80861038,32.08,708.035355,1012.606193,43,180.23797,80956254,34.41,711.187875,1011.929635,44,180.298482,80835051,32.32,713.420536,1016.865578,45,180.209666,80722732,35.63,708.260325,1013.678594,46,180.340196,78396218,45.16,683.361105,1014.002001,47,180.213429,79314597,39.29,696.362135,1019.634859,48,180.276005,80177430,37.49,702.939126,1013.308371,49,180.226896,78625799,47.68,689.476176,1020.089108,50,180.230415,78380049,43.85,686.830579,1020.124858,51,180.2215,79438670,35.06,695.761222,1024.961721,52,180.255528,78337693,47,684.043004,1027.49119,53,180.206395,80473554,34.08,705.372761,1016.617306,54,180.220391,78169045,50.64,680.92448,1016.581286,55,180.216065,78762217,39.76,687.612458,1020.953228,56,180.218351,78533125,47.21,689.092235,1030.568799,57,180.222303,80061160,36.91,702.320221,1023.731539,58,180.216374,76963780,48.98,673.342631,1024.408693,59,180.222377,77706584,49.24,680.739508,1032.03989,60,180.224753,80341133,37.64,705.723709,1025.237636};
ss65536={1,180.427853,79005293,39.34,689.723142,1009.636095,2,180.212971,78832220,36.15,688.611311,1010.131339,3,180.206597,78103460,49.36,680.193591,1021.199022,4,180.216417,78121624,43.7,679.990616,1024.278408,5,180.231439,77167862,53.22,673.770564,1024.734528,6,180.49983,78776428,42.5,687.222522,1012.185171,7,180.205821,78586579,45.76,681.578379,1017.565031,8,180.218922,78449820,38.92,686.605611,1024.296866,9,180.229719,80529427,37.92,704.209942,1004.342943,10,180.237526,79589549,36.08,701.036421,1015.728154,11,180.20742,78224955,43.21,684.528931,1026.163308,12,180.213234,78596561,46.18,688.299357,1023.824064,13,180.216509,77644240,46.86,681.075452,1025.663765,14,180.230916,77391869,52.48,672.928691,1014.228898,15,180.22039,80008769,36.66,701.596337,1009.341726,16,180.225595,79244330,39.9,693.728531,1015.95401,17,180.263715,78849666,45.01,689.104238,1022.533255,18,180.228062,78368709,45.83,685.476784,1022.530918,19,180.222991,77583793,47.56,677.830953,1021.4053,20,180.224289,78375419,45.51,684.996858,1018.202858,21,180.269582,80544103,37.16,702.639177,1008.738086,22,180.265778,78578095,46.24,688.937254,1024.797086,23,180.225335,79764398,38.02,698.592794,1006.95512,24,180.219189,79585724,40.87,694.139474,1011.089739,25,180.367732,78991494,42.39,695.967191,1020.425961,26,180.207966,78573644,42.52,689.830121,1022.1463,27,180.228964,78078124,46.81,682.521237,1023.359067,28,180.223206,78982025,47.4,691.393885,1017.857047,29,180.222929,78999639,39.81,694.515411,1020.368048,30,180.225921,78090112,45.98,683.440093,1019.215653,31,180.218674,78427014,39.66,687.198522,1023.570267,32,180.225082,79112951,34.85,697.164008,1019.364381,33,180.217952,78281323,41.76,684.863875,1012.604103,34,180.219145,79163950,40.18,693.190608,1011.759338,35,180.200706,77473274,44.24,673.15366,1017.260665,36,180.206138,79706179,36.76,696.617095,1019.813602,37,180.250814,78662683,51.93,687.534473,1020.184903,38,180.21417,78881203,41.03,692.988648,1018.655532,39,180.320094,78163441,41.28,685.673757,1019.280808,40,180.223584,77344889,44.11,679.386708,1030.162143,41,180.310671,80069747,42.28,698.47181,1017.863295,42,180.213795,78757549,52.72,691.781822,1026.405785,43,180.205013,78471540,41.94,686.865577,1018.031258,44,180.220742,78833878,39.68,689.10323,1010.306641,45,180.216823,79311659,42.61,696.85106,1017.165998,46,180.222645,78139330,48.2,682.019311,1024.72662,47,180.300793,79151748,45.23,694.562408,1027.352977,48,180.391127,80263981,37.68,709.803082,1021.996977,49,180.216213,79511533,39.75,699.489653,1021.453255,50,180.26257,80192087,35.03,704.266935,1014.044386,51,180.226415,77640118,53.53,682.391253,1020.719593,52,180.219639,78170028,38.67,683.45009,1015.789978,53,180.205745,80122821,36.84,701.542341,1012.073465,54,180.442426,78606558,43.91,688.565315,1025.320524,55,180.263737,79545331,42.96,700.608483,1017.7414,56,180.158263,79693746,38.29,698.586795,1016.721117,57,180.219271,79741930,39.84,694.916351,1021.183241,58,180.21995,79116284,47.63,695.084328,1029.534948,59,180.210881,78211075,48.08,685.340806,1023.055412,60,180.222937,79151867,43,694.400432,1011.485485};

Data Loading

All the data sets are contained in the above section.

ssNum=9;
sampleNum=60;
ss[1]=ss256; latches[1]=256;
ss[2] =ss512; latches[2]=512;
ss[3]=ss1024; latches[3]=1024;
ss[4]=ss2048; latches[4]=2048;
ss[5]=ss4096; latches[5]=4096;
ss[6]=ss8192; latches[6]=8192;
ss[7]=ss16384;latches[7]=16384;
ss[8]=ss32768;latches[8]=32768;
ss[9]=ss65536;latches[9]=65536;

ncols=6;
sampleCol=1;
elapsedTCol=2;
lioCol=3;
waitTCol=4;
cpuTCol=5;
dbtimeCol=6;

Do[
ssLio[ssidx]={};ssL[ssidx]={};ssSt[ssidx]={};ssQt[ssidx]={};ssRt[ssidx]={};
theSS=ss[ssidx];
Table[
elapsedT=theSS[[ncols sampleidx+elapsedTCol]];
lioTot=theSS[[ncols sampleidx+lioCol]];
cpuSecTot=theSS[[ncols sampleidx+cpuTCol]];
waitSecTot=theSS[[ncols sampleidx+waitTCol]];

λ=lioTot/(1000 elapsedT);
St=(cpuSecTot 1000)/lioTot;
Qt=(waitSecTot 1000)/lioTot;
Rt=St+Qt;

AppendTo[ssLio[ssidx],lioTot];
AppendTo[ssL[ssidx],λ];
AppendTo[ssSt[ssidx],St];
AppendTo[ssQt[ssidx],Qt];
AppendTo[ssRt[ssidx],Rt];

,{sampleidx,0,sampleNum-1}
];
,{ssidx,ssNum}
];
Length[ssLio[6]]
Take[ssLio[6],5]
Mean[ssL[6]]

Basic Statistics

In this section I calculate the basic statistics, such as the mean and median. My objective is to ensure the data has been collected and entered correctly and also to compare the two datasets to see if they appear to be different.

myData=Table[
{
latches[ssidx],Mean[ssL[ssidx]],Mean[ssSt[ssidx]],Mean[ssQt[ssidx]],Mean[ssRt[ssidx]],
Length[ssLio[ssidx]],N[StandardDeviation[ssL[ssidx]]],N[StandardDeviation[ssSt[ssidx]]],N[StandardDeviation[ssQt[ssidx]]],N[StandardDeviation[ssRt[ssidx]]]
},{ssidx,1,ssNum}
];
toGrid=Prepend[myData,{"CBC\nlatches","Avg L\n(lio/ms)","Avg St\n(ms/lio)","Avg Qt\n(ms/lio)","Avg Rt\n(ms/lio)","Samples","Stdev L\n(lio/ms)","Stdev St\n(ms/lio)","Stdev Qt\n(ms/lio)","Stdev Rt\n(ms/lio)"}];
Grid[toGrid,Frame->All]

In this section I calculate the key parameters for understanding the impact of chaning the number of latches and chains. The columns heading are queuing theory centric, not Oracle-ease centric.

myData=Table[
{
latches[ssidx],
Mean[ssL[ssidx]],100*(Mean[ssL[ssidx]]-Mean[ssL[1]])/Mean[ssL[1]],
Mean[ssSt[ssidx]],100*(Mean[ssSt[ssidx]]-Mean[ssSt[1]])/Mean[ssSt[1]],
Mean[ssQt[ssidx]],100*(Mean[ssQt[ssidx]]-Mean[ssQt[1]])/Mean[ssQt[1]],
Mean[ssRt[ssidx]],100*(Mean[ssRt[ssidx]]-Mean[ssRt[1]])/Mean[ssRt[1]],
Length[ssLio[ssidx]]
},{ssidx,1,ssNum}
];
toGrid=Prepend[myData,{"CBC\nlatches","Avg L\n(lio/ms)","%\nChange","Avg St\n(ms/lio)","%\nChange","Avg Qt\n(ms/lio)","%\nChange","Avg Rt\n(ms/lio)","%\nChange","Samples"}];
Grid[toGrid,Frame->All]

Sample Set Normality Tests

Before we can perform a standard t-test hypothesis tests on our data, we need to ensure it is normally distributed...because that is one of the underlying assumptions and requirements for properly performing a t-test.

Statistical  and vlsual normality test

Our alpha will be 0.05, so if the distribution fit test results in a value greater than 0.05 then we can assume the data set is indeed normally distributed.

The first test is just to double check to make sure my thinking is correct. Since I creating a normal distribution based on a mean and standard deviation (just happens to be based on the my sample set data), I would expect a p-value (the result) to greatly exceed 0.05. Notice that the more samples I have created (the final number), the closer the p-value approaches 1.0.

check=DistributionFitTest[RandomVariate[NormalDistribution[Mean[ssSt[1]],StandardDeviation[ssSt[1]]],10000]];
Do[
pValueSt=DistributionFitTest[ssSt[i]];
pValueRt=DistributionFitTest[ssRt[i]];
Print["Sample set ",i," with ",Length[ssSt[i]], " values. P-values: St=",pValueSt," Rt=",pValueRt];
st=Histogram[ssSt[i],PlotLabel->"Occurances vs St",AxesLabel->{"Sample value","Occurs"}];
rt=Histogram[ssRt[i],PlotLabel->"Occurances vs Rt",AxesLabel->{"Sample value","Occurs"}];
Print[st];
Print[rt];
Print["-------------------------------------------"];
,{i,1,ssNum}
];
Print["This number should be much greater than 0.05: ",check," If not try again by re-evaluating."];

Sample Comparison Tests (when normality exists)

Assuming our samples are normally distributed, now it’s time to see if they are significantly different. If so, then we know changing the number of latches and chains indeed makes a significant performance difference...at least statistically.

The null hypothesis is; there is no real difference between our samples sets. We need to statistically prove that any difference is the result of randomness; like we just happened to pick poor set of samples and it makes their difference look much worse than it really is.

A t-test will produce a statistic p. The p value is a probability, with a value ranging from zero to one. It is the answer to this question: If the populations really have the same mean overall, what is the probability that random sampling would lead to a difference between sample means larger than observed? 

For example, if the p value is 0.03 we can say a random sampling from identical populations would lead to a difference smaller than you observed in 97% of the experiments and larger than you observed in 3% of the experiments.

Said another way, suppose I have a single sample set and I copy it, resultling in two identical sample sets. Now suppose we perform a significance test on these two identical sample sets. The resuting p-value will be 1.0 because they are exactly the same. We are essentially doing the same thing here except we have to different sample sets... but we still want to see if they “like” each other..and in our case we hope they are NOT the like each other, which means the p-value will low... below our cut off value of 0.05.

For our analysis we choose alpha of 0.05. To accept that our two samples are statistically similar the p value would need to be less than 0.05 (our alpha).

Good reference about the P-Value and significance testing: http://www.graphpad.com/articles/pvalue.htm

Here we go (assuming our samples are normally distributed):

1. Our P value threshold is 0.05, which is our alpha.
2. The null hypothesis is the two populations have the same mean. (Remember we have to sample sets, which not the population.)
3. Do the statistical test to compute the P value.
4. Compare the result P value to our threshold alpha value. If the P value is less then our threshold, we will reject the null hypothesis and say the difference between our samples is significant. However, if the P value is greater than the threshold, we cannot reject the null hypothesis and any difference between our samples are not statistically significant.

Do[
pValueSt=TTest[{ssSt[i],ssSt[i+1]}];
Print["St: (",Length[ssSt[i]]," values) pvalue between sample set ",i," and ",i+1," is ",pValueSt];
pValueRt=TTest[{ssRt[i],ssRt[i+1]}];
Print["Rt: (",Length[ssRt[i]]," values) pvalue between sample set ",i," and ",i+1," is ",pValueRt];
,
{i,1,ssNum-1}
];

If the above T-Test results (p value) are less then our threshold we can say there is a significant difference between the two sample sets.

Sample Comparison Tests (when normality does NOT exist)

If our sample sets are not normally distributed, we can not perform a simple t-test. We can perform what are called location tests. I did some research on significance testing when non-normal distributions exists. I found a very nice reference:

http://www.statsoft.com/textbook/nonparametric-statistics

The paragraph below (which is from the reference above) is a key reference to what we’re doing here:

...the need is evident for statistical procedures that enable us to process data of “low quality,” from small samples, on variables about which nothing is known (concerning their distribution). Specifically, nonparametric methods were developed to be used in cases when the researcher knows nothing about the parameters of the variable of interest in the population (hence the name nonparametric). In more technical terms, nonparametric methods do not rely on the estimation of parameters (such as the mean or the standard deviation) describing the distribution of the variable of interest in the population. Therefore, these methods are also sometimes (and more appropriately) called parameter-free methods or distribution-free methods.

Being that I’m not a statistician but still need to determine if these sample sets are significant different, I let Mathematica determine the appropriate test. Notice that one of the above mentioned tests will probably be the test Mathematica chooses.

Note: If we run our normally distributed data through this analysis (speically, the “LocationEquivalenceTest”), Mathematica should detect this and use a more appropriate significant test, like a t-test.

Here we go with the hypothesis testing (assuming our sample sets are not normally distributed):

1. Our P value threshold is 0.05, which is our alpha.
2. The null hypotheses is the two populations have the same mean. (Remember we have to sample sets, which is not the population.)
3. Do the statistical test to compute the P value.
4. Compare the result P value to our threshold alpha value. If the P value is less then our threshold, we will reject the null hypothesis and say the difference between our samples is significant. (Which is what I’m hoping to see.) However, if the P value is greater than the threshold, we cannot reject the null hypothesis and any difference between our samples are not statistically significant; randomness, picked the “wrong” samples, etc.

Do[
StHist=SmoothHistogram[{ssSt[i],ssSt[i+1]}];
StTest1=MannWhitneyTest[{ssSt[i],ssSt[i+1]}];
StTest2=LocationEquivalenceTest[{ssSt[i],ssSt[i+1]},{"TestDataTable","AutomaticTest"}];
Print["St: (",Length[ssSt[i]]," values) Between sample ",i," and ",i+1,". Test1=",StTest1," Test2=",StTest2];
Print[StHist];
Print["-------------------------------------------------------"];
QtHist=SmoothHistogram[{ssQt[i],ssQt[i+1]}];
QtTest1=MannWhitneyTest[{ssQt[i],ssQt[i+1]}];
QtTest2=LocationEquivalenceTest[{ssQt[i],ssQt[i+1]},{"TestDataTable","AutomaticTest"}];
Print["Qt: (",Length[ssQt[i]]," values) Between sample ",i," and ",i+1,". Test1=",QtTest1," Test2=",QtTest2];
Print[QtHist];
Print["-------------------------------------------------------"];
RtHist=SmoothHistogram[{ssRt[i],ssRt[i+1]}];
RtTest1=MannWhitneyTest[{ssRt[i],ssRt[i+1]}];
RtTest2=LocationEquivalenceTest[{ssRt[i],ssRt[i+1]},{"TestDataTable","AutomaticTest"}];
Print["Rt: (",Length[ssRt[i]]," values) Between sample ",i," and ",i+1,". Test1=",RtTest1," Test2=",RtTest2];
Print[RtHist];
Print["---------------------------------------------------------------------------------------------------"];
,{i,1,ssNum-1}
];

Visually Comparing All Samples

I also wanted to get a nice visual picture of my sample sets...together. Sometimes I include all the sample sets and sometimes I don’t. It’s just based on what I want to convey. Sometimes you get a more appropriate view if all the data is not included. That is, remove ssSt[9] for example.

SmoothHistogram[{ssSt[1],ssSt[2],ssSt[3],ssSt[4],ssSt[5],ssSt[6],ssSt[7],ssSt[8],ssSt[9]},
PlotLabel->"Occurances vs CPU(ms)/LIO",AxesLabel->{"CPU(ms)/LIO","Occurs"}]

SmoothHistogram[{ssQt[1],ssQt[2],ssQt[3],ssQt[4],ssQt[5],ssQt[6],ssQt[7],ssQt[8],ssQt[9]},
PlotLabel->"Occurances vs Wait(ms)/LIO",AxesLabel->{"Wait(ms)/LIO","Occurs"}]

SmoothHistogram[{ssRt[1],ssRt[2],ssRt[3],ssRt[4],ssRt[5],ssRt[6],ssRt[7],ssRt[8],ssRt[9]},
PlotLabel->"Occurances vs CPU+Wait(ms)/LIO",AxesLabel->{"CPU+Wait(ms)/LIO","Occurs"}]

Important Graphics

I also wanted to get a nice visual picture of my sample sets...together. Sometimes I include all the sample sets and sometimes I don’t... settting the leaveOut variable easily controls this. It’s just based on what I want to convey.

leaveOut=2;
St=Table[
{latches[i],Mean[ssSt[i]]}
,{i,ssNum-leaveOut}
];
Qt=Table[
{latches[i],Mean[ssQt[i]]}
,{i,ssNum-leaveOut}
];
Rt=Table[
{latches[i],Mean[ssSt[i]]+Mean[ssQt[i]]}
,{i,ssNum-leaveOut}
];
ListPlot[St,AxesOrigin->{0,0},PlotStyle->PointSize[Large],Joined->True,AxesLabel->{"latches","Time(ms/lio)"},PlotLabel->"CPU Time Per LIO vs Number of CBC Latches"]
ListPlot[Qt,AxesOrigin->{0,0},PlotStyle->PointSize[Large],Joined->True,AxesLabel->{"latches","Time(ms/lio)"},PlotLabel->"Wait Time Per LIO vs Number of CBC Latches"]
ListPlot[{St,Rt},AxesOrigin->{0,0},PlotStyle->PointSize[Large],Joined->True,AxesLabel->{"latches","Time(ms/lio)"},PlotLabel->"CPU+Wait Time Per LIO vs Number of CBC Latches"]

leaveOut=2;
ListPlot[
Table[
{{latches[i],Mean[ssSt[i]]},
{latches[i],Mean[ssSt[i]]+Mean[ssQt[i]]}
}
,{i,ssNum-leaveOut}
],AxesOrigin->{0,0},PlotStyle->PointSize[Large],Joined->True,AxesLabel->{"latches","Time(ms)"}
]