1

I have a fairly large (16 vCPU / 47 GB of RAM) linode box which hosts a running MySQL Server. This box currently does nothing else (and we are not planning to install anything else on it for now).

The server is monitored by New Relic. Our warning policy places the server in RED (=danger) state when either : CPU > 80% or Memory > 90% or Disk IO > 90% or Disk Full > 90%.

The DB is fairly large (lots of data!) but low access rate (< 1 request per second). We are basically collecting lots of data, and we will do something out of it "someday". I am not complaining about the DB perfs. The CPU usage is flat around 1 or 2 %. No issue there either.

Should I still be worried about the memory warning or should I modify the server warning policy to "untrack" memory usage ? Or should I simply force mysql to use less memory (via a config somewhere).

Is there any relevant measure you think I should keep an eye on. As you guessed I have little to none dev ops / admin experience.

2 Answers 2

2

Well, having 10% free of big RAM is still a lot of space, but MySQL memory usage should be fairly predictable. You can check your config with http://www.mysqlcalculator.com/ or similar tool.

You don't want it to get to swap or OOM if swap is disabled, so tune it to use less than total RAM, maybe keep it under 90% for mysql and normal system usage. Then if it gets over 90, you actually know something is off (maybe some OS service memleak or similar stuff), but you still have few GB to delay real trouble.

0
  • CPU > 80% -- 80% of one core
  • Memory > 90% -- good
  • Any Swap -- that relates to what the previous answer discussed
  • Disk IO > 90%
  • Disk Full > 90% -- 90% minus the size of the largest table -- this allows room for ALTER and other maintenance
  • slow log growing too fast
  • etc

For basic memory allocation, see my blog. Summary "If using just InnoDB, set innodb_buffer_pool_size to 70% of available RAM. (Plus key_buffer_size = 10M, small, but not zero.)"

If the "1 request per second" includes the "collecting lots of data", then you need not worry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.