aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/export.c
diff options
context:
space:
mode:
authorKjell Winblad <[email protected]>2019-04-30 14:41:16 +0200
committerKjell Winblad <[email protected]>2019-06-18 15:44:53 +0200
commitf707dc058dc0aa880d6f2604acb7b420b082a69c (patch)
tree6a791414fbb6375443f7e9a49c3a150ee3b583b6 /erts/emulator/beam/export.c
parent6618ce7b6a621e92db72ea4f01f7d38553c8818c (diff)
downloadotp-f707dc058dc0aa880d6f2604acb7b420b082a69c.tar.gz
otp-f707dc058dc0aa880d6f2604acb7b420b082a69c.tar.bz2
otp-f707dc058dc0aa880d6f2604acb7b420b082a69c.zip
ETS ordered_set: Improvements to the CA tree implementation
This commit only affects the implementation of ETS `ordered_set` tables with the `write_concurrency` option enabled. Such tables are implemented with a data structure that is called the contention adapting search tree (CA tree). This commit introduces the following changes: * This commit causes a join to be triggered in one randomly selected base node in about one of 1000 read unlock calls for base node locks. No such joins happened before this commit. Before this commit, operations that only acquired looks in read-mode never triggered any contention adaptation. Therefore, the CA tree could get stuck in a sub-optimal state in certain scenarios. This could happen, for example, when a CA tree is first populated with parallel inserts (which will cause splits of base nodes) and then only read-only operations are applied to the data structure. Benchmark results from the `ets_SUITE:lookup_catree_par_vs_seq_init_benchmark/0` benchmark function (which is included in this commit) shows that this change can improve the throughput of the CA tree in the scenario described above. * Read-only operations will now also increase values of statistics counters when they detect that they need to wait for other operations. Only write operation changed statistics counters before this commit. This improves the statistics that the adaptation heuristics is based on. * Additionally, this commit adds an upper and lower limit to the contention statistics variables in the base nodes. Such limits did not exist before this commit. This should, for example, make the CA tree more responsive to contention after long periods of low contention.
Diffstat (limited to 'erts/emulator/beam/export.c')
0 files changed, 0 insertions, 0 deletions