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

Adding new performance counter exposing overall scheduler time #2007

Merged
merged 2 commits into from Mar 2, 2016

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Feb 28, 2016

  • adds missing perf counter: /threads/time/overall

@hkaiser
Copy link
Member Author

hkaiser commented Feb 28, 2016

@pagrubel This adds the counter you were asking for. The already existing counter threads/time/cumulative exposes the time spent executing HPX threads (exec-time), and this new counter /threads/time/overall exposes the overall time the scheduler is running (tfunc-times). Please let us know if this is what you need.

@sithhell
Copy link
Member

What's the difference to the already existing uptime performance counter?

@hkaiser
Copy link
Member Author

hkaiser commented Feb 29, 2016

What's the difference to the already existing uptime performance counter?

@pagrubel asked to exposed the values which are being used to calculate the various derived counters. This is for her to reduce the error margin as she can calculate all derived values herself. This would also reduce the measurement overhead as she is collecting a large amount of those derived counters. The difference to the uptime counter is that this new counter exposes the core-specific timer instead of an arbitrary one.

@pagrubel
Copy link
Member

the counter is not available see, I tried changing line 658 but it still did not work, also it looks like this wouldn't require the idle rate flag but shouldn't it?

// /threads{locality#%d/total}/time/overall
// /threads{locality#%d/worker-thread%d}/time/overall
{ "time/cumulative",
util::bind(&ti::get_cumulative_duration, this, -1, _1),
util::bind(&ti::get_cumulative_duration, this,
static_cast<std::size_t>(paths.instanceindex_), _1),
"worker-thread", shepherd_count

- adds missing perf counter: /threads/time/overall
@hkaiser
Copy link
Member Author

hkaiser commented Mar 1, 2016

@pagrubel This should be fine now. And no, you don't need to enable the idle-rate stuff. This information is collected always.

@pagrubel
Copy link
Member

pagrubel commented Mar 1, 2016

@hkaiser did you push a change I don't see one

@pagrubel
Copy link
Member

pagrubel commented Mar 1, 2016

@hkaiser
This counter doesn't seem to work when hpx is built without the idle_rate counter flag it gives 0
~/build/hpx_buildrelease/bin/hello_world --hpx:print-counter /threads{locality#*/total}/time/overall -t4
hello world from OS-thread 3 on locality 0
hello world from OS-thread 1 on locality 0
hello world from OS-thread 2 on locality 0
hello world from OS-thread 0 on locality 0
/threads{locality#0/total}/time/overall,1,0.009978,[s],0,[ns]

but does when the flag is set for the build:
~/build/hpx_buildidle/bin/hello_world --hpx:print-counter /threads{locality#*/total}/time/overall -t4
hello world from OS-thread 2 on locality 0
hello world from OS-thread 3 on locality 0
hello world from OS-thread 1 on locality 0
hello world from OS-thread 0 on locality 0
/threads{locality#0/total}/time/overall,1,0.009319,[s],3.61332e+07,[ns]

@hkaiser
Copy link
Member Author

hkaiser commented Mar 1, 2016

So I stand corrected... (I should have looked more carefully), I'll add a note to that effect to the docs.

@pagrubel
Copy link
Member

pagrubel commented Mar 1, 2016

I find myself going down rabbit holes with this seems like some of the other counters are not working correctly

@hkaiser
Copy link
Member Author

hkaiser commented Mar 1, 2016

I find myself going down rabbit holes with this seems like some of the other counters are not working correctly

Could you be a bit more specific, please?

@pagrubel
Copy link
Member

pagrubel commented Mar 1, 2016

I will try but I need to leave this right now

@hkaiser
Copy link
Member Author

hkaiser commented Mar 2, 2016

I'm going to merge this. Please open a ticket if you're running into problems with the new counter.

hkaiser added a commit that referenced this pull request Mar 2, 2016
Adding new performance counter exposing overall scheduler time
@hkaiser hkaiser merged commit 1cc3f40 into master Mar 2, 2016
@hkaiser hkaiser deleted the tfunc_perf_counter branch March 2, 2016 02:19
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

3 participants