The viability of implementing an in-memory database, Erlang ETS, using a relatively-new data structure, called a Judy array, was studied by comparing the performance of ETS tables based on four data structures: AVL balanced binary trees, B-trees, resizable linear hash tables, and Judy arrays. The benchmarks used workloads of sequentially- and randomly-ordered keys at table populations from 700 keys to 54 million keys.Benchmark results show that ETS table insertion, lookup, and update operations on Judy-based tables are significantly faster than all other table types for tables that exceed CPU data cache size (70,000 keys or more). The relative speed of Judy-based tables improves as table populations grow to 54 million keys and memory usage approaches 3GB. Term deletion and table traversal operations by Judy-based tables are slower than the linear hash table-based type, but the additional cost of the deletion operation is smaller than the combined savings of the other operations.Resizing a hash table to 232 buckets, managed by a Judy array, creates the most consistent performance improvements and uses only about 6% more memory than a regular hash table. Other applications could benefit substantially by this application of Judy arrays.
[1]
Mikael Pettersson,et al.
A high performance Erlang system
,
2000,
PPDP '00.
[2]
Konstantinos Sagonas,et al.
Heap architectures for concurrent languages using message passing
,
2002,
MSP/ISMM.
[3]
Sven-Olof Nyström,et al.
Evaluation of HiPE, an Erlang Native Code Compiler
,
1999
.
[4]
Håkan Mattsson,et al.
Mnesia - A Distributed Robust DBMS for Telecommunications Applications
,
1999,
PADL.
[5]
Fiffi Hellstrand,et al.
AXD 301: A new generation ATM switching system
,
1999,
Comput. Networks.
[6]
Joe Armstrong,et al.
Concurrent programming in ERLANG
,
1993
.
[7]
Chris DiBona,et al.
Open Sources: Voices from the Open Source Revolution
,
1999
.