Posts

There is another member of the PMP family - https://github.com/markhpc/gdbpmp

gdbpmp - A wallclock profiler using GDB's python API
github.com

Yoshinori's quickstack is one of most efficient ways to PMP

quickstack - A tool to take call stack traces with minimal overheads
github.com
Posts
tl;dr: We found that in our case, contention for InnoDB's kernel_mutex was caused by contention for a malloc arena lock. We fixed it by moving to tcmalloc. Instructions on how to do that here.
jamesgolick.com

This is awesome even if PMP didn't get mentioned. I think "perf" is getting PMP-like support.

No automatic alt text available.
The Linux Foundation is with Maheshwaran Arumugam and 3 others.

Netflix Architect Brendan Gregg Offers Template for Monitoring Linux Performance Tools - http://www.linux.com/…/785426-a-template-for-monitoring-lin…

strace + PMP -> perfect together
https://code.google.com/p/strace-plus/

strace+ is an improved version of strace that collects stack traces associated with each system call. Since system calls require an expensive user-kernel context switch, they are often sources of performance bottlenecks. strace+ allows programmers to do more detailed system call profiling and determ…
code.google.com
Recently, I’d noticed a bunch of cases where MongoDB would be far, far slower to build indexes on secondaries than on the primary. An index build would finish in a few hours on a primary, but then...
nelhagedebugsshit.tumblr.com
Log says: Mon Dec 30 17:12:08.065 [DataFileSync] flushing mmaps took 143988ms for 30 files (with syncdelay = 300, with default delay flushing takes 30-40 sec).
jira.mongodb.org

Another win for PMP, there are many more but I forget to mention them here.

https://www.facebook.com/MySQLatFacebook/posts/10151896477048527

How do you debug this in your favorite flavor of MySQL?

I looked at a few hosts that had replication lag. The server had a load spike but that wasn't the real p...roblem. The replication SQL thread wasn't able to keep up because it was spending a lot of time finding dirty pages to write back for fuzzy checkpoint IO. I used PMP (https://www.facebook.com/poormansprofiler) to discover the problem. The root cause were too low values for innodb_io_capacity and innodb_io_capacity_max and the result was that the background InnoDB threads were not doing enough work which meant that foreground threads, in this case the replication SQL thread, were forced to do that work.

How do you debug this in your version of MySQL? In the FB patch and in Percona Server there is data in SHOW ENGINE INNODB STATUS that shows whether threads will block for fuzzy checkpoint IO -- either sync or async. The FB patch also has the output in SHOW GLOBAL STATUS variables so monitoring could alert on it or a diagnostics tool could check it. From a quick reading of that output for upstream 5.6 I don't see anything similar.

http://www.xaprb.com/…/…/29/how-innodb-performs-a-checkpoint

https://www.facebook.com/note.php?note_id=408059000932

See More

Used PMP twice this week:
1) debugged a stall from excessive usage of shared_ptr. Concurrent threads updating the ref count hidden in the shared_ptr doesn't scale when frequently changed especially with a 2 socket server
2) show that fsync really was the bottleneck on a workload using RocksDB

Here's an example of a quick'n'dirty way of profiling stack traces on your command line. This is an example from Solaris (but the script should work on Linux too plus other Unixes with minor modifi...
blog.tanelpoder.com

PMP goes mainstream, in High Performance MySQL, 3rd edition

Yoshinori takes it to the next level

quickstack - A tool to take call stack traces with minimal overheads
github.com

HPMP style analysis of MySQL accept thread visualized.

The hpmp script dumping the stacks of main accept thread was relatively straightforward: http://p.defau.lt/?dsWU8xytkXX_KGhbrKTYAA

(I finally learned to do ratio of log(nsamples) instead of pure ratio for graph colors - looks much nicer. Next - utilizing HSV color scale for (x,y) color visualization

I was wondering whether people use JPMP (PMP for Java). Apparently they do. I spoke with several co-workers who have been doing that to make HBase faster.

NOTE - This utility is unsupported and may or may not be available in future versions of the J2SE SDK. jstack is not currently available on Windows platforms or on the Linux Itanium platform.
download.oracle.com

I think I just debugged a hang in the Outlook for Mac client using PMP