Hasty Briefsbeta

Ordered Insertion Optimization in OrioleDB

5 days ago
  • #B-tree
  • #database-optimization
  • #concurrency
  • OrioleDB introduces batch page insertion to optimize B-tree leaf page inserts under high concurrency.
  • Traditional exclusive page locking serializes inserts, causing delays and inefficiencies with sleep/wake cycles.
  • Batch insertion allows the lock holder to insert tuples for itself and waiting processes, reducing lock waits.
  • A lockless wait list in shared memory enables processes to publish their tuples before queuing for the lock.
  • The lock holder scans the wait list and inserts eligible tuples, improving throughput by reducing lock handovers.
  • Benchmarks show a 2X throughput boost starting at 64 clients, especially beneficial for time-ordered or skewed workloads.
  • The optimization is ideal for IoT, event logs, and time-series data with high append rates.
  • Available in OrioleDB's main branch, set for beta13 release.