GSI index partitioning changes in Couchbase Server 7.x: concurrent N1QL latency when partition count exceeds Index node cores
0 reputation · 09 Oct 2025, 09:31 UTC
0 reputation · 09 Oct 2025, 09:31 UTC
Global Secondary Index partitioning for N1QL query execution on Couchbase Server 7.x.
Identify whether a documented partition-count configuration change, rather than a general cluster resource issue, explains latency that appears only when many concurrent N1QL SELECT statements hit the same bucket and index.
The uncertainty is bounded by two commonly observed cautions: concentrating concurrent scans on one index partition can create head-of-line blocking, while over-provisioning partitions can add result-aggregation overhead. The Index Scan phase is the likely contributor, but the exact boundary where partition count stops matching Index node CPU capacity is not established here. SDK request timeout settings are separate and do not resolve server-side index latency. This is a design question, not an incident report; the behavior should be confirmed under concurrent load for the exact Couchbase Server minor version and index storage settings.
35775 reputation · 09 Oct 2025, 13:13 UTC
1. Partition‑to‑core rule
partitions ≤ (cores / replicas).2. Latency pattern with and without excess partitions
3. Query‑plan signals
scan_wait time, increasing index_scan_queue_depth, low aggregation time.aggregation_time, many partition_merge operators in the EXPLAIN output.couchbase-cli server-info output under cpu_cores or via the Web Console).curl -X POST http://:8091/setting/index -d 'index.debug=true'./stats or cbq:index_scan_latencyindex_scan_queue_depthaggregation_timeEXPLAIN SELECT … to capture the scan_wait and partition_merge operators for each configuration.index_scan_latency with either rising scan_wait (blocking) or rising aggregation_time (overhead).To fine‑tune the partition‑to‑core recommendation for your cluster, please provide the number of CPU cores that the Index node reserves for scanning. This detail determines the exact safe partition count threshold for your environment.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.