- Newest
- Most votes
- Most comments
High IO costs in Amazon DocumentDB can be caused by several factors, and it's important to investigate the root cause to optimize your database performance and reduce costs. Here are some steps you can take to troubleshoot and potentially resolve the issue:
-
Analyze database load: Use the Performance Insights dashboard to review the Database load chart. Look for incidents where the database load exceeds the Max CPU line. This can help identify if there are performance bottlenecks causing excessive IO operations.
-
Examine wait states: In the Performance Insights dashboard, identify which wait states are primarily responsible for the load. IO-related wait states might indicate issues with disk reads or writes.
-
Investigate top queries: Use the Top queries tab in Performance Insights to see which queries are contributing most to the load. Look at the Load by Wait (AAS) column to identify digest queries causing high IO.
-
Check for sequential scans: Your application might be performing operations that result in sequential scans of large tables. This can cause high IO if data isn't efficiently cached in memory. Look for tables with high seq_scan values by querying pg_stat_user_tables.
-
Analyze cache performance: Examine cache hit and miss statistics, including collection-level and index-level cache statistics. Poor cache performance can lead to increased IO as data needs to be read from disk more frequently.
-
Review indexing: Analyze index usage and identify any missing or unused indexes. Proper indexing can significantly reduce IO by allowing the database to quickly locate data without scanning entire collections.
-
Monitor connections: Check if there are connection spikes that might be causing increased IO. You can use Amazon CloudWatch to monitor the DatabaseConnections metric.
-
Examine data ingestion patterns: If you're ingesting large amounts of data, this could be contributing to high IO. Consider optimizing your data ingestion process or scheduling it during off-peak hours.
-
Review instance size: If the high IO is due to your workload exceeding the capacity of your current instance, consider scaling up to a larger instance type with more CPU and memory resources.
-
Distribute read traffic: If your primary instance has high CPU utilization but replicas don't, consider distributing read traffic across replicas using client read preference settings (e.g., secondaryPreferred).
-
Add more replicas: If all cluster instances have high CPU utilization and you're already using replicas for reads, adding more replicas can increase resources available for read traffic.
To get more detailed information about your specific situation, you may need to dive deeper into query analysis and performance monitoring tools provided by Amazon DocumentDB. If you're new to this kind of troubleshooting, it might be helpful to consult with an experienced database administrator or reach out to AWS support for more tailored guidance.
Sources
Performance Insights concepts - Amazon DocumentDB
IO:DataFileRead - Amazon Relational Database Service
Performance and resource utilization - Amazon DocumentDB
Analyzing database load by wait states - Amazon DocumentDB
Hello
Sorry to see the trouble here.
If you have further specifics you'd like explained regarding your bill, I'd suggest opening a case with our Billing team. They would be happy to look into it with you. You can do so, here in our Support Center.
- Ann D.
Tip. When using cost explorer you can hide charges: select exclude credits.
This will help you much more looking into costs.
Relevant content
- asked 3 years ago
- asked 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago