2

I'm trying to estimate my db traffic not including backups (mysql 5.1.41).

I use show global status; to get the parameters bytes_sent and bytes_received.

Questions

  • Do these numbers include mysqldump (backup) data or not ?
  • Do they include the log file which is being read by slaves or not?

Thanks, Niro

1

Do these numbers include mysqldump (backup) data or not ?

It would include mysqldump for one simple reason: It uses a DB Connection. That DB Connection, when you do SHOW PROCESSLIST;, has a SELECT SQL_NO_CACHE running on a table at any given moment during the mysqldump.

Do they include the log file which is being read by slaves or not?

In MySQL Replication, you have two threads: IO Thread and SQL Thread. They are, for all intents and purposes, DB Connections as they are counted (included) under the global status variable Threads_created. DB Connections and Threads are really one and the same.

What then gets counted?

  • Bytes sent : IO Thread requesting binlog entries from the Master
  • Bytes recevied : IO Thread reading binlogs entries from its Master
  • Bytes recevied : SQL thread reading its own relay logs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.