Hello, I am using AWS RDS for MySQL (8.0.42).
For performance testing related to an event, I applied a spike load to the database. The load was approximately 7 to 8 times the current vCPU capacity, with a sudden influx of concurrent users. During this time, I noticed an unusually high ratio of statistics in the database load on Performance Insights, which does not occur under normal conditions. Could you please provide advice on the possible causes of this issue and any recommendations for improvement?
Let me know if you need help refining the phrasing or adding more technical details!
@wanskim High statistics resemble the database waiting on estimating the query execution plan and the best path for the optimiser. As you said, you intentionally increased the load so they could affect/saturate the overall resources (CPU, Disk/IO, etc), which might correlate with the stuck queries. I see the spike in the “execution“ phase as well.
High concurrency will definitely lead to locking problems, and the queries/threads have to wait for the lock to be granted/acquire.
If you are running with normal threads, do you still see such a spike or not ?
You can check the “SHOW ENGINE INNODB STATUS\G“ or PS (performance_schema) & IS (information_schema) tables:- Troubleshoot blocked MySQL queries on Amazon RDS DB instances | AWS re:Post to find any such blocking/waiting queries. Further, Slow query logs also help in checking the unoptimized queries, which could affect the other workload.