3

After switching our rather memory + physical core rich database server to large-pages, we have noticed a small issue.

The memory usage almost looks like there is some sort of memory leak.

But running FLUSH TABLES purges about 10gigs of used memory (depending on when we run it of course, as in how long we wait).

Attached is a munin chart to show this memory usage.

What is causing us to forcefully FLUSH TABLES every 2 or so days?

mysql memory usage

Notes regarding the attached chart:

a) The nice flat memory usage at the start of the chart is when we were running (Oracle) MySQL 5.6 WITHOUT large-pages.

b) The inclining memory usage between 10-11 was when we were running Percona 5.6 WITH large-pages. At the end of 11 we switched back from Percona to Oracle MySQL 5.6 (but decided to leave large-pages on).

c) The inclining memory usage between 12-14.5 is when we were back at (Oracle) MySQL 5.6 WITH large-pages enabled. We thought this increasing memory usage was caused by some sort of memory leak in Percona. Thats why we switched back to (Oracle) MySQL 5.6. Keeping large pages.

d) The drop in memory usage around 14.5 is when we first tried running FLUSH TABLES (at this point still running Oracle MySQL 5.6, no restart, just doing a simple FLUSH TABLES).

After this back and forth switching, we have learned that the cause was NOT percona 5.6, but large-pages.

So, to summarize:

What is forcing us to run FLUSH TABLES every 2 or so days to prevent memory starvation with large-pages enabled?

I understand we can schedule a FLUSH TABLES during non-peak time, but would like to solve this properly.

Thanks!

1 Answer 1

2

I don't think this is a memory leak. It could simply be that without large pages your memory usage hit an upper bounds (ceiling) which was why memory usage looks flat. After switching to large pages MySQL may have simply been able to better make use of the available memory. The system isn't hitting swap. I'd say closely monitor and stop flushing tables.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .