Skip to content

Conversation

@Satbek
Copy link
Contributor

@Satbek Satbek commented Dec 17, 2025

  • remove the extra wrapper around box.space methods to avoid per-call closures and arg tables
  • call wrap_func_result directly so storage paths allocate less and return handling stays centralized
  • reduce storage-side overhead on replace/insert/delete/get/update/upsert(+_many) for better call latency

crud.replace on master:
replace on master

A lot of work in lj_BC_FNEW, lj_BC_TDUP, lj_bc_TNEW

crud.replace after drop wrap_box_space_func_result:
replace after drop wrap_box_space_func_result

Benchmark (CRUD) ns/op (branch) ns/op (master) Δ ns/op op/s (branch) op/s (master) Δ op/s B/op (branch) B/op (master) Δ B/op
delete_bench::bench_delete_crud 746.5 1108 -32.6% 1,339,649 902,645 +48.4% 360 904 -60.2%
get_bench::bench_get_crud 1080 1273 -15.2% 926,138 785,517 +17.9% 592 816 -27.5%
get_bench::bench_get_crud_empty 1269 1384 -8.3% 787,892 722,747 +9.0% 616 840 -26.7%
insert_bench::bench_insert_crud 1684 2167 -22.3% 593,904 461,438 +28.7% 464 979 -52.6%
multiple_bench::bench_multiple_crud 4075 5431 -25.0% 245,405 184,123 +33.3% 1098 2600 -57.8%
replace_bench::bench_replace_crud 1291 1725 -25.2% 774,312 579,560 +33.6% 374 860 -56.5%
update_bench::bench_update_crud 1693 2151 -21.3% 590,826 464,809 +27.1% 570 1041 -45.2%
upsert_bench::bench_upsert_crud 1240 1645 -24.6% 806,177 607,733 +32.7% 224 704 -68.2%
Details

BRANCH

Tarantool version: Tarantool 3.5.0-0-g81b5335e96
Tarantool build: Linux-x86_64-RelWithDebInfo (static)
Tarantool build flags: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -fmacro-prefix-map=/tarantool=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2
CPU: 12th Gen Intel(R) Core(TM) i7-12700F @ 2112.004MHz
JIT: Enabled
JIT: SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse
Duration: 3s
Global timeout: 60

--- BENCH: delete_bench::bench_delete_crud
4843811 746.5 ns/op 1339649 op/s 360 B/op +1663.03MB

--- BENCH: delete_bench::bench_delete_raw
10264413 348.2 ns/op 2872126 op/s 88 B/op +861.43MB

--- BENCH: get_bench::bench_get_crud
3370714 1080 ns/op 926138 op/s 592 B/op +1903.03MB

--- BENCH: get_bench::bench_get_crud_empty
2853994 1269 ns/op 787892 op/s 616 B/op +1676.62MB

--- BENCH: get_bench::bench_get_raw
6907857 520.6 ns/op 1920814 op/s 96 B/op +632.44MB

--- BENCH: get_bench::bench_get_raw_empty
5477172 648.9 ns/op 1541154 op/s 120 B/op +626.81MB

--- BENCH: insert_bench::bench_insert_crud
2206256 1684 ns/op 593904 op/s 464 B/op +976.63MB

--- BENCH: insert_bench::bench_insert_raw
3084187 1251 ns/op 799553 op/s 209 B/op +617.62MB

--- BENCH: multiple_bench::bench_multiple_crud
1000000 4075 ns/op 245405 op/s 1098 B/op +1047.50MB

--- BENCH: replace_bench::bench_replace_crud
2878729 1291 ns/op 774312 op/s 374 B/op +1028.88MB

--- BENCH: replace_bench::bench_replace_raw
5123957 719.4 ns/op 1390055 op/s 94 B/op +459.66MB

--- BENCH: update_bench::bench_update_crud
2072387 1693 ns/op 590826 op/s 570 B/op +1128.17MB

--- BENCH: update_bench::bench_update_raw
3292275 1110 ns/op 901292 op/s 185 B/op +582.57MB

--- BENCH: upsert_bench::bench_upsert_crud
2897877 1240 ns/op 806177 op/s 224 B/op +619.08MB

--- BENCH: upsert_bench::bench_upsert_raw
4090589 857.8 ns/op 1165802 op/s 0 B/op +11.70KB

MASTER

Tarantool version: Tarantool 3.5.0-0-g81b5335e96
Tarantool build: Linux-x86_64-RelWithDebInfo (static)
Tarantool build flags: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -fmacro-prefix-map=/tarantool=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2
CPU: 12th Gen Intel(R) Core(TM) i7-12700F @ 2112.004MHz
JIT: Enabled
JIT: SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse
Duration: 3s
Global timeout: 60

--- BENCH: delete_bench::bench_delete_crud
3286533 1108 ns/op 902645 op/s 904 B/op +2833.39MB

--- BENCH: delete_bench::bench_delete_raw
10515327 347.1 ns/op 2880666 op/s 88 B/op +882.49MB

--- BENCH: get_bench::bench_get_crud
2853490 1273 ns/op 785517 op/s 816 B/op +2220.59MB

--- BENCH: get_bench::bench_get_crud_empty
2643043 1384 ns/op 722747 op/s 840 B/op +2117.31MB

--- BENCH: get_bench::bench_get_raw
6799610 521.1 ns/op 1919176 op/s 96 B/op +622.53MB

--- BENCH: get_bench::bench_get_raw_empty
5647241 650.2 ns/op 1538060 op/s 120 B/op +646.28MB

--- BENCH: insert_bench::bench_insert_crud
1695861 2167 ns/op 461438 op/s 979 B/op +1583.78MB

--- BENCH: insert_bench::bench_insert_raw
3121376 1252 ns/op 798698 op/s 211 B/op +630.78MB

--- BENCH: multiple_bench::bench_multiple_crud
850754 5431 ns/op 184123 op/s 2600 B/op +2110.08MB

--- BENCH: replace_bench::bench_replace_crud
2129221 1725 ns/op 579560 op/s 860 B/op +1747.67MB

--- BENCH: replace_bench::bench_replace_raw
4900527 725.9 ns/op 1377672 op/s 102 B/op +478.07MB

--- BENCH: update_bench::bench_update_crud
1686617 2151 ns/op 464809 op/s 1041 B/op +1675.78MB

--- BENCH: update_bench::bench_update_raw
3320403 1132 ns/op 883052 op/s 185 B/op +588.62MB

--- BENCH: upsert_bench::bench_upsert_crud
2186906 1645 ns/op 607733 op/s 704 B/op +1468.27MB

--- BENCH: upsert_bench::bench_upsert_raw
4233550 866.5 ns/op 1154011 op/s 0 B/op +12.46KB

code for benchmarks and profile here

  • Tests
  • Changelog
  • Documentation

Closes #470

@Satbek Satbek marked this pull request as draft December 17, 2025 13:53
@Satbek Satbek marked this pull request as ready for review December 18, 2025 11:29
@Satbek Satbek force-pushed the storage_perf branch 2 times, most recently from 2f690ba to fe91f13 Compare December 18, 2025 13:28
@Satbek Satbek requested review from a1div0 and ita-sammann December 19, 2025 06:58
- remove the extra wrapper around box.space methods to avoid per-call closures and arg tables
- call wrap_func_result directly so storage paths allocate less and return handling stays centralized
- reduce storage-side overhead on replace/insert/delete/get/update/upsert(+_many) for better call latency
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.

perf: excess work in lj_BC_FNEW, lj_BC_TDUP, lj_bc_TNEW

3 participants