Comments on: Best Practices for Configuring Optimal MySQL Memory Usage https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/ Thu, 05 Oct 2023 13:12:23 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Eimantas https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/#comment-10971721 Thu, 23 Jan 2020 20:15:56 +0000 https://www.percona.com/blog/?p=35344#comment-10971721 Stroed procedures/functions and triggeres – are couse of high memory usage (all affected MySQL, Percona, MariaDB)
scripts and description here: https://jira.percona.com/projects/PS/issues/PS-6800

Any ideas how to control it? Config tips?

]]>
By: Rajesh https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/#comment-10970608 Wed, 10 Apr 2019 15:11:57 +0000 https://www.percona.com/blog/?p=35344#comment-10970608 Hi, I have a dual core with 256 GB virtual MySQL running on it. At times the machine runs very slow even to process a simple count query, Any reason…

]]>
By: Moll https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/#comment-10968721 Tue, 28 Nov 2017 19:04:47 +0000 https://www.percona.com/blog/?p=35344#comment-10968721 Nice post, Peter!

I think making MySQL a less likely candidate to be killed by the OOM killer should be done with cautious though. Typically, on the dedicated database machines MySQL will be consuming about 90% of the memory and no other applications should be running there except for the operating system. Killing an OS process won’t release so much memory and it might corrupt the filesystem (I had a case where memory pressure corrupted the system bus).
In other words, killing MySQL is not the worst scenario in all cases!

]]>
By: Hamoon Mohammadian Pour https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/#comment-10968344 Sun, 06 Aug 2017 06:30:54 +0000 https://www.percona.com/blog/?p=35344#comment-10968344 I think InnoDB Fulltext Index has different strategics to using Memory and If someone use Fulltext on Big table, he should control fultext variables to avoid eat Memory

]]>
By: doublemarket https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/#comment-10966597 Mon, 13 Jun 2016 02:29:58 +0000 https://www.percona.com/blog/?p=35344#comment-10966597 Thank you for the useful post!

Do we have a way to know the overhead of the InnoDB buffer pool to retain additional data structure?

And since this is good, I translated this into Japanese https://yakst.com/ja/posts/3983.
Please let me know if it’s a problem.

]]>
By: Peter Zaitsev https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/#comment-10966441 Fri, 06 May 2016 02:28:31 +0000 https://www.percona.com/blog/?p=35344#comment-10966441 Hi Fadi,

1) Setting swap to match RAM size is quite common and OK to do so. My at least 25% guidance come to very large size boxes – if you’re looking for 256GB of memory 256GB of Swap, especially on expensive SSD can be too much. Note you still do not want a lot of swapping to happen even with SSD.

2) Innodb Buffer Pool is very different from Query Cache from many points of view. Specifically when it comes to invalidation Query Cache has to invalidate all queries corresponding to the given table with any update to that table so larger sizes do not work well. Buffer pool does not have such requirement and update simply marks one or more of buffer pool pages “dirty” which are later flushed in the due time. 12GB is not really large buffer pool – for many high end installations you can see buffer pools of 300GB and more.

]]>
By: Fadi El-Eter (itoctopus) https://www.percona.com/blog/best-practices-for-configuring-optimal-mysql-memory-usage/#comment-10966439 Thu, 05 May 2016 20:31:05 +0000 https://www.percona.com/blog/?p=35344#comment-10966439 Hi Peter,

What an excellent post!

About the swap, we typically set it to the exact size of the RAM. So, if a server has 64GB of RAM, then the swap is also 64GB. The thing is with SSDs, the swap is now more efficient than ever. Do you think that’s too much, given the fact that we have a generous amount of disk space? (Note: We did have a client who set the swap to 0, and the moment MySQL ran out of memory, the whole server crashed, so I see your point about the necessity of the swap).

About “innodb_buffer_pool_size” – you said to set it at around 12GB on a MySQL dedicated server with 16GB of RAM. Now, assuming an application with a heavy write activity, will there be a performance hit? I am assuming that the innodb_buffer_pool_size works the same way as the query_cache_size, which causes a performance hit when there is a table change because of invalidation.

]]>