mysqltuner per-thread memory max_allowed_packet

mysqltuner 1.9.9

  • read_buffer_size
  • read_rnd_buffer_size
  • sort_buffer_size
  • thread_stack
  • max_allowed_packet
  • join_buffer_size

mysqltuner 2.5.2

  • read_buffer_size
  • read_rnd_buffer_size
  • sort_buffer_size
  • thread_stack
  • join_buffer_size
  • binlog_cache_size

2.5.2 では

  • max_allowed_packet (デフォルト 64Mバイト) が削除
  • binlog_cache_size (デフォルト 32Mバイト)が追加

されていれる

# Error max_allowed_packet is not included in thread buffers size
#$mycalc{'per_thread_buffers'} += $myvar{'max_allowed_packet'} if is_int($myvar{'max_allowed_packet'});

https://github.com/major/MySQLTuner-perl/issues/628

This leads to the assumption that connections do not use any memory, of course the assumption of "max_allowed_packet" is the worst case, but in my opinion it has to be assumed for stable operation.

https://github.com/major/MySQLTuner-perl/pull/464#issuecomment-2020193434

最悪ケースとしては max_allowed_packet を計算に入れたほうがよい

binlog_cache_size

バイナリログ キャッシュ
MySQL では、バイナリログ キャッシュで、トランザクションの実行中にバイナリログに加えられた変更を保持します。これは、binlog_cache_size を使用して構成します。バイナリ ロギングが有効になっている場合(log_bin=ON)は、各クライアントに割り当てられます。

https://cloud.google.com/mysql/memory-usage?hl=ja

?log_bin=OFF は考慮されてない?

binlog_cache_sizeにメモリを食われた話 #MySQL - Qiita 2015