Company
Date Published
Author
Murtadha Al Hubail, Principal Software Engineer, Couchbase
Word count
1206
Language
English
Hacker News points
None

Summary

The Couchbase Analytics service employs a massively parallel processing (MPP) engine to process ad-hoc analytical queries, which often require more data than can fit in memory. The analytics query admission controller makes decisions on whether to execute a new query immediately, queue it, or reject it based on available resources and the resources required by the query. The controller considers two main factors: total memory available for query processing and total query workers. These are calculated as 50% of the memory allocated for the Analytics service and the number of cores reported by the operating system multiplied by a configurable parameter called coresMultiplier. The admission controller determines whether to admit, queue, or reject queries based on these calculations and the nature of the workload. Examples illustrate how different values of coresMultiplier affect concurrency and throughput, highlighting the need for careful tuning when adjusting this parameter.