Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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