What Should I Do If the CPU Usage of My Instance Is High?
If the CPU usage is high or close to 100% when you use GaussDB(for MySQL), data read/write processing slows down, connections cannot be established, and errors are reported, interrupting services.
Solution
- Check slow SQL logs for slow queries and examine their performance characteristics (if any) to locate the cause.
For details on viewing MySQL logs, see Viewing Slow Query Logs.
- View the CPU usage of your GaussDB(for MySQL) instance to facilitate problem locating.
- Create read replicas to offload read pressure from the primary node.
- Add indexes for associated fields in multi-table association queries.
- Do not use the SELECT statement to scan all tables. You can specify fields or add the WHERE condition.
Database Performance FAQs
- What Should I Do If the CPU Usage of My Instance Is High?
- How Do I Handle Slow SQL Statements Caused by Inappropriate Composite Index Settings?
- How Do I Handle a Large Number of Temporary Tables Being Generated for Long Transactions and High Memory Usage?
- What Should I Do If Locks on Long Transactions Block the Execution of Subsequent Transactions?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more