The value of monitoring what really matters.

How our customer Upbeat Games reduced drastically its infrastructure usage and costs in a day.

“It’s not the lack of hardware”.

That’s the first statement of the Bad Sql Code Axiom (by Joe Celko) that we use as an inspiration for our team and customers and I would like to share an interesting and real example that happened to Upbeat Games in order to exemplify it.

By knowing which (bad) commands were consuming most of its database resources, the company could optimize them and see the improvements in the performance and in the bill by the end of the month. For a better understanding, here is the part where Vinicius Heimbeck, founder of the company, describes the scenario before adopting Nazar’s monitoring:

“We were having some issues with high CPU usage on our MySql RDS db.r3.4xlarge instance at AWS and sometimes we had to use a db.r3.8xlarge to stabilise things for a while. Frequently, we experienced CPU’s usage peaks of around 60% and payed around U$ 1400.00 monthly for our database instance.”

In this type of scenario, apparently there is a “lack of hardware” and what most people do is to buy more computing power. By doing that, they are only masking the problem instead of actually solving it. Besides not solving the problem, this is usually the most expensive approach.

Only after Upbeat Games’ team started monitoring their database server’s performance, they could find the root cause of their problem and solve it for real.

“When we started monitoring the database’s server, we could see in the report that 2 queries were responsible for almost 100% of the database’s resources usage. After optimizing those two commands (with some little changes) the CPU usage fell drastically. Now we have a db.t2.small RDS instance with minimal CPU utilization (around 2%), with the same amount of users and paying less than 8% of what we used to pay.”

By knowing the root cause of the performance issue the team was able to solve it and maximize the use of computing power while reducing the overall cost.

Before buying more machine power companies should go deep in the understanding of how the application is using the database resources.

Matheus Oliveira, Database Expert and Co-founder of Nazar

Originally published at