Mysqld Taking alot of memory

I have an issue with mysql taking upto 200% cpu. I have tried to upgrade my linode package 3x but the issues persisit.

Anyone who can give me a clue to resolve it , I will appreciate very much.

Thanks.

2 Replies

If you're going by the graphs in the Linode Dashboard, each 100% represents one core. So if you're using say, a 4-core Linode plan, 200% usage on that graph really means you're only using half of what's allotted to your plan.

When diagnosing performance issues the first step is to make an observation. You've already done that and you've observed heavy CPU utilization. The next step is locating the root cause. Things to consider here are …

  1. What is the growth pattern for transactions e.g. the number of queries being run. Has this been steadily increasing? Did it increase a lot all of the sudden?
  2. Have there been any changes to which queries are executed the most?
  3. Has the datasets your queries work against seen any changes? Does a table now have 10x as many rows as it had a month ago?
  4. Do you have a query that is poorly optimized? Does it join millions of rows? execute loads of full table scans?

The key here is visibility. The gold standard is Percona, but that can be pricey. If you don't have the budget you can definitely get some mileage out of tools like mtop

Once you know what's causing your problem then you can weigh your options to fix it.

  1. Do you introduce replication to spread the load across multiple linodes?
  2. Do you break some queries apart and wire them together with application logic?
  3. Do you add additional indices?
  4. Do you do all of these things?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct