Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Tutorials
    • All tutorials
    • Unassisted deployment of the Apache Kafka® web interface
    • Upgrading a Managed Service for Apache Kafka® cluster to migrate from ZooKeeper to KRaft
    • Migrating a database from a third-party Apache Kafka® cluster to Managed Service for Apache Kafka®
    • Moving data between Managed Service for Apache Kafka® clusters using Data Transfer
    • Delivering data from Managed Service for MySQL® to Managed Service for Apache Kafka® using Data Transfer
    • Delivering data from Managed Service for MySQL® to Managed Service for Apache Kafka® using Debezium
    • Delivering data from Managed Service for PostgreSQL to Managed Service for Apache Kafka® using Data Transfer
    • Delivering data from Managed Service for PostgreSQL to Managed Service for Apache Kafka® using Debezium
    • Delivering data from Managed Service for YDB to Managed Service for Apache Kafka® using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Managed Service for ClickHouse® using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Yandex MPP Analytics for PostgreSQL using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Yandex StoreDoc using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Managed Service for MySQL® using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Managed Service for OpenSearch using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Managed Service for PostgreSQL using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Managed Service for YDB using Data Transfer
    • Delivering data from Managed Service for Apache Kafka® to Data Streams using Data Transfer
    • Delivering data from Data Streams to Managed Service for YDB using Data Transfer
    • Delivering data from Data Streams to Managed Service for Apache Kafka® using Data Transfer
    • YDB change data capture and delivery to YDS
    • Configuring Kafka Connect to work with a Managed Service for Apache Kafka® cluster
    • Synchronizing Apache Kafka® topics in Object Storage with no web access
    • Monitoring message loss in an Apache Kafka® topic
    • Automating Query tasks with Managed Service for Apache Airflow™
    • Sending requests to the Yandex Cloud API via the Yandex Cloud Python SDK
    • Configuring an SMTP server to send e-mail notifications
    • Adding data to a ClickHouse® DB
    • Migrating data to Managed Service for ClickHouse® using ClickHouse® tools
    • Migrating data to Managed Service for ClickHouse® using Data Transfer
    • Delivering data from Managed Service for MySQL® to Managed Service for ClickHouse® using Data Transfer
    • Asynchronously replicating data from PostgreSQL to ClickHouse®
    • Exchanging data between Managed Service for ClickHouse® and Yandex Data Processing
    • Configuring Managed Service for ClickHouse® for Graphite
    • Fetching data from Managed Service for Apache Kafka® to Managed Service for ClickHouse®
    • Fetching data from Managed Service for Apache Kafka® to ksqlDB
    • Fetching data from RabbitMQ to Managed Service for ClickHouse®
    • Saving a data stream from Data Streams to Managed Service for ClickHouse®
    • Asynchronous replication of data from Yandex Metrica to ClickHouse® using Data Transfer
    • Using hybrid storage in Managed Service for ClickHouse®
    • Sharding Managed Service for ClickHouse® tables
    • Loading data from Yandex Direct to a Managed Service for ClickHouse® data mart using Cloud Functions, Object Storage, and Data Transfer
    • Loading data from Object Storage to Managed Service for ClickHouse® using Data Transfer
    • Migrating data with change of storage from Managed Service for OpenSearch to Managed Service for ClickHouse® using Data Transfer
    • Loading data from Managed Service for YDB to Managed Service for ClickHouse® using Data Transfer
    • Yandex Managed Service for ClickHouse® integration with Microsoft SQL Server via ClickHouse® JDBC Bridge
    • Migrating databases from Google BigQuery to Managed Service for ClickHouse®
    • Yandex Managed Service for ClickHouse® integration with Oracle via ClickHouse® JDBC Bridge
    • Configuring Cloud DNS to access a Managed Service for ClickHouse® cluster from other cloud networks
    • Migrating a Yandex Data Processing HDFS cluster to a different availability zone
    • Importing data from Managed Service for MySQL® to Yandex Data Processing using Sqoop
    • Importing data from Managed Service for PostgreSQL to Yandex Data Processing using Sqoop
    • Mounting Object Storage buckets to the file system of Yandex Data Processing hosts
    • Working with Apache Kafka® topics using Yandex Data Processing
    • Automating operations with Yandex Data Processing using Managed Service for Apache Airflow™
    • Shared use of Yandex Data Processing tables through Apache Hive™ Metastore
    • Transferring metadata across Yandex Data Processing clusters using Apache Hive™ Metastore
    • Importing data from Object Storage, processing it, and exporting it to Managed Service for ClickHouse®
    • Migrating collections from a third-party MongoDB cluster to Yandex StoreDoc
    • Migrating data to Yandex StoreDoc
    • Migrating Yandex StoreDoc cluster from 4.4 to 6.0
    • Sharding Yandex StoreDoc collections
    • Yandex StoreDoc performance analysis and tuning
    • Managed Service for MySQL® performance analysis and tuning
    • Syncing data from a third-party MySQL® cluster to Managed Service for MySQL® using Data Transfer
    • Migrating a database from Managed Service for MySQL® to a third-party MySQL® cluster
    • Migrating a database from Managed Service for MySQL® to Object Storage using Data Transfer
    • Migrating data from Object Storage to Managed Service for MySQL® using Data Transfer
    • Delivering data from Managed Service for MySQL® to Managed Service for Apache Kafka® using Data Transfer
    • Delivering data from Managed Service for MySQL® to Managed Service for Apache Kafka® using Debezium
    • Migrating a database from Managed Service for MySQL® to Managed Service for YDB using Data Transfer
    • MySQL® change data capture and delivery to YDS
    • Migrating data from Managed Service for MySQL® to Managed Service for PostgreSQL using Data Transfer
    • Migrating data from AWS RDS for PostgreSQL to Managed Service for PostgreSQL using Data Transfer
    • Migrating data from Managed Service for MySQL® to Yandex MPP Analytics for PostgreSQL using Data Transfer
    • Configuring an index policy in Managed Service for OpenSearch
    • Migrating data from a third-party OpenSearch cluster to Managed Service for OpenSearch using Data Transfer
    • Loading data from Managed Service for OpenSearch to Object Storage using Data Transfer
    • Migrating data from Managed Service for OpenSearch to Managed Service for YDB using Data Transfer
    • Copying data from Managed Service for OpenSearch to Yandex MPP Analytics for PostgreSQL using Yandex Data Transfer
    • Migrating data from Managed Service for PostgreSQL to Managed Service for OpenSearch using Data Transfer
    • Authenticating a Managed Service for OpenSearch cluster in OpenSearch Dashboards using Keycloak
    • Using the yandex-lemmer plugin in Managed Service for OpenSearch
    • Creating a PostgreSQL cluster for 1C:Enterprise
    • Searching for the Managed Service for PostgreSQL cluster performance issues
    • Managed Service for PostgreSQL performance analysis and tuning
    • Logical replication in PostgreSQL
    • Migrating a database from a third-party PostgreSQL cluster to Managed Service for PostgreSQL
    • Migrating a database from Managed Service for PostgreSQL
    • Delivering data from Managed Service for PostgreSQL to Managed Service for Apache Kafka® using Data Transfer
    • Delivering data from Managed Service for PostgreSQL to Managed Service for Apache Kafka® using Debezium
    • Delivering data from Managed Service for PostgreSQL to Managed Service for YDB using Data Transfer
    • Migrating a database from Managed Service for PostgreSQL to Object Storage
    • Migrating data from Object Storage to Managed Service for PostgreSQL using Data Transfer
    • PostgreSQL change data capture and delivery to YDS
    • Migrating data from Managed Service for PostgreSQL to Managed Service for MySQL® using Data Transfer
    • Migrating data from Managed Service for PostgreSQL to Managed Service for OpenSearch using Data Transfer
    • Fixing string sorting issues in PostgreSQL after upgrading glibc
    • Migrating a database from Greenplum® to ClickHouse®
    • Migrating a database from Greenplum® to PostgreSQL
    • Exporting Greenplum® data to a cold storage in Object Storage
    • Loading data from Object Storage to Yandex MPP Analytics for PostgreSQL using Data Transfer
    • Copying data from Managed Service for OpenSearch to Yandex MPP Analytics for PostgreSQL using Yandex Data Transfer
    • Creating an external table from an Object Storage bucket table using a configuration file
    • Getting data from external sources using named queries in Greenplum®
    • Migrating a database from a third-party Valkey™ cluster to Yandex Managed Service for Valkey™
    • Using a Yandex Managed Service for Valkey™ cluster as a PHP session storage
    • Loading data from Object Storage to Managed Service for YDB using Data Transfer
    • Loading data from Managed Service for YDB to Object Storage using Data Transfer
    • Processing Audit Trails events
    • Processing Cloud Logging logs
    • Processing Debezium CDC streams
    • Analyzing data with Jupyter
    • Processing files with usage details in Yandex Cloud Billing
    • Ingesting data into storage systems
    • Smart log processing
    • Data transfer in microservice architectures
    • Migrating data to Object Storage using Data Transfer
    • Migrating data from a third-party Greenplum® or PostgreSQL cluster to Yandex MPP Analytics for PostgreSQL using Data Transfer
    • Migrating Yandex StoreDoc clusters
    • Migrating MySQL® clusters
    • Migrating to a third-party MySQL® cluster
    • Migrating PostgreSQL clusters
    • Creating a schema registry to deliver data in Debezium CDC format from Apache Kafka®
    • Automating operations using Yandex Managed Service for Apache Airflow™
    • Working with an Object Storage table from a PySpark job
    • Integrating Yandex Managed Service for Apache Spark™ with Apache Hive™ Metastore
    • Running a PySpark job using Yandex Managed Service for Apache Airflow™
    • Using Yandex Object Storage in Yandex Managed Service for Apache Spark™

In this article:

  • Getting started
  • Diagnosing resource shortages
  • Troubleshooting resource shortage issues
  • Diagnosing inefficient query execution
  • Troubleshooting issues with inefficient queries
  • Diagnosing locks
  • Troubleshooting locking issues
  • Diagnosing insufficient disk space
  • Troubleshooting disk space issues
  1. Building a data platform
  2. Yandex StoreDoc performance analysis and tuning

Performance analysis and tuning of Yandex StoreDoc

Written by
Yandex Cloud
Updated at October 30, 2025
  • Getting started
  • Diagnosing resource shortages
  • Troubleshooting resource shortage issues
  • Diagnosing inefficient query execution
  • Troubleshooting issues with inefficient queries
  • Diagnosing locks
  • Troubleshooting locking issues
  • Diagnosing insufficient disk space
  • Troubleshooting disk space issues

In this tutorial, you will learn how to:

  • Use performance diagnostic tools and monitoring tools.
  • Troubleshoot identified issues.

Yandex StoreDoc cluster performance drops most often due to one of the following:

  • High CPU and disk I/O utilization.
  • Inefficient query execution in MongoDB.
  • Locks.
  • Insufficient disk space.

Here are some tips for diagnosing and fixing these issues.

Getting startedGetting started

  1. Install the mongostat and mongotop utilities on an external host with network access to your MongoDB host (see Pre-configuring a connection to a Yandex StoreDoc cluster) to receive MongoDB performance data.
  2. Determine which databases need to be checked for issues.
  3. Create a MongoDB user with the mdbMonitor role for these databases. You need to do this in order to use mongostat and mongotop.

Diagnosing resource shortagesDiagnosing resource shortages

If any of the CPU and disk I/O resources "hits a plateau", i.e., the graph that had been steadily ascending levels off, it is probably because the resource is in short supply, resulting in reduced performance. This usually happens when the resource usage reaches its limit.

In most cases, high CPU utilization and high Disk IO are due to suboptimal indexes or a large load on the hosts.

Start diagnostics by identifying the load pattern and problematic collections. Use the built-in MongoDB monitoring tools. Next, analyze the performance of specific queries using logs or profiler data.

Pay attention to queries:

  • Not using indexes (planSummary: COLLSCAN). Such queries may affect both I/O consumption (more reads from the disk) and CPU consumption (data is compressed by default and decompression is required for it). If the required index is present, but the database does not use it, you can force its usage with hint.
  • With large docsExamined values (number of scanned documents). This may mean that the currently running indexes are inefficient or additional ones are required.

As soon as performance drops, you can diagnose the problem in real time using a list of currently running queries:

Queries from all users
Queries from the current user

To run these queries, users needs the mdbMonitor role.

  • Long queries, such as those taking more than one second to execute:

    db.currentOp({"active": true, "secs_running": {"$gt": 1}})
    
  • Queries to create indexes:

    db.currentOp({ $or: [{ op: "command", "query.createIndexes": { $exists: true } }, { op: "none", ns: /\.system\.indexes\b/ }] })
    
  • Long queries, such as those taking more than one second to execute:

    db.currentOp({"$ownOps": true, "active": true, "secs_running": {"$gt": 1}})
    
  • Queries to create indexes:

    db.currentOp({ "$ownOps": true, $or: [{ op: "command", "query.createIndexes": { $exists: true } }, { op: "none", ns: /\.system\.indexes\b/ }] })
    

Troubleshooting resource shortage issuesTroubleshooting resource shortage issues

Try optimizing the identified queries. If the load is still high or there is nothing to optimize, the only option is to upgrade the host class.

Diagnosing inefficient query executionDiagnosing inefficient query execution

To identify problematic queries in MongoDB:

  • Review the logs. Pay special attention to:

    • For read queries, the responseLength field (written as reslen in the logs).
    • For write queries, the number of affected documents.
      In the cluster logs, they are displayed in the nModified, keysInserted, and keysDeleted fields. On the cluster monitoring page, analyze the Documents affected on primary, Documents affected on secondaries, and Documents affected per host graphs.
  • Review the profiler data. Output long-running queries (adjustable with the slowOpThreshold DBMS setting).

Troubleshooting issues with inefficient queriesTroubleshooting issues with inefficient queries

Each individual query can be analyzed in terms of the query plan.

Analyze the graphs on the cluster monitoring page:

  • Index size on primary, top 5 indexes.
  • Scan and order per host.
  • Scanned / returned.

To narrow down the search scope quicker, use indexes.

Warning

Each new index slows down writes. Too many indexes may negatively affect write performance.

To optimize read requests, use a projection. In many cases, you need to return only a few fields rather than the entire document.

If you can neither optimize the queries you found nor go without them, upgrade the host class.

Diagnosing locksDiagnosing locks

Poor query performance can be caused by locks.

MongoDB does not provide detailed information on locks. There are only indirect ways to find out what is locking a specific query:

  • Pay attention to large or growing db.serverStatus().metrics.operation.writeConflicts values: they may indicate high write contention on some documents.

  • Examine large or growing values using the Write conflicts per hosts graph on the cluster monitoring page.

  • As soon as performance drops, carefully review the list of currently running queries:

    Queries from all users
    Queries from the current user

    To run these queries, the user needs the mdbMonitor role.

    • Find queries that hold exclusive locks, such as:

      db.currentOp({'$or': [{'locks.Global': 'W'}, {'locks.Database': 'W'}, {'locks.Collection': 'W'} ]}).inprog
      
    • Find queries waiting for locks (the timeAcquiringMicros field shows the waiting time):

      db.currentOp({'waitingForLock': true}).inprog
      db.currentOp({'waitingForLock': true, 'secs_running' : { '$gt' : 1 }}).inprog
      
    • Find queries that hold exclusive locks, such as:

      db.currentOp({"$ownOps": true, '$or': [{'locks.Global': 'W'}, {'locks.Database': 'W'}, {'locks.Collection': 'W'} ]}).inprog
      
    • Find queries waiting for locks (the timeAcquiringMicros field shows the waiting time):

      db.currentOp({"$ownOps": true, 'waitingForLock': true}).inprog
      db.currentOp({"$ownOps": true, 'waitingForLock': true, 'secs_running' : { '$gt' : 1 }}).inprog
      
  • Pay attention to the following in the logs and profiler:

    • Queries that had waited a long time to get locks will have large timeAcquiringMicros values.
    • Queries that had competed for the same documents will have large writeConflicts values.

Troubleshooting locking issuesTroubleshooting locking issues

Detected locks indicate unoptimized queries. Try optimizing problematic queries.

Diagnosing insufficient disk spaceDiagnosing insufficient disk space

If a cluster shows poor performance combined with a small amount of free disk space, one or more hosts in the cluster may have switched to the "read-only" mode.

The amount of used disk space is displayed on the Disk space usage per host, top 5 hosts graphs on the cluster monitoring page.

To monitor cluster host storage utilization, configure an alert.

Troubleshooting disk space issuesTroubleshooting disk space issues

For recommendations on troubleshooting these issues, see Maintaining a cluster in operable condition.

Was the article helpful?

Previous
Sharding Yandex StoreDoc collections
Next
Overview
© 2025 Direct Cursus Technology L.L.C.