distributed icon indicating copy to clipboard operation
distributed copied to clipboard

Disable profiler in tests?

Open fjetter opened this issue 3 years ago • 5 comments

We constantly have a profiler running in the background, often the threads associated to it are not properly cleaned up.

In https://github.com/dask/distributed/pull/6033 we discovered that it can also be responsible for holding on to references longer than necessary which should not be a problem in production but it is for testing.

On top of these and likely other problems, the profiler surely slows down our tests, particularly with converage enabled.

Should we not run the profiler at all for non-profiling related tests?

fjetter avatar Apr 06 '22 08:04 fjetter

I think that we should not run the profiler during non-profiling tests.

On Wed, Apr 6, 2022 at 3:54 AM Florian Jetter @.***> wrote:

We constantly have a profiler running in the background, often the threads associated to it are not properly cleaned up.

In #6033 https://github.com/dask/distributed/pull/6033 we discovered that it can also be responsible for holding on to references longer than necessary which should not be a problem in production but it is for testing.

On top of these and likely other problems, the profiler surely slows down our tests, particularly with converage enabled.

Should we not run the profiler at all for non-profiling related tests?

— Reply to this email directly, view it on GitHub https://github.com/dask/distributed/issues/6075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKZTFPKZSVXK6RY3JA2RLVDVGLDANCNFSM5SVJUQZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mrocklin avatar Apr 06 '22 12:04 mrocklin

see also https://github.com/dask/distributed/issues/4091

graingert avatar May 24 '22 10:05 graingert

See also #6421

crusaderky avatar May 25 '22 16:05 crusaderky

My proposed course of action is

  • Introduce a config flag that toggles the profiler.
  • This config flag is on by default but will be disabled in our test suite
  • All tests that rely on profiling to be enabled have to enable it specifically
  • We ensure the profiling dashboard does not crash if the toggle is off

Nice to have

  • The profiling dashboard shows a nice message indicating that profiling is off instead of trying to collect information

fjetter avatar May 25 '22 17:05 fjetter

we missed a few tests that start the profiler by accident see #6498

graingert avatar Aug 02 '22 15:08 graingert