Any practical advice for setting MySQL InnoDB Buffer Pool?

Hi there, I recently thought I had fixed MySQL issues (see MySQL crashing regularly - Insights needed) but this morning I check and it crashed again:

dmesg | tail -10
[1200069.176116] [18133]  1007 18133   105445     2006   544768        0             0 php-cgi7.2
[1200069.176117] [18135]  1007 18135   105443     1939   540672        0             0 php-cgi7.2
[1200069.176118] [18139]  1007 18139   105446     2011   548864        0             0 php-cgi7.2
[1200069.176119] [18145]  1007 18145    58762      722   413696        0             0 php-cgi7.2
[1200069.176120] [18199]   112 18199    16939      339   172032        0             0 mysqld
[1200069.176121] [18201]   112 18201    45620    29076   376832        0             0 mysqld
[1200069.176123] [18202]     0 18202    10749      124   110592      110             0 systemd-udevd
[1200069.176123] Out of memory: Kill process 18201 (mysqld) score 50 or sacrifice child
[1200069.178977] Killed process 18201 (mysqld) total-vm:182480kB, anon-rss:116304kB, file-rss:0kB, shmem-rss:0kB
[1200069.201557] oom_reaper: reaped process 18201 (mysqld), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

My memory:
free -h --si
total used free shared buff/cache available
Mem: 2.0G 614M 253M 188M 1.2G 1.1G
Swap: 276M 276M

And here is the Mysql Buffer Pool:

 show global variables like 'innodb_buffer_pool_size';
+-------------------------+-----------+
| Variable_name           | Value     |
+-------------------------+-----------+
| innodb_buffer_pool_size | 134217728 |
+-------------------------+-----------+

I was wondering if buffer pool should adjusted, by putting in 2GB into the calculator here, it suggests that that I should put .95 ram as buffer pool size.

Questions:

  1. What are the implications for the adjust the pool size in mysql to virtual (or even within Mysql)? I don’t want to blindly do this.
  2. Are there ways of getting the OOM reaper to stay off MySQL until absolutely required? How would one do this?

I was pretty stoked that I had nearly 2 weeks of non-Mysql issues, I just want to resolve constantly having to reboot.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.