Skip to content

perf: speed up xqueue.upgrade() for large spaces#22

Merged
ochaton merged 2 commits intomasterfrom
speedup-stats-load
Aug 11, 2024
Merged

perf: speed up xqueue.upgrade() for large spaces#22
ochaton merged 2 commits intomasterfrom
speedup-stats-load

Conversation

@ochaton
Copy link
Member

@ochaton ochaton commented Aug 3, 2024

Benchmark results

Tarantool version: Tarantool 3.1.0-0-g96f6d88
Tarantool build: Darwin-arm64-RelWithDebInfo (static)
Tarantool build flags:  -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common  -fmacro-prefix-map=/var/folders/8x/1m5v3n6d4mn62g9w_65vvt_r0000gn/T/tarantool_install934702387=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2 
CPU: Apple M1 @ 8
JIT: Enabled
JIT: fold cse dce fwd dse narrow loop abc sink fuse
Duration: 3s

--- BENCH: 002_initial_stat_bench::bench_count
 3000000                24.54 ns/op       40744815 op/s        0 B/op   +9.90KB

--- BENCH: 002_initial_stat_bench::bench_iterate_all
 3000000               449.8 ns/op         2223177 op/s      117 B/op   +337.54MB
Tarantool version: Tarantool 3.1.0-0-g96f6d88
Tarantool build: Darwin-arm64-RelWithDebInfo (static)
Tarantool build flags:  -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common  -fmacro-prefix-map=/var/folders/8x/1m5v3n6d4mn62g9w_65vvt_r0000gn/T/tarantool_install934702387=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2 
CPU: Apple M1 @ 8
JIT: Enabled
JIT: fold cse dce fwd dse narrow loop abc sink fuse
Duration: 3s

--- BENCH: 002_initial_stat_bench::bench_count
 4000000                24.82 ns/op       40296177 op/s        0 B/op   +9.70KB

--- BENCH: 002_initial_stat_bench::bench_iterate_all
 4000000               453.5 ns/op         2205092 op/s      117 B/op   +447.70MB

With replacing :pairs({}, {iterator=box.index.ALL}) to several calls of :count() we speedup initial space.upgrade() for approximately 20x times.

@ochaton ochaton force-pushed the speedup-stats-load branch 2 times, most recently from 067cd33 to 54456b2 Compare August 7, 2024 11:23
@ochaton ochaton force-pushed the speedup-stats-load branch from 54456b2 to 77d5121 Compare August 7, 2024 12:08
@ochaton ochaton merged commit bb6d935 into master Aug 11, 2024
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.

1 participant