0

I have a Mysql server on VM with

16 cores CPU

59 GB RAM

Ubuntu 13.10

Mysql version is 5.5.37

This is a Slave db for reporting purpose only.

Because original Mysql innodb_buffer_pool_size(49G) is so big that the server use SWAP. So I set the innodb_buffer_pool_size to 35G then restarting the server(10/12). However, the RAM usage gradually get high, almost 90% of physical RAM after two days. I think it is no reasonable since innodb_buffer_pool_size is 35G and other Mysql operation will not use so many RAM.

I am worried about db performance if the server having swap. But I do not know how to stop the Mysql ram usage. I can not see why it gradually use so many RAM.

The server start having swap after second reboot(11/28) serveral days later

Could somebody give me some hint for make sure mysql server not gradually having high RAM usage? Or is there something I need to consider. Is the ubuntu have some setting which will cause RAM consumption?

Many Thanks.

RAM USAGE

Mysql config:

https://gist.github.com/crokobit/7c329e48dc5ab234c0b1812248ff77cf

1
  • 1
    Why do you not want your RAM to be used? Why else have you purchased that amount of memory if not to use it? Commented Dec 6, 2016 at 3:24

2 Answers 2

0

Comment out these lines from your my.cnf:

sort-buffer-size = 4M read-buffer-size = 2M read-rnd-buffer-size = 2M join-buffer-size = 4M 

Set buffer pool as high as 50G if it's a dedicated mysql server, check for NUMA settings and configure accordingly.

Change system swappiness to 1 (if you are using a newer kernel)

Upgrade to latest mysql versions, yours might be affected by some memory leak bug.

1

There is no magic 'use less RAM switch' so the usual sysadminly things apply understand what is happening and take appropriate action. Scientific method is your friend

  • Install monitoring
  • Gather data (from monitoring and other tools)
  • Analyse data
  • Make changes based on analysis
  • Monitor effect of changes
  • Rinse and repeat as required
  • Document what eventually worked.

If you can't manage that yourself then hire a professional (DBA/Sysadmin) who will probably end up being cheaper than you trying to do it yourself anyway\

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.