-Re: Best way to profile a coprocessor
Gary Helmling 2012-05-10, 16:54
> What is the best way to profile some co-processor code (running on the
> regionserver)? If you have done it successfully, what tips can you
> offer, and what unexpected problems did you encounter?
It depends on what exactly you want to look at, but ultimately I don't
think it's too different from profiling any other remote java process.
I did a fair amount of profiling of the AccessController coprocessor,
and the general process I used was:
0) bring up a cluster with my cp configuration (obviously)
1) find a specific table region I was interested in
2) manually assign this region to a given region server -- you may
also want to disable balancing so that your region stays put
("balance_switch false" in the shell)
3) attach your profiler to the region server
4) run your target load
Only problem I ran into was that I had to hack up the hbase shell
script a little bit to disable the CMS collector -- the profiler
didn't work with CMS.