You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using py-spy to profile a PyTorch program. It has a lot of threads.
I also care about the native stack traces on the main and the collation thread (--native).
The thing is py-spy can't keep up with so many threads. It shows messages like
py-spy> 1.66s behind in sampling, results may be inaccurate. Try reducing the sampling rate
py-spy> 1.81s behind in sampling, results may be inaccurate. Try reducing the sampling rate
py-spy> 2.13s behind in sampling, results may be inaccurate. Try reducing the sampling rate
I need a great bit of sampling rate (at least 40-50) for the profile to be helpful to analyze the performance, so I cannot reduce the sampling rate too much.
Thus, I want to propose a feature to be able to filter based on thread names, ignoring these queue feeder threads so py-spy only need to sample the threads that we care about. Most threads are multi-processing utility threads (QueueFeeder). It would be better if we can also control more fine-grained behaviors of the sampler, like selectively enabling --native for some threads (since the maximum sampling rate py-spy is able to keep up with dropped from ~80 to ~20 when enabling native).
The text was updated successfully, but these errors were encountered:
I'm using py-spy to profile a PyTorch program. It has a lot of threads.
I also care about the native stack traces on the main and the collation thread (
--native
).The thing is
py-spy
can't keep up with so many threads. It shows messages likeI need a great bit of sampling rate (at least 40-50) for the profile to be helpful to analyze the performance, so I cannot reduce the sampling rate too much.
Thus, I want to propose a feature to be able to filter based on thread names, ignoring these queue feeder threads so py-spy only need to sample the threads that we care about. Most threads are multi-processing utility threads (QueueFeeder). It would be better if we can also control more fine-grained behaviors of the sampler, like selectively enabling
--native
for some threads (since the maximum sampling rate py-spy is able to keep up with dropped from ~80 to ~20 when enabling native).The text was updated successfully, but these errors were encountered: