Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastTimerService: add measurement of framework overhead (100x) #21446

Merged

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Nov 23, 2017

  • measure the time spent in the event loop, but outside any module
  • keep track of the threads joining and leaving the TBB global arena

This measurement is meaningful only only for single-threaded, single-stream
jobs, where it can be used as a comparison with the measurement based on the
sum of the resources spent in each module.
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@fwyzard
Copy link
Contributor Author

fwyzard commented Nov 23, 2017

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/PR-21446/2169

Code check has found code style and quality issues which could be resolved by applying a patch in https://cmssdt.cern.ch/SDT/code-checks/PR-21446/2169/git-diff.patch
e.g. curl https://cmssdt.cern.ch/SDT/code-checks/PR-21446/2169/git-diff.patch | patch -p1

You can run scram build code-checks to apply code checks directly

fwyzard and others added 4 commits November 23, 2017 14:03
Enabled checks:
    boost-use-to-string
    cppcoreguidelines-no-malloc
    google-build-explicit-make-pair
    misc-inefficient-algorithm
    misc-string-compare
    misc-uniqueptr-reset-release
    modernize-avoid-bind
    modernize-deprecated-headers
    modernize-loop-convert
    modernize-make-shared
    modernize-make-unique
    modernize-pass-by-value
    modernize-redundant-void-arg
    modernize-replace-auto-ptr
    modernize-shrink-to-fit
    modernize-use-auto
    modernize-use-bool-literals
    modernize-use-emplace
    modernize-use-equals-default
    modernize-use-equals-delete
    modernize-use-nullptr
    modernize-use-override
    modernize-use-transparent-functors
    modernize-use-using
    performance-faster-string-find
    performance-for-range-copy
    performance-implicit-cast-in-loop
    performance-inefficient-string-concatenation
    performance-type-promotion-in-math-fn
    performance-unnecessary-copy-initialization
    performance-unnecessary-value-param
    readability-container-size-empty
    readability-redundant-string-cstr
    readability-static-definition-in-anonymous-namespace
    readability-uniqueptr-delete-release

See http://releases.llvm.org/4.0.0/tools/clang/tools/extra/docs/clang-tidy/index.html for details.
@fwyzard fwyzard force-pushed the FastTimerService_add_overhead_measurement_100x branch from 74e7be5 to 4cfbe07 Compare November 23, 2017 13:03
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@fwyzard
Copy link
Contributor Author

fwyzard commented Nov 23, 2017

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/PR-21446/2170

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 23, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/24656/console Started: 2017/11/23 15:54

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fwyzard (Andrea Bocci) for master.

It involves the following packages:

HLTrigger/Timer

@Martin-Grunewald, @silviodonato, @cmsbuild, @fwyzard can you please review it and eventually sign? Thanks.
@Martin-Grunewald this is something you requested to watch as well.
@davidlange6, @slava77 you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-21446/24656/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 27
  • DQMHistoTests: Total histograms compared: 2833444
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2833265
  • DQMHistoTests: Total skipped: 178
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 4044.41 KiB( 23 files compared)
  • Checked 111 log files, 8 edm output root files, 27 DQM output files

@Martin-Grunewald
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar (and backports should be raised in the release meeting by the corresponding L2)

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit b87a2d4 into cms-sw:master Nov 24, 2017
// inherited from TBB task_scheduler_observer
void on_scheduler_entry(bool worker) final;
void on_scheduler_exit(bool worker) final;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dr15Jones do you think it might be useful to monitor these also in other services, like the Tracer ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already monitor it in the code that does the crash logging (in order to capture which modules are in which threads). I had not contemplated where else it might be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I've added it to the FastTimerService to track the resources used in a new thread before it starts working on some module.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be forewarned, the framework turns TBB on right up front during the initialization phase which is well before the framework explicitly starts to create TBB tasks. Therefore you should see lots of 'dead' startup time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NOTE: it is possible that TBB does 'lazy' thread creation and therefore waits until the first TBB task is requested before it starts creating the threads. I think that better explains what I see in the debugger so you might not have much 'dead' startup time.]

@fwyzard fwyzard deleted the FastTimerService_add_overhead_measurement_100x branch December 1, 2017 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants