MongoDB Search Metrics Separate Paging From CPU Contention
MongoDB Search metrics distinguish memory pressure from workload contention; I outline how I’d choose a tier and validate the move to dedicated search nodes.
- Topic
- Database
- Reading time
- 8 min
- Length
- 1,733 words
- Published
- Nov 22, 2026
08:09 am IST
In this article
- Separate the search process from the database process
- Read Atlas metrics as a correlated timeline
- Diagnosing an existing Atlas search deployment
- Build an evidence record before selecting a tier
- Size Search memory and CPU separately
- Plan for index construction before query cutover
- The memory example is an illustration, not a forecast
- Dedicated nodes do not make indexes instantly current
- Parallel search still needs a concurrency test
Before I buy a bigger database tier for MongoDB Search, I want to know what is actually slow. Persistent page faults can mean Search does not have enough memory; latency that rises with database activity can point to resource contention instead. MongoDB’s new Atlas metrics guidance draws that distinction explicitly. Dedicated search nodes isolate the workloads. They do not, by themselves, fix an undersized Search tier. I’d read this as a diagnostic guide, not a reason to migrate every search workload that feels slow.
What I find useful here is the way to make the decision, not a newly announced switch to turn on. I’d start with a question: which process is under pressure? Then I’d look for evidence of a memory shortage, competing workloads, or indexing work. Buying capacity before answering that question puts the architecture decision ahead of the diagnosis. I’d rather do those in the other order.
Separate the search process from the database process
MongoDB Search and MongoDB Vector Search use mongot to maintain and query search indexes. Application data lives with the database process, mongod, which also handles database operations. In a colocated deployment, those two processes share nodes. That means they compete for memory, disk I/O, and CPU, even though they have different jobs.
Dedicated search nodes put mongot on separate infrastructure. The database nodes keep handling operational reads and writes, while the search nodes take search queries and index work. Each workload then has its own resource budget and its own scaling lifecycle. That separation is useful, but I’d still want to know which resource needs attention.
I’d keep two hypotheses on the page rather than folding them into one. An index that exceeds available Search memory can cause disk reads while the database is quiet. An index that fits in memory can still suffer when database activity competes for CPU. Both can happen together. I wouldn’t force an incident into a single category just to make the diagnosis look tidier.
For an editorial search workflow, my first question would be whether slow results follow publishing activity or stay slow without it. On a newsroom CMS, that is the distinction I’d investigate before changing the application’s search experience. I want to separate those explanations before deciding what to change.
Read Atlas metrics as a correlated timeline
Search Page Fault reports average page faults per second in the Search process. I’d put it beside Search Process Memory and Search Index Size, rather than take total node disk activity as proof that Search is the problem. That distinction matters on colocated nodes: their disk I/O includes both database activity and Search activity.
For CPU pressure, I’d compare Search Normalized Process CPU with Normalized System CPU, keeping latency and database activity in view alongside them. Search Process Throttling indicates that work is arriving faster than the Search process can admit it. Useful signals, all of them. None establishes the complete cause by itself, so I wouldn’t make the call from a single graph.
- Persistent paging during quiet database periods: I’d investigate whether the memory available to Search is sufficient.
- Latency rising with database activity: I’d investigate resource contention and check whether paging is present at the same time.
Healthy database CPU and memory do not tell me that Search has enough resources. The reverse shortcut is no better: high Search CPU does not prove that moving the processes apart will solve everything. I’d compare the same workload periods across the metrics. Then I’d write down the evidence that would disprove the explanation I currently prefer, rather than only collecting evidence that supports it.
That is the same workload-first discipline I’d use when evaluating shared KV caching. Before I choose infrastructure, I want to be able to name the constrained resource. Otherwise, I’m choosing a deployment shape before I know what it needs to fix.
Diagnosing an existing Atlas search deployment
Build an evidence record before selecting a tier
I’d start a review record that covers both normal traffic and a period when latency is unacceptable. The JSON below is my own worksheet. It is not an Atlas configuration, and it is not an API payload. The null values are deliberate: they mean I have not recorded the evidence yet. I’d replace them with observations taken from the same time window, so the comparisons mean something.
{
"metrics": {
"Search Page Fault": null,
"Search Process Memory": null,
"Search Index Size": null,
"Search Normalized Process CPU": null,
"Normalized System CPU": null,
"Search Process Throttling": null,
"Search Max Replication Lag": null
},
"observations": {
"searchLatency": null,
"databaseActivity": null,
"pagingDuringQuietDatabasePeriods": null,
"latencyTracksDatabaseActivity": null
},
"decision": {
"workingHypothesis": null,
"evidenceAgainstHypothesis": null,
"nextValidation": null
}
}
The observation fields are additions of mine, not Atlas metric names. I put them there to stop a dashboard screenshot from becoming an architecture decision. I’d record query latency and database activity together, then use that record to decide what to test next: memory capacity or workload isolation. The worksheet is there to make that choice explicit.
Size Search memory and CPU separately
On colocated nodes, the RAM advertised for the tier is shared with WiredTiger, the operating system, and runtime needs. There is no fixed colocated cache allocation for mongot. So I would not take the total node RAM, label it the Search memory budget, and size the index against that number.
For dedicated search nodes, approximately 90% of RAM is available for index data; the JVM and other process needs use the rest. I’d use that as a planning estimate, not a guarantee. MongoDB Search indexes do not have to fit entirely in memory. Queries usually touch only part of an index, and frequently used pages remain in RAM. MongoDB Vector Search works best when its index fits in memory, which is a distinction I’d keep visible while sizing.
I’d allow for expected index growth, not just the index sitting there today. CPU gets a separate test, with representative query concurrency and indexing activity. Enough memory is not proof of enough CPU capacity. I wouldn’t let a comfortable memory calculation stand in for that test.
Plan for index construction before query cutover
Dedicated search nodes require an M10 or higher cluster. A Flex cluster has to be upgraded first. After deployment, Atlas builds the indexes on the search nodes before it routes queries there. Queries keep using the existing colocated indexes during that build, and index construction adds database read load. That build period belongs in the plan, not just the final query cutover.
I’d treat deployment completion and performance acceptance as separate checkpoints. My validation would start after query routing changes, accounting for warm-up and workload changes. Then I’d compare latency, page faults, and throttling under comparable traffic. An immediately quiet dashboard would not be enough for me to judge whether the move addressed the problem.
The memory example is an illustration, not a forecast
MongoDB’s example begins with an M30 deployment: 8 GB RAM per node and a 6 GB Search index. The illustrative budget leaves about 5 GB or less for mongot. During normal traffic, Search Page Fault remains active, and p95 search latency is 650 ms. Those are the starting conditions for this example, not numbers I’d assume for another workload.
The example then moves to an S40 Search tier with 16 GB RAM per node. Using the approximate 90% planning allocation leaves about 14.4 GB for index data. Once the index becomes resident, page faults fall except during warm-up or workload changes. The example’s p95 latency becomes 120 ms.
I wouldn’t present that change as the improvement another deployment should expect. The example addresses a memory-budget mismatch with more Search memory and workload isolation together. It illustrates that combination; it does not give me an acceptance target. I’d take acceptance criteria from the application’s latency target and the resource behavior I observe, rather than borrowing the example’s timings.
Dedicated nodes do not make indexes instantly current
Search Max Replication Lag measures index staleness: how far mongot is behind changes from the mongod oplog. Replica set replication lag is a different measurement. It tells me how far secondary database members trail the primary. I’d keep those two meanings separate when looking at a lag graph.
Isolation removes CPU competition between indexing and database work on the same node. The indexing work itself does not disappear. Sustained writes, and the work each change generates, can still increase staleness. Indexed field count can matter here, as can autocomplete mappings using nGram or edgeGram and embeddedDocuments mappings. Moving the process does not remove those considerations.
For an editorial tool, I’d define acceptable search freshness separately from acceptable response time. I’d make the same distinction between freshness and serving latency in a pipeline review. A response can be quick without proving that a recently edited document is already searchable. I want both questions answered, not one used as a proxy for the other.
If lag stays high, I’d inspect write volume and index mappings before buying another tier. Possible ways to reduce index size include static mappings for selected fields, alternatives to nGram autocomplete tokenization, and vector quantization. The workload may also require schema changes or sharding. I’d evaluate those options against the search requirements; a smaller index is not an unconditional win if it changes what the search needs to do.
Parallel search still needs a concurrency test
For $search, the query’s concurrent option can enable parallel segment search. For $vectorSearch, concurrent segment search is enabled by default on search nodes. The limit is available CPU, and MongoDB Search may fall back to single-threaded execution when too many concurrent queries are queued. Having parallel execution available is not the same as having capacity for every queued query to use it.
I’d test that capacity under representative concurrency, watching latency, Search Normalized Process CPU, and Search Process Throttling together. What I care about is predictable behavior during busy periods. Whether an isolated query can run in parallel is a different, narrower question, and it would not settle the capacity decision for me.
I wouldn’t make dedicated nodes the default explanation for every slow search. They are useful when they address the measured problem. If the index fits comfortably, latency targets are met, and contention is absent, I’d keep colocation. From there, the next test depends on the evidence: persistent paging sends me back to the memory budget; latency that follows database activity is where I’d test isolation.
Sources
Diagnosing MongoDB Search Performance with Atlas Metrics
This is the source this article is based on. Many articles on this blog are drafted with AI and checked against their source automatically; the editorial policy explains how, and how to report a mistake.
Frequently asked
Can a Flex cluster use dedicated search nodes?
Dedicated search nodes require an M10 or higher cluster. A Flex cluster must be upgraded before using them.
Does the entire MongoDB Search index need to fit in RAM?
Not necessarily. MongoDB Search queries usually touch part of an index, and frequently used pages remain in memory. MongoDB Vector Search works best when its index fits in memory. I’d use page faults and latency to validate the actual memory budget.
Will dedicated search nodes immediately improve latency?
Queries remain on the colocated indexes while Atlas builds indexes on the search nodes. Routing changes after that build. I’d evaluate performance after cutover and account for warm-up rather than expecting improvement as soon as nodes are deployed.
Should I migrate if database CPU looks healthy?
Healthy database CPU alone is not enough evidence. I’d compare Search memory, index size, page faults, Search CPU, throttling, and latency. Persistent paging may require more Search memory; contention may justify isolation. If latency targets are already met without contention, I’d keep colocation.
Weekly newsletter
Liked this? Get the next one by email
One short email a week with new articles on React, Node.js, TypeScript and AI engineering. No spam. Unsubscribe in one click.
Further reading
Related tutorials from ByteMuni, my developer publication.
- Node.jsWhat's New in Node.js 24.22.0 LTS: Key Changes for DevelopersNode.js 24.22.0 introduces new crypto, net, and performance features.
- SQL Databasespg_hint_plan 1.9.0: Updates and Compatibility with PostgreSQL 19Pg_hint_plan 1.9.0 with PostgreSQL 19 support and key updates.
- Tech TipsGoogle Search Console Guide for Students: Setup, Reports, AI Search Data and Practice Projects (2026)Google Search Console is free, official and one of the most useful tools a student can learn. This guide covers setup, every report that matters, the newest 2025–2026 features like AI Mode data and annotations, and five practice projects for your portfolio.