Benchmarking MongoDB from 3.6 to 8.0 - Part 2

Introduction

Welcome to part two of this benchmarking series!

If you have landed here and are not fully aware of what is going on, this is a two-part blog post in which I share my results after benchmarking MongoDB from version 3.6 to 8.0.

In this post, I’m not going to describe the main idea behind this series, the environment, or how the tests were conducted. For that, we have the first part, which covers all those points with all the details I could think of.

If you want to get more context and understand further details behind the tests, you can find the link below to that first part:


How to use

Here, it’s a guide about the data and how to use/interpret it.

Below, you will see five tabs that you can access to see the results for each number of threads tested and the scenarios.

  • You can just click in, and it will expand with the results.

Once you expand the tab, you will see a table with the operations tested(Scenario) on the far left column, and the result across all versions on the right.

  • The numbers behind each version on that row mean Operations per Second.

For example:

For more details on the methodology, please refer to the section that further explains it in Part 1.

To help you with the analysis, the tables hold a few features for that.

1. You can easily compare results by selecting the version of your preference and hovering the mouse over the other release.

For example – Let’s pick version 8.0 as a reference.

  • For that, click on the header line:

After that, once you hover your mouse on that same line, it will show the percentage difference when compared to 8.0:

– For that same scenario, MongoDB 7.0 performed 33.19% fewer operations when compared to 8.0.

2. You can enable/disable the “Highlight Version” 

The idea was pretty simple. Since it’s a benchmark test, I wanted not only to compare the results, as previously, but also to see which release won for each scenario. 

When we enable that option, it highlights which version had better performance for each scenario:

3. Last but not least, if you want to study those numbers, you can easily copy and paste the tables into the software of your preference.

Alongside that, Search is also enabled, so you can filter out the operations of your preference for that table to narrow the analysis by having only the matching results.


Benchmark Results

 
Highlight Version
Scenario3.64.04.24.45.06.07.08.0.0
Aggregation.FindProjectionDottedField.Indexed549.82520.7983.22537.7520.07523.6351.54526.16
Aggregation.FindProjectionThreeFieldsCovered535.65183.56159.52529.55529.75528.35327.4690.28
Aggregation.IntNonIdFindOne116.02551.54501.36540.36528.13505.94387.63544
Aggregation.IntNonIdFindOneProjection517.51526.85479.84534.33528.77494.39449.53213.48
Aggregation.IntNonIdFindOneProjectionCovered555.07549.38523.55534.96530.24522.73342.03504.77
Aggregation.ProjectExclude_LargeArray1.661.391.6766.946869.29372.2381.89
Aggregation.RegexPrefixFindOne165.54558.66539.9553.9526.83530.12235.84522.72
Aggregation.TwoInts514.38513.78500.85543.1521.65518.79251.29526.85
Insert.BigKeyIndex214.76240.43207.19252.84247.83249.84198.4743.71
Insert.Empty566.56547.6463.79460.09482.58495.54559.98564.84
Insert.EmptyCapped584.92546.28481.33438.35440.79504.15561.89559.95
Insert.EmptyCapped.SeqIntID555.33450.8530.16562.73541.74387.68555.56561.15
Insert.IntIDUpsert522.43452.06552.94548.09525.9434.35539.75543.87
Insert.IntVector414.49424.03405.78437.02419.4415.26436.54479.75
Insert.JustID576.85525.46493.94352.15477.87516.43547.72563.17
Insert.JustNum576.93487.78373.13343.41454521.79565.08570.71
Insert.JustNumIndexed576.42535.18360.27334.95451.65470.25550.88558.24
Insert.LargeDocVector14.9420.2174.379.1478.8277.5598.73116.84
Insert.MultiIndex.Contested.Rnd502.4511.48361.62539.11537.31519.49331.44214.71
Insert.MultiIndex.Uncontested.Rnd489.47532.98344.57532.32549.89521.17329.89447.74
Insert.MultiKeyIndex.Contested.Rnd548.16492.78477.98567541.48506.64341.35191.92
Insert.MultiKeyIndex.Uncontested.Rnd557.14530.25412.9562.42540.95543.55375.91100.63
Insert.SeqIntID.Indexed585.13522.91476.73391.06422.2521.61549.32557.84
Insert.SingleIndex.Contested.Rnd573.26547.45559.17550.02545.32534.08448.52539.75
Insert.SingleIndex.Seq526.23315.77554.81451.1388.56399.83552.73429.9
Insert.SingleIndex.Uncontested.Rnd526.29440.8456.23566.68548.37519.84339.83500.81
Insert.UniqueIndex165.56542.75535.93322.08492.41502.58540.5557.43
Insert.UniqueIndexCompound188.58210.2546.26552.93555.67509.03539.88554.93
Insert.UniqueIndexCompoundReverse102.53163.63543.38557.24555.83509.6554.51538.09
InsertIndexedStringsNonSimpleCollation329.29281.01540.61552.08523.32486.55527.48562.05
InsertIndexedStringsSimpleCollation546.33369.81533.37552.25539.91535.66551.73566.7
Queries.FindProjectionDottedField.Indexed549.2172.39158.51535.46537.07514.66293.15527.41
Queries.FindProjectionThreeFieldsCovered560.71369.78524.34543.33533.79533.62436.69101.86
Queries.IdentityView.FindProjectionDottedField.Indexed537.8981.7478.71524.89508.26507.72271.09509.93
Queries.IdentityView.FindProjectionThreeFieldsCovered538.56122.63391.09526.62516.86516.84319.15170.78
Queries.IdentityView.IntNonIdFindOne335421.46450.12435.18529.54449.29506.23413.62
Queries.IdentityView.IntNonIdFindOneProjection517.99529.67523.89530.39519.4499.02280.82518.35
Queries.IdentityView.IntNonIdFindOneProjectionCovered536.97503.37500.88525.81527.24507.81295.71522.36
Queries.IdentityView.ProjectExclude_LargeArray1.331.381.6568.8768.7167.8349.69408.48
Queries.IdentityView.RegexPrefixFindOne97.58546.43520.64525.2528.2516.53325.64526.84
Queries.IdentityView.TwoInts374.13436.14484.26528.24529.67453.33526.11363.43
Queries.IntNonIdFindOne485.43471.08382.73411.2540.67443.52525.01373.5
Queries.IntNonIdFindOneProjection558.9519.49520.02541.13536520.64446.48514
Queries.IntNonIdFindOneProjectionCovered564.5527.29527.84548.61534.64505.21308.573.51
Queries.PartialIndex.AllInFilter.FilteredRange1016.581027.461008.081083.241030.15963.53595.771047.29
Queries.PartialIndex.AllInFilter.FullRange877.69951.39985.131088.98807.65996.491062.3885.71
Queries.PartialIndex.FilteredRange847.421009.93990.391072.03895.8972.341066.83897.38
Queries.PartialIndex.FullRange619.66625.38546.02640.35560.24581.58586.29597.16
Queries.PartialIndex.NonFilteredRange666.4668.26444.71647.84635.52546.42319.47653.8
Queries.ProjectExclude_LargeArray423.44431.91363.6670.5569.654.49394.25423.78
Queries.RegexPrefixFindOne193.83562.4545.05552.52532.41531.98409.62525.37
Queries.TwoInts392.47476.05509.03524.54536.26468.69534.67416.26
Remove.IntId856.03826.4762.41568.77521.78674.67808.94818.19
Remove.IntNonIdIndex843.72732.79806.83783.11749.87753.86719.1784.46
Remove.IntNonIdNoIndex675.69622.43639.29629.9644609.97638.51670.34
Remove.IntNonIdUniqueIndex842.53558.57791.74809.7786.76713.49617.42808.91
Update.FieldAtOffset232.05258.14241.52237.68232.53233.82238.22251.93
Update.IncFewLargeDoc104.51459.23541.27515.06518.36412.1520.54526.52
Update.IncFewLargeDocLongFields557.03292.26508.68515.78531.15264.5529.23526.41
Update.IncFewSmallDoc159.39409.16516.18527.58535.26400.68522.48530.12
Update.IncFewSmallDocLongFields276.1402.41507.62509.14507.92466.05523.97527.33
Update.IncNoIndex499.4558.83457.77520.38522.89523.5508.88535.76
Update.IncNoIndexUpsert158.57550.74550.81517.87538.8524.89510.19528.23
Update.IncWithIndex306.39555.7533.02509.65490.94499.15417.74531.58
Update.IncWithIndexUpsert102.69537.14543.84519.59534.45531.61518.67536.07
Update.ManyElementsWithinArray245.78261.74252.38256.3268.81253.42247.93256.78
Update.MatchedElementWithinArray494.91448.77488.96480.85456.09430.08483.18489.39
Update.SetWithIgnoredIndex.Random496.61554.84439.08529.83477.93481.88464.14187.95
Update.SetWithIgnoredIndex.String556.54540.68383.08531.86519.18463.27346.73513
Update.SetWithIndex.Random519.43549.11534.27537.61517.77528.4331.01495.23
Update.SetWithMultiIndex.Random515.38542.17478.18533.26478.35457.4480.88183.6
Update.SetWithMultiIndex.String486.35473.08497.44496.37488.16501.2288.72498.67
Update.SingleDocFieldAtOffset778.08815.97663.7803.5755.28790.42699.73798.43
Update.UniqueIndex486.7523.22536.65510.24524.99509.6465.73527.29
Update.UniqueIndexCompoundReverse491.75511.95533.13492.98519.22511.9383.37525.34
 
Highlight Version
Scenario3.64.04.24.45.06.07.08.0
Aggregation.FindProjectionDottedField.Indexed1074.18612.681041.881062.281042.371019.98890.621034.04
Aggregation.FindProjectionThreeFieldsCovered1079.55647.141066.451037.921034.551004.32907.861049.77
Aggregation.IntNonIdFindOne971.15911.72899.081083.661003.341043.04846.551083.36
Aggregation.IntNonIdFindOneProjection1072.76795.911044.281054.261050.391023.28819.691024.42
Aggregation.IntNonIdFindOneProjectionCovered283.32184.07920.081032.991033.221028.96631.81049.66
Aggregation.ProjectExclude_LargeArray2.262.272.290.3595.1595.29793.04264.68
Aggregation.RegexPrefixFindOne968.88907.53761.271081.51051.191035.951044.09552.33
Aggregation.TwoInts1050.76888.59730.811043.44939.9907.74945.32171.69
Insert.BigKeyIndex353.18358.73272.71361.16360.16356.57240.56363.6
Insert.Empty1107.451039.661091.181112.871071.991055.441061.531106.78
Insert.EmptyCapped1110.821042.361084.441101.311062.961076.41068.711108.8
Insert.EmptyCapped.SeqIntID1130.111103.961097.971099.691020.15788.331047.511100.21
Insert.IntIDUpsert1125.521064.671049.491065.14923.99870.451067.611058.47
Insert.IntVector803.65751.05769.26807.42796.07747.42775.42861.57
Insert.JustID1112.351060.251114.481073.541064.46934.471046.291091.43
Insert.JustNum1113.81055.191048.371104.741043.131059.351025.211091.63
Insert.JustNumIndexed1108.051025.871065.671098.391079.96944.421045.641083.59
Insert.LargeDocVector131.77113.9485.53100.5195.498.89124.49176.3
Insert.MultiIndex.Contested.Rnd1006.27957.08844.44985.351065.86949.07947.03967.6
Insert.MultiIndex.Uncontested.Rnd873.26989.651035.441101.131065.51002.71912.191039.72
Insert.MultiKeyIndex.Contested.Rnd956960.361029.59992.491085.07899.73898.271056.98
Insert.MultiKeyIndex.Uncontested.Rnd941.9850.2910.12912.88912.31889.32958.211039.13
Insert.SeqIntID.Indexed1117.081069.81068.121078.911075.751035.141042.251109.99
Insert.SingleIndex.Contested.Rnd1062.99998.461064.731104.49991.63939.09907.461041.03
Insert.SingleIndex.Seq1012.221089.71813.891116.811074.51042.03756.81052.63
Insert.SingleIndex.Uncontested.Rnd1020.16955.89886.221064.641006.45895.93990.911029.24
Insert.UniqueIndex1089.731049.431075.411074.22937.611047.291044.291075.61
Insert.UniqueIndexCompound1123.81098.491100.551082.22971.43905.281074.651040.61
Insert.UniqueIndexCompoundReverse1135.031104.631085.851068.161071.46902.791085.871070.36
InsertIndexedStringsNonSimpleCollation1119.741098.111066.011094.67952.66749.691069.11048.74
InsertIndexedStringsSimpleCollation1110.171094.21076.621086.81947.39784.781077.981044.89
Queries.FindProjectionDottedField.Indexed799.93959.63889.871077.24849.1982.49804.091059.37
Queries.FindProjectionThreeFieldsCovered1075.68940.631015.111063.421053.661026.83937.141058.96
Queries.IdentityView.FindProjectionDottedField.Indexed916.09882.16890.751043.31013.76723.15823.621040.36
Queries.IdentityView.FindProjectionThreeFieldsCovered1018.12726.28892.291044.271030.3961.32865.621040.35
Queries.IdentityView.IntNonIdFindOne1041.1843.09778.261043.831035.61998.6999.931076.91
Queries.IdentityView.IntNonIdFindOneProjection1057.6163.74961.441044.311027.181024.64892.711035.49
Queries.IdentityView.IntNonIdFindOneProjectionCovered193.81284.94967.141030.511036.31988.62701.461032.42
Queries.IdentityView.ProjectExclude_LargeArray3.191.822.2796.2792.0695.44551.07776.5
Queries.IdentityView.RegexPrefixFindOne1001.47845.69810.551063.141015.41996.67854.361059.9
Queries.IdentityView.TwoInts1052.35775.61009.751045.621043.311027.34967.88304.35
Queries.IntNonIdFindOne1068.37844.14982.881065.291071.68994.64925.681097.63
Queries.IntNonIdFindOneProjection188.15237.52802.531073.76918.04937.33900.46982.86
Queries.IntNonIdFindOneProjectionCovered253.7823.27873.531082.971045.54758.51893.061077.93
Queries.PartialIndex.AllInFilter.FilteredRange281.191624.082058.922125.522032.951843.422018.471898.92
Queries.PartialIndex.AllInFilter.FullRange2058.82129.692173.142098.822058.972016.491517.032124.48
Queries.PartialIndex.FilteredRange733.51863.12152.562136.432049.721973.121441.56346.71
Queries.PartialIndex.FullRange182.721207.431283.421287.81245.081124.41041.781355.92
Queries.PartialIndex.NonFilteredRange431.851021.711186.81255.111179.53958.561145.351247.08
Queries.ProjectExclude_LargeArray820.94684.04765.7196.3992.4595.41572.06823.98
Queries.RegexPrefixFindOne991.54789.27766.861081.521078.01837.09883.121068.8
Queries.TwoInts1067.33552.68593.641072.09949.97934.89923.27255.57
Remove.IntId1643.271280.161540.91602.481562.381435.791202.631615.66
Remove.IntNonIdIndex1621.431292.181570.71608.081572.451548.551163.341592.97
Remove.IntNonIdNoIndex1385.751147.51300.191308.721247.211202.271003.981328.84
Remove.IntNonIdUniqueIndex1622.251444.821624.381558.931477.011266.531433.481519.07
Update.FieldAtOffset470.07491.87481.13465.62430.29477.76480.81477.78
Update.IncFewLargeDoc1047.76933.941074.631045.81953.13949.611020.331045.76
Update.IncFewLargeDocLongFields1045.481047.54984.011018.321023.181045.03978.3860.32
Update.IncFewSmallDoc1060.7895.971073.071054.21024.771050.971054.991043.82
Update.IncFewSmallDocLongFields1044.891069.97972.861017.071037.761048.58972.921037.87
Update.IncNoIndex964.54976.951082.2289.471057.061012.691053.521029.69
Update.IncNoIndexUpsert998.961056.661033.29699.591040.611048.01971.441037.18
Update.IncWithIndex1044.54983.591057.76197.341035.61033.511051.91051.81
Update.IncWithIndexUpsert1006.431042.281040.451016.851049.291051.95952.071035.84
Update.ManyElementsWithinArray413.15479.23429.45466.19413.53462.3444.41455.53
Update.MatchedElementWithinArray814.85977.42838.37954.68857.27957.55901.13960.32
Update.SetWithIgnoredIndex.Random1069.221022.031025.391048.211032.44967.8751.43807.52
Update.SetWithIgnoredIndex.String1072.49976.92763.781028.691025.071038.09739.111055.57
Update.SetWithIndex.Random866.44977.51788.291055.961019.541042.51778.65366.4
Update.SetWithMultiIndex.Random1056.611052.06983.221007.761029.99678.91703.64196.71
Update.SetWithMultiIndex.String1012.971008.94988.21027999.44990.87818.38977.4
Update.SingleDocFieldAtOffset1521.471633.41455.91552.591275.351541.791513.531526.36
Update.UniqueIndex897.5969.291031.531034.25974.51986.25980.181033.86
Update.UniqueIndexCompoundReverse1064.171050.34967.861003.89659.071006.09986.011019.17
 
Highlight Version
Scenario3.64.04.24.45.06.07.08.0
Aggregation.FindProjectionDottedField.Indexed1465.671470.962038.511920.821942.91928.341971.082045.44
Aggregation.FindProjectionThreeFieldsCovered2109.281439.081997.531927.541958.091981.671392.572064.42
Aggregation.IntNonIdFindOne2132.751457.831522.331982.82075.431989.091566.112147.9
Aggregation.IntNonIdFindOneProjection2135.76239.291954.711917.031971.471936.141482.272068.66
Aggregation.IntNonIdFindOneProjectionCovered2017.89746.892044.431903.952024.031933.691684.72395.83
Aggregation.ProjectExclude_LargeArray4.43.322.65110.71110.24112.91206.831645.77
Aggregation.RegexPrefixFindOne2131.521334.41984.661949.681996.291973.271828.542082.74
Aggregation.TwoInts1868.521492.282038.791925.5619841705.151401.591421.43
Insert.BigKeyIndex430.64445.6425.83455.07446.8445.43351.05449.46
Insert.Empty540.121822.741926.652140.172159.81688.322033.312157.06
Insert.EmptyCapped400.141571.682044.742141.962156.062058.962101.732181.35
Insert.EmptyCapped.SeqIntID621.391662.991938.712158.691815.881573.742094.492166.36
Insert.IntIDUpsert2150.31806.641971.122129.732040.541772.861984.352119.81
Insert.IntVector568.931394.611468.621552.91534.681487.631478.21752.8
Insert.JustID422.761870.831997.432078.622039.522046.31998.612144.92
Insert.JustNum2109.521927.481885.262144.592093.471984.32016.962145
Insert.JustNumIndexed2056.791586.641825.542139.942093.591675.631970.612143.81
Insert.LargeDocVector147.18117.59101.1797.89104.5105.83150.22204.49
Insert.MultiIndex.Contested.Rnd1719.371928.931701.691856.342061.781843.441747.012048.19
Insert.MultiIndex.Uncontested.Rnd1355.091573.681642.792067.791958.491704.021781.932106.42
Insert.MultiKeyIndex.Contested.Rnd1999.291980.91848.732113.152080.082008.381451.12061.77
Insert.MultiKeyIndex.Uncontested.Rnd2019.172034.531380.311771.412076.912003.321495.012053.13
Insert.SeqIntID.Indexed2049.511207.522020.722126.692039.842036.591934.112129.67
Insert.SingleIndex.Contested.Rnd184.731698.751860.511993.732112.911842.981765.751062.45
Insert.SingleIndex.Seq566.072028.911827.762182.432017.032070.551815.85587.19
Insert.SingleIndex.Uncontested.Rnd624.781921.311513.281891.691962.51858.661709.16410.17
Insert.UniqueIndex2027.161455.421731.932137.722076.551771.581953.22126.56
Insert.UniqueIndexCompound2023.472045.21700.592143.072027.911842.092009.922152.22
Insert.UniqueIndexCompoundReverse2051.12007.681965.062160.312070.411904.222018.982150.28
InsertIndexedStringsNonSimpleCollation19921656.451738.972093.362031.122000.642047.342130.75
InsertIndexedStringsSimpleCollation2089.831679.831947.12107.171959.461988.392046.562160.96
Queries.FindProjectionDottedField.Indexed2106.731142.22051.651938.912013.861924.211232.652110.78
Queries.FindProjectionThreeFieldsCovered2070.641801.322007.82046.791940.561943.141653.632036.32
Queries.IdentityView.FindProjectionDottedField.Indexed2143.251225.431479.21988.91937.341968.071413.022047.54
Queries.IdentityView.FindProjectionThreeFieldsCovered1965.131375.631972.991960.691917.091896.621681.921960.25
Queries.IdentityView.IntNonIdFindOne2105.551171.451962.951934.021831.761892.111686.511896.55
Queries.IdentityView.IntNonIdFindOneProjection2087.41382.851926.931875.41945.911898.211458.82042.92
Queries.IdentityView.IntNonIdFindOneProjectionCovered2118.661107.161965.591957.851965.181935.241406.13701.45
Queries.IdentityView.ProjectExclude_LargeArray3.623.382.65108.43110108.68902.46378.87
Queries.IdentityView.RegexPrefixFindOne2174.411587.022076.121952.041984.41952.231944.782091.63
Queries.IdentityView.TwoInts2008.581684.541973.831966.51937.092005.511827.032040.02
Queries.IntNonIdFindOne1698.381620.481579.71967.71799.111797.311448.722095.47
Queries.IntNonIdFindOneProjection2147.932991818.571968.541981.471881.561441.982092.45
Queries.IntNonIdFindOneProjectionCovered2148.171230.942051.261941.982076.31961.771429.71632.97
Queries.PartialIndex.AllInFilter.FilteredRange3675.523583.883459.554005.423891.683368.573482.613928.29
Queries.PartialIndex.AllInFilter.FullRange4078.343848.792560.633987.494169.264017.192934.013999.56
Queries.PartialIndex.FilteredRange4038.973876.912611.313796.744169.823713.393031.26678.78
Queries.PartialIndex.FullRange2284.132458.672094.972454.522474.452250.062142.21484.57
Queries.PartialIndex.NonFilteredRange2313.912465.832140.772471.112151.432128.81939.96478.65
Queries.ProjectExclude_LargeArray1710.72795.451518.58104.74109.96106.82835.111451.48
Queries.RegexPrefixFindOne2018.231480.291982.351985.931989.282005.342053.052137.57
Queries.TwoInts2035.011813.441676.561911.411822.191828.651556.432080.73
Remove.IntId2696.212258.783080.523147.282948.762897.512321.373075.39
Remove.IntNonIdIndex2781.642210.522992.053125.922934.722795.412404.353115.44
Remove.IntNonIdNoIndex2377.212092.832556.352547.92564.1824522225.962652.35
Remove.IntNonIdUniqueIndex3006.782130.522931.473099.532896.793021.052174.953036.5
Update.FieldAtOffset939.68995.47898.32936.1891.26916.23826.39983.39
Update.IncFewLargeDoc2047.162060.131276.991922.451988.22013.431355.252086.74
Update.IncFewLargeDocLongFields2054.372064.08979.461239.832015.072020.11115.62048.54
Update.IncFewSmallDoc2023.672025.321253.651964.752037.892002.531200.842052.51
Update.IncFewSmallDocLongFields2087.21967.661189.481942.051967.262013.291528.742016.41
Update.IncNoIndex2023.192050.811665.341970.662014.592004.611304.712051.76
Update.IncNoIndexUpsert1988.872043.591804.451878.322074.822073.291324.672069.83
Update.IncWithIndex1981.882020.961849.891855.242001.411946.281702.112056.14
Update.IncWithIndexUpsert1990.041991.591799.331878.112001.761988.931396.352014.66
Update.ManyElementsWithinArray694.87667.85591.07638.81675.3682.6638.61681.41
Update.MatchedElementWithinArray1908.471867.871671.651763.651874.311838.681547.171895.55
Update.SetWithIgnoredIndex.Random2078.022028.811357.321981.791993.161904.721319.322115.62
Update.SetWithIgnoredIndex.String2081.822036.551591.012006.362022.582025.711260.342076.17
Update.SetWithIndex.Random1836.891985.041540.071954.732013.081966.591218.372093.32
Update.SetWithMultiIndex.Random2067.772043.291470.071964.52054.731970.811280.452133.01
Update.SetWithMultiIndex.String1770.841673.081656.291731.791795.611753.531232.461818.7
Update.SingleDocFieldAtOffset2558.13043.632242.282896.443134.772981.631959.953099.88
Update.UniqueIndex2020.921941.971718.291947.412038.722016.821320.241998.2
Update.UniqueIndexCompoundReverse1979.271975.461792.661883.882030.661921.791622.012008.03
 
Highlight Version
Scenario3.64.04.24.45.06.07.08.0
Aggregation.FindProjectionDottedField.Indexed3974.22329.763814.173663.63852.743847.292936.56813.64
Aggregation.FindProjectionThreeFieldsCovered3775.843111.843494.033626.393768.73843.682984.583759.98
Aggregation.IntNonIdFindOne3853.082732.83328.463715.433513.463659.963908.163992.78
Aggregation.IntNonIdFindOneProjection3841.722754.633681.433815.083754.823769.572877.034017.52
Aggregation.IntNonIdFindOneProjectionCovered3856.332745.333878.563672.133630.653646.173786.383946.62
Aggregation.ProjectExclude_LargeArray3.594.432.69108.67101.9187.292055.292021.65
Aggregation.RegexPrefixFindOne1842.96756.333898.383782.723873.143766.023615.23977.68
Aggregation.TwoInts790.634445.16060.395943.9662066300.174944.486746.62
Insert.BigKeyIndex507.1527.92492.92530.15547.38480.06495.26526.31
Insert.Empty6902.723212.143789.474026.996842.76386.686486.693849.8
Insert.EmptyCapped6367.274327.083895.024138.995777.435976.815756.652057.95
Insert.EmptyCapped.SeqIntID6884.213765.633839.414050.445758.665408.324620.494195.75
Insert.IntIDUpsert3829.442647.893495.913143.263929.693666.433698.543955.88
Insert.IntVector2625.151611.832102.52177.622047.52348.752180.482802.25
Insert.JustID6919.373845.523804.543892.866737.316536.46555.864108.09
Insert.JustNum6630.923996.723401.56896.946825.866521.514609.954104.46
Insert.JustNumIndexed4277.954242.093728.926617.66426.826220.15111.73867.99
Insert.LargeDocVector151.4992.55103.37105.3898.86106.85100.97200.48
Insert.MultiIndex.Contested.Rnd3481.373798.533486.974044.244022.173618.552276.844053.92
Insert.MultiIndex.Uncontested.Rnd3797.723573.953334.244038.653689.333491.642587.153942.25
Insert.MultiKeyIndex.Contested.Rnd3767.873869.362773.453981.253370.143938.482521.244043.39
Insert.MultiKeyIndex.Uncontested.Rnd3709.843852.682993.684101.033985.73831.982512.394022.62
Insert.SeqIntID.Indexed6691.143273.53332.626035.066657.196223.625414.844053.06
Insert.SingleIndex.Contested.Rnd6471.256283.174298.956861.996543.156085.863375.153882.89
Insert.SingleIndex.Seq6199.836720.844776.026977.376490.16759.823513.893967.25
Insert.SingleIndex.Uncontested.Rnd3195.233806.272945.794092.474024.943700.463216.193965.95
Insert.UniqueIndex2372.413403.43889.426809.336842.96357.364374.273937.22
Insert.UniqueIndexCompound761.512751.633772.424029.473679.173190.442390.024142.4
Insert.UniqueIndexCompoundReverse1420.572807.083916.694039.063977.372631.872567.224074.2
InsertIndexedStringsNonSimpleCollation757.022721.242606.523939.573650.933649.893063.124134
InsertIndexedStringsSimpleCollation1345.073103.83607.523850.893858.933617.031835.44160.8
Queries.FindProjectionDottedField.Indexed3624.432511.733339.243762.793871.333751.392744.84036.64
Queries.FindProjectionThreeFieldsCovered3954.751778.873913.153690.023808.473837.942916.194048.85
Queries.IdentityView.FindProjectionDottedField.Indexed3883.182053.993696.763722.483752.613763.632915.341501.7
Queries.IdentityView.FindProjectionThreeFieldsCovered4053.922713.63653.733692.233854.53701.342438.463927.97
Queries.IdentityView.IntNonIdFindOne7304.735556.556524.066063.765782.86404.66448.257058.97
Queries.IdentityView.IntNonIdFindOneProjection4093.352187.753252.83157.173825.773843.342379.093842.97
Queries.IdentityView.IntNonIdFindOneProjectionCovered3738.542570.883407.513757.853779.163736.223864.413815.96
Queries.IdentityView.ProjectExclude_LargeArray4.134.443.02113.41108.85102.471644.482090.42
Queries.IdentityView.RegexPrefixFindOne3789.81409.123329.723735.463797.823760.353509.943978.95
Queries.IdentityView.TwoInts2154.385120.924907.325549.956072.986301.926391.056615.17
Queries.IntNonIdFindOne6331.843912.832932.646116.186481.645880.316382.836637.69
Queries.IntNonIdFindOneProjection36752349.923797.643740.083824.523863.382784.934054.36
Queries.IntNonIdFindOneProjectionCovered3814.223268.183300.143739.373784.243881.773598.013988.98
Queries.PartialIndex.AllInFilter.FilteredRange6724.576584.156179.557727.257764.656981.674175.131460.8
Queries.PartialIndex.AllInFilter.FullRange12720.8112926.385573.8112879.2712775.7312819.418192.071453.81
Queries.PartialIndex.FilteredRange13004.8912630.376290.1213151.5213320.2412586.466355.817576.6
Queries.PartialIndex.FullRange6443.276979.873716.036448.596150.795401.974156.13823.27
Queries.PartialIndex.NonFilteredRange4691.054530.443068.724649.394755.824148.563067.171778.74
Queries.ProjectExclude_LargeArray2130.961466.21601.94101.99105.0593.761861.072051.74
Queries.RegexPrefixFindOne3902.111174.373561.573739.733764.433788.443671.814086.69
Queries.TwoInts1729.63252.226070.656203.025903.365805.314653.696481.44
Remove.IntId8679.777664.249586.2910228.769676.149484.2110170.845720.41
Remove.IntNonIdIndex5889.093501.376723.066893.296493.426389.66060.726088.82
Remove.IntNonIdNoIndex4045.53798.015154.455144.345008.424794.215026.995213.79
Remove.IntNonIdUniqueIndex5927.394406.426767.16651.166596.986544.656345.445959.39
Update.FieldAtOffset1814.151922.381741.031755.0617381802.851535.21913.23
Update.IncFewLargeDoc3802.653809.973400.453892.273828.793799.632738.53987.18
Update.IncFewLargeDocLongFields3576.43671.242777.342915.663801.783760.613027.713813.54
Update.IncFewSmallDoc3759.273763.833663.113831.233766.673774.872169.43950.84
Update.IncFewSmallDocLongFields3491.923644.572496.523658.373745.083602.92383.133811.93
Update.IncNoIndex3831.643925.513620.473835.073346.243802.33878.323962.3
Update.IncNoIndexUpsert3787.793926.643860.423782.073667.673841.292834.023974.26
Update.IncWithIndex3771.463938.183625.323921.273882.873867.7533183952.32
Update.IncWithIndexUpsert3845.413884.893675.583892.953837.673785.423231.574014.99
Update.ManyElementsWithinArray873.53883.98603.08851.66890.57888.56903.66878.64
Update.MatchedElementWithinArray3643.473724.342620.93298.923638.383745.593354.363658.91
Update.SetWithIgnoredIndex.Random3767.773820.963791.343833.913934.653833.942432.693979.04
Update.SetWithIgnoredIndex.String3870.393905.123776.643868.733785.823828.552589.163701.03
Update.SetWithIndex.Random3197.453944.443804.853664.33837.143658.752468.093938.28
Update.SetWithMultiIndex.Random3858.743651.272836.023873.883841.653603.182604.453733.51
Update.SetWithMultiIndex.String2713.692817.882728.622773.412796.122796.71556.642843.87
Update.SingleDocFieldAtOffset5663.25771.715184.625732.855077.045749.834457.625981.02
Update.UniqueIndex3873.283926.913085.053806.323957.623865.523640.523948.82
Update.UniqueIndexCompoundReverse3718.963842.883008.983721.23875.183833.293304.333910.17
 
Highlight Version
Scenario3.64.04.24.45.06.07.08.0
Aggregation.FindProjectionDottedField.Indexed2268.243809.016233.365742.524018.946120.15798.956551.84
Aggregation.FindProjectionThreeFieldsCovered6240.935436.756078.555965.514057.616034.126093.796321.56
Aggregation.IntNonIdFindOne5770.64783.066255.626097.524087.095940.965659.985851.13
Aggregation.IntNonIdFindOneProjection62133725.616101.775916.264069.365928.226191.776306.03
Aggregation.IntNonIdFindOneProjectionCovered5710.965389.5760785835.113868.686050.095911.816327.62
Aggregation.ProjectExclude_LargeArray3.553.752.6663.6551.0760.712403.112656.95
Aggregation.RegexPrefixFindOne6462.773887.886299.525983.174374.156150.466218.881270.57
Aggregation.TwoInts8152.825922.578649.137205.535765.198175.498398.477009.04
Insert.BigKeyIndex512.42523.4469.78540.45531.44547.73496.85515.76
Insert.Empty9212.585056.488223.458974.768210.688344.948170.697905.01
Insert.EmptyCapped8614.456696.038182.358416.897389.787626.276973.568017.76
Insert.EmptyCapped.SeqIntID7547.47553.437863.448663.267149.46841.77004.717237.96
Insert.IntIDUpsert5910.033893.745808.756181.196004.686097.646208.957519.04
Insert.IntVector4436.073649.463591.443942.683748.683839.733907.234950.53
Insert.JustID8669.347403.497904.038188.088208.818323.388580.737595.8
Insert.JustNum8531.055130.497766.858606.7582348127.518878.777867.75
Insert.JustNumIndexed6653.868228.927537.288680.338024.328221.078729.197811.05
Insert.LargeDocVector32.06103.09103.45107.7100.52103.36103.51190.45
Insert.MultiIndex.Contested.Rnd5604.355914.575282.436037.716199.55942.713916.426579.37
Insert.MultiIndex.Uncontested.Rnd5699.56330.956436.656508.426088.845847.654632.76585.47
Insert.MultiKeyIndex.Contested.Rnd6265.65948.194553.256375.626278.236355.334160.086337.13
Insert.MultiKeyIndex.Uncontested.Rnd5800.146130.634193.995521.265560.916248.664240.026375.82
Insert.SeqIntID.Indexed8961.746396.887083.878286.257872.468401.588756.097259.4
Insert.SingleIndex.Contested.Rnd7992.887764.456737.318346.758914.568248.835671.226647.94
Insert.SingleIndex.Seq8407.158532.297216.858583.438780.48653.3650276819.42
Insert.SingleIndex.Uncontested.Rnd6162.116302.314772.386101.366364.276261.444257.66751.4
Insert.UniqueIndex6560.327840.97629.728847.48097.128397.228533.87878.45
Insert.UniqueIndexCompound5383.084069.566234.216268.866185.335680.874963.137615.32
Insert.UniqueIndexCompoundReverse2512.595927.56216.046014.656371.946058.434702.577656.48
InsertIndexedStringsNonSimpleCollation5012.873874.695813.256300.026374.535578.354922.437862.98
InsertIndexedStringsSimpleCollation4459.984328.265902.366116.256129.95821.994059.617560.15
Queries.FindProjectionDottedField.Indexed3064.184348.226253.546148.494228.226161.65873.66634.76
Queries.FindProjectionThreeFieldsCovered6425.194666.396202.286007.464001.415928.466202.95531.55
Queries.IdentityView.FindProjectionDottedField.Indexed1597.824829.716305.975974.983815.966220.156343.426854.9
Queries.IdentityView.FindProjectionThreeFieldsCovered6245.714050.855947.195806.523887.345942.146167.186489.94
Queries.IdentityView.IntNonIdFindOne9045.085542.778817.977577.586690.658424.028680.46850.27
Queries.IdentityView.IntNonIdFindOneProjection6499.193911.646097.715935.354432.025954.256386.466928.09
Queries.IdentityView.IntNonIdFindOneProjectionCovered6380.314247.066065.36057.214431.996172.366174.286754.21
Queries.IdentityView.ProjectExclude_LargeArray3.493.652.8252.2980.1651.262450.182599.24
Queries.IdentityView.RegexPrefixFindOne6401.564479.266215.815734.383906.516206.846241.342327.95
Queries.IdentityView.TwoInts8920.115627.48707.287759.116337.368521.268697.846799.04
Queries.IntNonIdFindOne8275.69668.148425.978020.845048.238652.218663.666759.52
Queries.IntNonIdFindOneProjection6238.424513.726168.986057.193820.766087.546030.326674.99
Queries.IntNonIdFindOneProjectionCovered6274.53616.146222.986087.495066.536149.716119.866572.13
Queries.PartialIndex.AllInFilter.FilteredRange11679.6411354.910959.7412308.5811918.7111862.067873.0313251.53
Queries.PartialIndex.AllInFilter.FullRange16647.9415085.815551.0416798.0416648.7916924.2910629.7313523.61
Queries.PartialIndex.FilteredRange15835.4115234.9614047.6517023.1516934.3816756.7312400.9813370.99
Queries.PartialIndex.FullRange9816.059531.888290.689358.339043.477809.067132.638737.22
Queries.PartialIndex.NonFilteredRange7917.548036.376862.527692.946532.216054.015125.78788.57
Queries.ProjectExclude_LargeArray2771.192066.92038.6384.9660.6748.582640.352667.75
Queries.RegexPrefixFindOne6255.635515.366233.945950.094223.266317.366338.62479.81
Queries.TwoInts8090.584964.698714.637593.345562.748494.558306.385238.3
Remove.IntId2321.039018.9112972.1812703.8910130.6812364.99458.0412226.17
Remove.IntNonIdIndex1512.089211.411204.2911357.0111322.5211247.429468.2711202.22
Remove.IntNonIdNoIndex2423.654889.459600.349633.849599.448935.668109.979429.73
Remove.IntNonIdUniqueIndex9209.195297.1711367.5411486.1311358.9111012.778257.0211435.45
Update.FieldAtOffset2889.963055.162809.032679.782702.822801.442200.133408.6
Update.IncFewLargeDoc6029.526013.995489.095972.716050.025997.94089.036018.12
Update.IncFewLargeDocLongFields5887.585988.833732.785890.075081.435931.314015.196083.37
Update.IncFewSmallDoc6026.416115.955997.535700.565957.735994.893128.155698.04
Update.IncFewSmallDocLongFields5893.055968.934955.416046.875879.815981.523622.155634.18
Update.IncNoIndex6239.426194.844667.115000.865011.316116.754739.135606.43
Update.IncNoIndexUpsert6154.586167.015574.716033.965392.565963.985544.686306.17
Update.IncWithIndex6047.556273.324702.065352.715474.886224.73561.336317.22
Update.IncWithIndexUpsert6042.666247.275084.176152.95437.466220.474312.696178.67
Update.ManyElementsWithinArray1003.691053.21452.59720.07997.94803.391038.791064.54
Update.MatchedElementWithinArray5575.735548.694119.45998.35704.665719.653275.165778.47
Update.SetWithIgnoredIndex.Random5983.115941.615693.825392.916031.846057.734496.056496.16
Update.SetWithIgnoredIndex.String6093.586241.646252.25520.575953.456079.834175.56412.12
Update.SetWithIndex.Random6223.96145.284153.656022.916184.046276.414208.456531.03
Update.SetWithMultiIndex.Random6135.826211.075988.636122.365898.446095.183910.66415.47
Update.SetWithMultiIndex.String4139.774097.184113.244086.664140.624221.213242.071402.13
Update.SingleDocFieldAtOffset9334.969210.838702.749465.899408.569202.378281.449324.42
Update.UniqueIndex5787.616282.545967.156752.866216.446165.374111.896417.95
Update.UniqueIndexCompoundReverse5895.156195.696014.36311.696120.616229.545391.476335.64

 

Conclusion

I’ll leave the final judgment to you.

That’s because one of the ideas behind using different numbers of threads was to allow those with limited resources to gain a further understanding of what they can expect from Mongo in that scenario.

It is nearly impossible to draw a conclusion from all those tests and express it in a single observation. So, take your time, examine the data and methodology more closely, and feel free to share your thoughts in the comments section below.

That being said, a few overall considerations can be shared.

  • Is it fair to compare MongoDB 8.0 against older releases, such as 3.6, 4.0, and so on?

In my opinion, it’s not.

If we look at the core component, such as the WiredTiger engine, it has changed drastically to accommodate all the new features and hardening around the product that you like; comparing them at this point is like comparing different products.

Still, those changes shouldn’t be used to support performance regressions over new releases. Even though it isn’t fair to compare both products, you are your own benchmark; and one thing that we really know is that users don’t accept being pushed around, especially when it’s related to losing performance.

Per the releases of the blog posts from the engineering team(1,2,3), they were aware of that, and the approach has changed for MongoDB 8:

[..] For instance, if any commit would regress a benchmark by more than 5% for our most important workloads, we would revert the commit. However, this threshold does not detect regressions of 0.1%, and there are thousands of commits per release (e.g., more than 9000 in MongoDB 8.0).

During the release of MongoDB 7.0, we started to take this gradual accumulation of performance loss by tiny regressions of release over release regressions seriously, so we changed the rules of the game. We decided we could not ship MongoDB 7.0 unless it at least matched MongoDB 6.0’s performance on the most important benchmarks.

It’s debatable whether 7.0 has the same performance as MongoDB 6.0, either based on the above tests or on personal experience after working with all those releases.

Still, there is one thing that this study and the engineer’s notes have in common 

  • MongoDB 8.0 has indeed better performance than its close predecessors.

Please note that this study doesn’t cover areas such as resource consumption, which is a great candidate for a separate study and posts.

But at this point, my personal recommendation is to upgrade to the 8.0 release as soon as possible to take advantage of those improvements.

Another final observation and a fun fact from this study is that if we remove MongoDB 8.0 from the results, we can see that MongoDB 3.6 fighting for the second most performant release in this benchmark test, having consistent and great results across the board.

Let me know your thoughts in the comments below, or feel free to reach out to me on LinkedIn.

See ya!


References:

  1. MongoDB 8.0: Raising the Bar
  2. MongoDB 8.0: Eating Our Own Dog Food

  3. MongoDB 8.0: Improving Performance, Avoiding Regressions

Leave a Comment

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *