tencent cloud

TencentDB for MongoDB

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Strengths
Use Cases
Cluster Architecture
Product Specifications
Features
Regions and AZs
Terms
Service Regions and Service Providers
Purchase Guide
Billing Overview
MongoDB Pricing
Billing Formula
Payment Overdue
Backup Space Billing
Configuration Adjustment Billing
Getting Started
Quickly Creating an Instance
Connecting to a TencentDB for MongoDB Instance
Reading/Writing Database
Operation Guide
Access Management
Instance Management
Node Management
Version Upgrade
Network Configuration
Monitoring
Backup and Rollback
Database Audit
Data Security
SSL Authentication
Log Management
Database Management
Multi-AZ Deployment
Disaster Recovery/Read-Only Instances
Parameter Configuration
Recycle Bin
Task Management
Performance Optimization
Data Migration Guide
Practical Tutorial
Optimizing Indexes to Break Through Read/Write Performance Bottlenecks
Troubleshooting Mongos Load Imbalance in Sharded Cluster
Considerations for Using Shard Clusters
Sample of Reading and Writing Data in MongoDB Instance
Methods for Importing and Exporting Data Based on CVM Connected with MongoDB
What to Do for Errors of Repeated Instance Creation and Deletion of Databases with the Same Names?
Troubleshooting MongoDB Connection Failures
Shard Removal Task: Guide for Confirming the Progress and Troubleshooting Issues
Performance Fine-Tuning
Ops and Development Guide
Development Specifications
Command Support in Sharded Cluster v3.2
Command Support in v3.6
Development Ops
Troubleshooting
Increased Slow Queries
Number of Connections Exceeding Limit
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Backup APIs
Account APIs
Other APIs
Task APIs
Introduction
Data Types
Error Codes
Instance Connection
Shell Connection Sample
PHP Connection Sample
Node.js Connection Sample
Java Connection Sample
Python Connection Sample
Python Read/Write Sample
Go Connection Sample
PHP Reconnection Sample
Product Performance
Test Environment
Test Method
Test Result
FAQs
Cost
Features
Sharded Cluster
Instance
Rollback and Backup
Connection
Data Migration
Others
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

Adjusting Oplog Capacity

PDF
Focus Mode
Font Size
Last updated: 2024-10-10 16:58:18

Overview

Oplog is an important component in MongoDB used to log the operations in the database. The oplog capacity should be at least 10% of the node capacity, as the oplog records all database operations, including insertions, updates, and deletions. If the oplog capacity is too small, the oplog may be overwritten, affecting the rollback feature of MongoDB. When you purchase an instance, the oplog capacity is 10% of the instance capacity by default and can be expanded to 90% of the instance capacity as needed; however, it cannot be shrunk currently.

Prerequisites

You have created a TencentDB for MongoDB instance. For more information, see Creating TencentDB for MongoDB Instance.
If your instance is pay-as-you-go, make sure that your Tencent Cloud account balance is sufficient.
The instance and its associated instances are in Running status and are not executing any tasks.

Directions

2. In the MongoDB drop-down list on the left sidebar, select Replica Set Instance or Shard Instance. The directions for the two types of instances are similar.
3. Above the Instance List on the right, select the region.
4. In the instance list, find the target instance.
5. In the Oplog Info column, click View/Adjust.



6. In the Adjust Oplog pop-up window, confirm the instance information and evaluate the target oplog capacity based on the current capacity.
Note:
The Oplog capacity should be at least 10% of the node capacity. When the size of the Oplog file reaches its maximum capacity, MongoDB starts overwriting previous operation records from the beginning of the file. If the Oplog is too small, it can lead to rapid data overwrite, posing Ops risks.

Interface Parameters
Description
Oplog retention duration
The time it takes for the Oplog storage to be filled. If the Oplog is not full, the retention duration is an estimate.
Current total capacity
The storage capacity of the Oplog for each Mongod node.
Capacity After Scale-out
Use the slider to set the Oplog capacity after scale-out.
7. Click OK, and then in the left sidebar, choose Task Management. Wait for the task to complete the scale-out.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback