Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqlbinlog is slow for agent purposes #65

Open
dotmanila opened this issue Mar 9, 2017 · 1 comment
Open

mysqlbinlog is slow for agent purposes #65

dotmanila opened this issue Mar 9, 2017 · 1 comment

Comments

@dotmanila
Copy link
Contributor

dotmanila commented Mar 9, 2017

For example:

[root@mysql tmp]# time mysqlbinlog -vvv --base64-output=decode-rows mysqld-relay-bin.001185 | grep 'Xid =' -A2 | grep -v '\-\-' | tail -n 186 | egrep 'Xid|\# at [0-9]{2,10}' | tac | grep -A2 Xid |grep '# at ' | tail -n 1 | rev | cut -d' ' -f1 | rev
422883242

real	0m19.517s
user	0m23.235s
sys	0m5.289s

This can cause monitor call to timeout - we need something like MHA binlog parser but the agent is written in Shell, so we might need another solution - perhaps one in python.

@sorcky
Copy link

sorcky commented Nov 15, 2018

We encounter the same issue.
Easiest solution is to write python/C "helper" to implement that slow loop, which calculates md5sum for each transaction. But even C implementation takes about 5 sec to scan 1G binlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants