Magento & RDS Aurora - High CPU Usage issue

Published 11 Dec 2016

After fixing the split & write issue with split database in previous post on RDS Aurora with Magento, I’ve been monitoring the performance closely on CloudWatch. A new issue then has arised as the graph shows below.


The Not-So-Fun Facts


The Struggles


The Epiphany

$ php shell/log.php status

-----------------------------------+------------+------------+------------+
Table Name                         | Rows       | Data Size  | Index Size |
-----------------------------------+------------+------------+------------+
log_customer                       | 144.58K    | 8.93Mb     | 5.55Mb     |
log_visitor                        | 221.69K    | 36.75Mb    | 0 b        |
log_visitor_info                   | 209.23K    | 119.62Mb   | 0 b        |
log_url                            | 13.18M     | 997.13Mb   | 817.89Mb   |
log_url_info                       | 57.50M     | 10.61Gb    | 0 b        |
log_quote                          | 33.10K     | 3.69Mb     | 0 b        |
report_viewed_product_index        | 18.90M     | 928.97Mb   | 2.71Gb     |
report_compared_product_index      | 12         | 16.38Kb    | 81.92Kb    |
report_event                       | 21.90M     | 1.08Gb     | 2.36Gb     |
catalog_compare_item               | 11         | 16.38Kb    | 81.92Kb    |
-----------------------------------+------------+------------+------------+
Total                              | 112.09M    | 13.79Gb    | 5.90Gb     |
-----------------------------------+------------+------------+------------+


The Solutions


* I could be mistaken the real underlying issue here since amittedly deep MySQL knowledge is not my strong suit so please let me know via email if I misread and wrongly analysed the situation.