Building N1QL Causes CPU to be peg at 100% on all Data nodes

We have a bucket with 20M docs, and 2 N1QL nodes. We are building are 1st index and it pegging all the data nodes CPU at 100%.

We are testing on a test cluster, and the concern this will cause slowness or connection issues to CB Cluster.

@dipen_patel,

When you build the index it has to knows whats data it has. So it needs to get all the keys from the Data service to build the index. Good News is that the Indexer and Data service can deliver data and build Indexes quickly.
Bad News it takes resources to do so i.e. CPU , network bandwidth and extra memory(not allocated to the bucket) .

So I think your question is "If I deploy this in production will it effect(Make them slower) the K/V operations ?"
The answer is it depends :-/

So in your lower environments you can see and test the key response times during the time your building the index.
You can do that via internal Couchbase tool called CBSTATS. https://developer.couchbase.com/documentation/server/current/cli/cbstats/cbstats-timing.html
You’ll want to look at the (get_cmd = Servicing get requests)

You can reset the cbstat via using the reset command. https://developer.couchbase.com/documentation/server/5.0/cli/cbstats/cbstats-reset.html