when execute pt-pmp -p pid, the mysqld's tps/qps will drop a lot

Bug #1320168 reported by liuhao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
New
Undecided
Unassigned

Bug Description

We use the pt-pmp tool a lot to analyze our online MySQL problem.

But when we execute the pmp, we have found tps/qps of mysqld drop a lot, such as:

/usr/bin/pt-pmp -p 18266

[10225s] threads: 256, tps: 8738.19, reads/s: 0.00, writes/s: 8735.39
[10230s] threads: 256, tps: 8749.81, reads/s: 0.00, writes/s: 8745.21
[10235s] threads: 256, tps: 8757.80, reads/s: 0.00, writes/s: 8763.00
[10240s] threads: 256, tps: 8772.80, reads/s: 0.00, writes/s: 8766.40
[10245s] threads: 256, tps: 284.80, reads/s: 0.00, writes/s: 278.40
[10250s] threads: 256, tps: 8036.65, reads/s: 0.00, writes/s: 8038.85
[10255s] threads: 256, tps: 8772.41, reads/s: 0.00, writes/s: 8773.01

We modify the code of pt-pmp to fix it.

The patch is below:

143,148d142
< if gdb -nx --quiet --batch --readnever > /dev/null 2>&1; then
< readnever=--readnever
< else
< readnever=
< fi
<
205c199
< gdb $readnever -ex "set pagination 0" -ex "thread apply all bt" -batch -p $OPT_p >> "${OPT_k:-$TMPDIR/percona-toolkit}"
---
> gdb -ex "set pagination 0" -ex "thread apply all bt" -batch -p $OPT_p >> "${OPT_k:-$TMPDIR/percona-toolkit}"

Tags: pt-pmp
Revision history for this message
Hui Liu (hickey) wrote :

The qps drop is due to gdb attaching/dumping thread symbols.

It's a good suggestion to add "--readnever" option for GDB, just like pstack script.

tags: added: pt-pmp
Revision history for this message
Onacorpuscle (onacorpuscle) wrote :

Thank you for the workaround!
Regards.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1226

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.