Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermediate fix for JS KV handle caching - TypedKvMap does lazy lookup #5717

Merged
merged 4 commits into from
Oct 10, 2023

Conversation

eddyashton
Copy link
Member

We have found an issue with interpreter reuse, where caching of KV handles can result in memory violations (attempting to access handles from a previous Tx). A full fix for this will land in future, marking such handles as dirty so they are refreshed in future invocations. This is a temporary/partial fix, resolving the issue for TypeScript applications by making all handle lookups lazy.

@eddyashton eddyashton requested a review from a team October 10, 2023 10:51
@ghost
Copy link

ghost commented Oct 10, 2023

interp_reuse_handle_caching@77042 aka 20231010.13 vs main ewma over 20 builds from 76674 to 77015

Click to see table

main

build_id build_number pi_basic_mt_virtual_cft^ Commit latency factor tpcc_sgx_cft^ tpcc_sgx_cft_mem pi_basic_mt_sgx_cft^ pi_basic_mt_sgx_cft_mem ls_sgx_cft^ ls_sgx_cft_mem tpcc_virtual_cft^ pi_ls_sgx_cft^ pi_ls_sgx_cft_mem pi_basic_sgx_cft^ pi_basic_sgx_cft_mem ls_virtual_cft^ pi_ls_virtual_cft^ pi_basic_virtual_cft^ pi_basic_js_virtual_cft^ pi_basic_js_sgx_cft^ pi_basic_js_sgx_cft_mem ls_jwt_virtual_cft^ pi_ls_jwt_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_virtual_cft^ pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_full_js_virtual_cft^ ls_js_jwt_virtual_cft^ ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem hist_sgx_cft^ RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
76674 20230929.32 79416.4 0.824286 5650.04 8.59996e+07 28135.8 2.51822e+07 14044.4 1.88908e+07 17258 14151.8 1.05021e+07 15668.6 1.46964e+07 44130.7 47868.2 54216.1 4439.1 1441.1 1.25993e+07 17162.5 19472.3 6848.37 1.88908e+07 17470.5 7030.2 6.30784e+06 14776.5 10176.7 5779.43 1.67936e+07 5785.88 1.67936e+07 4002.96 1.67936e+07 42393.6 834800 1.17705e+06 8.15572e+06 3.08671e+07
76681 20231002.1 77661.1 0.778316 5610.63 8.59996e+07 27742.7 2.51822e+07 14016.2 1.67936e+07 17317.1 14116.8 1.05021e+07 15668.2 1.46964e+07 45761.1 47867.7 54907.1 4426.1 1441.3 1.25993e+07 17211.6 19449.2 7241.2 1.67936e+07 17053.9 6972.2 6.30784e+06 14750.7 9744.29 5780.61 1.67936e+07 5740.75 1.67936e+07 4007.12 1.67936e+07 43611.5 832338 1.182e+06 8.17173e+06 3.15261e+07
76724 20231002.20 65839 0.836357 5500.05 8.59996e+07 27904.4 2.30851e+07 13942.2 1.88908e+07 17138.9 14010.7 1.05021e+07 15376 1.46964e+07 45994 47515 54332.6 4407.9 1426.4 1.25993e+07 17567.5 19677.7 6865.24 1.88908e+07 17216.8 6825.1 6.30784e+06 15003.6 9764.04 5791.28 1.67936e+07 5466.41 1.67936e+07 3982.56 1.67936e+07 38966.2 827863 1.17557e+06 8.17144e+06 3.07438e+07
76730 20231003.1 71051.7 0.81692 5607.21 8.59996e+07 28013.8 2.51822e+07 14019 1.88908e+07 17191.7 14147.9 1.05021e+07 15694.6 1.25993e+07 45513.1 48269.1 54442.6 4481.1 1444.4 1.25993e+07 17361.9 19564.9 6811.01 1.88908e+07 17099.1 7029 6.30784e+06 14813.6 9839.85 5811.58 1.67936e+07 5768.4 1.67936e+07 3971.63 1.67936e+07 45281.2 833206 1.18303e+06 8.14586e+06 3.06784e+07
76737 20231003.4 64150.5 0.819855 5602.23 8.59996e+07 27593.5 2.30851e+07 14099.4 1.67936e+07 17191.7 14185.4 1.05021e+07 15720.3 1.46964e+07 45892.7 48119 54628 4416 1442.7 1.25993e+07 17162 19516.8 6888.2 1.88908e+07 17353 6947.2 6.30784e+06 14663.4 9885.05 5809.12 1.67936e+07 5745.68 1.67936e+07 3987.27 1.67936e+07 45195.8 833711 1.17516e+06 8.15378e+06 3.0875e+07
76798 20231003.31 81597 0.832841 5507.34 8.59996e+07 27510.7 2.51822e+07 13926.2 1.88908e+07 17353.1 14064.4 1.05021e+07 15503.8 1.25993e+07 45905.3 48154 53871 4439.9 1426.1 1.25993e+07 17065.3 19658.3 6835.05 1.88908e+07 17561 6934.2 6.30784e+06 15029.1 10165.7 5797.3 1.67936e+07 5480.27 1.67936e+07 3989.1 1.67936e+07 43728.3 828433 1.17822e+06 8.15582e+06 3.11739e+07
76817 20231004.1 69954.7 0.780939 5626.78 8.59996e+07 27941.5 2.51822e+07 13971.1 1.88908e+07 17068.1 14077.8 1.05021e+07 15496.4 1.46964e+07 43943.3 47753 54465.2 4457.9 1437 1.05021e+07 17248 19168.1 7251.7 1.67936e+07 17214.9 6941.9 6.30784e+06 16923.5 9820.54 5773.46 1.67936e+07 5738.5 1.67936e+07 3993.81 1.67936e+07 41295.8 841933 1.17864e+06 8.15569e+06 3.07938e+07
76832 20231004.7 68893.5 0.791761 5615.29 8.59996e+07 27629.2 2.30851e+07 13975.4 1.67936e+07 17248.6 14056.3 1.05021e+07 15601.7 1.25993e+07 43721.4 48138.9 46993.4 4444.2 1434 1.25993e+07 17038.4 19713.4 6873.72 1.88908e+07 17646.2 7089.4 6.30784e+06 14882.5 9901.95 5806.39 1.67936e+07 5726.45 1.67936e+07 3976.51 1.67936e+07 42527.8 835979 1.17914e+06 8.15303e+06 3.17647e+07
76869 20231004.22 70744.9 0.806157 5552.49 8.59996e+07 27762.1 2.51822e+07 14003.1 1.88908e+07 17245.9 14065.4 1.05021e+07 15372.4 1.46964e+07 45658.4 48077.4 54561.1 4464.3 1427 1.25993e+07 17322.8 18923.3 6868.91 1.88908e+07 17202.1 7022 6.30784e+06 15082.4 9913.2 5804.63 1.67936e+07 5756.12 1.67936e+07 3991.19 1.67936e+07 45382.2 834342 1.18098e+06 8.14978e+06 3.08076e+07
76888 20231004.30 67387.1 0.810034 5604.3 8.59996e+07 27780.7 2.30851e+07 13985 1.88908e+07 17390.9 14115.9 1.05021e+07 15556.5 1.46964e+07 45776.9 48301 51883.1 4390.1 1434.9 1.25993e+07 17189.2 20048.9 6863.79 1.67936e+07 15378.1 7032.1 6.30784e+06 14886.4 10356.8 5815.76 1.67936e+07 5751.88 1.67936e+07 3969.63 1.67936e+07 42002.2 823286 1.18056e+06 8.1555e+06 3.03318e+07
76915 20231004.42 80712.1 0.774478 5624.97 8.59996e+07 27485.2 2.51822e+07 14042.4 1.88908e+07 17274.8 14174.9 1.05021e+07 15627.4 1.25993e+07 46033.9 48315.9 53167.5 4402.4 1433.2 1.25993e+07 17273.2 19310.2 6910.89 1.88908e+07 17384.9 6998.2 6.30784e+06 14995.5 10159.5 5784.96 1.67936e+07 5748.49 1.67936e+07 4003.02 1.67936e+07 40358.8 835408 1.17924e+06 8.12898e+06 3.07817e+07
76922 20231005.1 65412.6 0.810974 5626.69 8.59996e+07 28029.7 2.51822e+07 14039 1.88908e+07 17459.2 14080.5 1.05021e+07 15577.1 1.46964e+07 45898.2 48742 54118.6 4456.3 1432.3 1.25993e+07 17231.8 20034.9 6863.93 1.67936e+07 17323.3 7085.2 6.30784e+06 14832.9 10275.8 5810.75 1.67936e+07 5719.35 1.67936e+07 3992.52 1.67936e+07 42574.2 829315 1.17285e+06 8.14651e+06 3.07836e+07
76933 20231005.5 81465 0.805698 5569.11 8.59996e+07 27882.8 2.30851e+07 14005.2 1.88908e+07 17274.6 14146.2 1.05021e+07 15512.2 1.46964e+07 45946.3 48589.4 54166.2 4463.6 1432.2 1.25993e+07 17329.5 19980 6865.95 1.88908e+07 17094.5 6977.1 6.30784e+06 16949.3 9763.9 5765.37 1.67936e+07 5766.41 1.67936e+07 3994.82 1.67936e+07 39270.6 837034 1.18428e+06 8.10377e+06 3.25923e+07
76941 20231006.1 65485.1 0.799935 5581.89 8.59996e+07 28097.1 2.30851e+07 14055.4 1.88908e+07 17296.4 14129.3 1.05021e+07 15654.4 1.25993e+07 45618.5 48175.1 53457.3 4479 1434.8 1.25993e+07 17334.7 19718.8 6890.62 1.67936e+07 17075.6 6976.6 6.30784e+06 14603.4 9842.12 5781.49 1.67936e+07 5744.04 1.67936e+07 4009.45 1.67936e+07 39294.9 839192 1.18477e+06 8.15264e+06 3.23033e+07
76953 20231006.6 78324.4 0.797479 5610.73 8.59996e+07 27710.2 2.51822e+07 14024 1.88908e+07 16945.5 14122.5 1.05021e+07 15585.3 1.25993e+07 43917.9 48958.9 53263.2 4423.9 1444.6 1.25993e+07 17245.1 18721.7 7252.76 1.67936e+07 17292 7058.2 6.30784e+06 14773.2 9748.83 5820.86 1.67936e+07 5773.73 1.67936e+07 4008.93 1.67936e+07 45657 835912 1.17953e+06 8.07625e+06 2.6895e+07
76967 20231006.11 64719 0.799426 5542.39 8.59996e+07 28032.2 2.30851e+07 13951.2 1.88908e+07 17341.4 14077.9 1.05021e+07 15519.1 1.25993e+07 45691.3 48875.1 54004.5 4469.9 1421.7 1.25993e+07 17300.7 19158.2 6820.04 1.88908e+07 16934.3 6884.1 6.30784e+06 14583.1 9795.4 5770.08 1.67936e+07 5760.09 1.88908e+07 4004.62 1.67936e+07 47130.7 835081 1.17659e+06 8.17304e+06 3.09852e+07
76976 20231007.2 69696.2 0.797827 5640.74 8.59996e+07 27833 2.51822e+07 14032.5 1.88908e+07 17276.4 14190 1.05021e+07 15631.1 1.46964e+07 45702.6 48619 53436.8 4409.7 1433.9 1.25993e+07 17184.3 19733.2 7287.64 1.67936e+07 17169.5 7044.3 6.30784e+06 14871.6 9779.02 5786.37 1.67936e+07 5747.56 1.67936e+07 4006.09 1.67936e+07 45049.2 830418 1.18267e+06 8.17291e+06 3.07891e+07
76982 20231009.2 81026 0.792855 5580.01 8.59996e+07 27935.7 2.51822e+07 13963.1 1.88908e+07 17231.2 14141.8 1.05021e+07 15380.7 1.25993e+07 45523.7 48581 54131 4253.1 1439.9 1.25993e+07 17397.5 19156 7196.39 1.67936e+07 17135.7 7023.9 6.30784e+06 16869.3 9793.25 5773.77 1.67936e+07 5474.35 1.67936e+07 3981.48 1.67936e+07 46259.3 832879 1.18218e+06 8.14943e+06 3.15184e+07
76994 20231009.5 88389.5 0.799524 5591.29 8.59996e+07 27792.2 2.30851e+07 13986.8 1.88908e+07 17106.4 14144 1.05021e+07 15585.3 1.25993e+07 45848 48779.1 53666.3 4397.6 1431.3 1.25993e+07 17242 19596.7 6852.61 1.67936e+07 16914.5 6940.5 6.30784e+06 16715.5 9855.69 5808.48 1.67936e+07 5783.34 1.67936e+07 3987.05 1.67936e+07 44311.9 831717 1.18619e+06 8.15293e+06 3.07093e+07
77015 20231010.4 62049.7 0.83228 5592.78 8.59996e+07 27777.8 2.30851e+07 14023.3 1.88908e+07 17372.9 14107 1.05021e+07 15597.5 1.25993e+07 45785.1 48171.9 53651.8 4441.2 1436 1.25993e+07 17407.2 19739.4 6898.77 1.88908e+07 17105.5 7117.8 6.30784e+06 16857.9 9954.93 5804.14 1.67936e+07 5786.43 1.67936e+07 4016.78 1.67936e+07 41221.6 825345 1.18742e+06 8.12844e+06 3.06711e+07

interp_reuse_handle_caching

build_id build_number pi_basic_mt_sgx_cft^ pi_basic_mt_sgx_cft_mem Commit latency factor tpcc_sgx_cft^ tpcc_sgx_cft_mem pi_basic_mt_virtual_cft^ tpcc_virtual_cft^ ls_virtual_cft^ pi_ls_virtual_cft^ pi_basic_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_basic_js_virtual_cft^ pi_ls_sgx_cft^ pi_ls_sgx_cft_mem ls_jwt_virtual_cft^ pi_basic_sgx_cft^ pi_basic_sgx_cft_mem pi_ls_jwt_virtual_cft^ ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_js_jwt_virtual_cft^ pi_basic_js_sgx_cft^ pi_basic_js_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem hist_sgx_cft^ ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
77042 20231010.13 28035.5 2.51822e+07 0.782601 5583.69 8.59996e+07 88237.9 17364.8 45563 47984 53012.2 14002 1.88908e+07 4414.1 14067.9 1.05021e+07 17344.8 15608.9 1.25993e+07 18862.2 17740.1 14919.8 9790.09 1440.3 1.25993e+07 6886.97 1.88908e+07 6929.2 6.30784e+06 5806.82 1.67936e+07 46928.2 5781.93 1.67936e+07 4002.16 1.67936e+07 828811 1.18211e+06 8.15439e+06 3.0809e+07

images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants