You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "anujphadke (Code Review)" <ge...@cloudera.org> on 2016/08/18 22:18:51 UTC

[Impala-ASF-CR] IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times

anujphadke has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/4052

Change subject: IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times
......................................................................

IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times

Impala uses the wall clock timer to measure the CPU time from the thread
start to finish. This also accounts for all the time when a thread gets
pre-empted or blocked. This change adds the CLOCK_THREAD_CPUTIME_ID timer to
measure the CPU time spent in execution only.

Change-Id: If8edd0c3559968ff12e42f83dd970e424fa4a3c8
---
M be/src/util/runtime-profile-counters.h
M be/src/util/stopwatch.h
2 files changed, 25 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/52/4052/1
-- 
To view, visit http://gerrit.cloudera.org:8080/4052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8edd0c3559968ff12e42f83dd970e424fa4a3c8
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <ap...@cloudera.com>

[Impala-ASF-CR] IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times

Posted by "anujphadke (Code Review)" <ge...@cloudera.org>.
anujphadke has abandoned this change.

Change subject: IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times
......................................................................


Abandoned

This change is not needed. Discussed this with dan and tim last week.

-- 
To view, visit http://gerrit.cloudera.org:8080/4052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: If8edd0c3559968ff12e42f83dd970e424fa4a3c8
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <ap...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: anujphadke <ap...@cloudera.com>

[Impala-ASF-CR] IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times
......................................................................


Patch Set 1:

Unless I'm missing something, TotalCpuTime at the fragment level isn't correctly updated with the user/sys time. It looks like we try to approximate it with:

  int64_t cpu_time = cpu_and_wait_time
      - runtime_state_->total_storage_wait_timer()->value()
      - runtime_state_->total_network_send_timer()->value()
      - runtime_state_->total_network_receive_timer()->value();

But it's not clear that that's accurate.

I agree that we already do the right thing for ScannerThreadsUserTime and ScannerThreadsSysTime

-- 
To view, visit http://gerrit.cloudera.org:8080/4052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8edd0c3559968ff12e42f83dd970e424fa4a3c8
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <ap...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: anujphadke <ap...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times

Posted by "anujphadke (Code Review)" <ge...@cloudera.org>.
anujphadke has posted comments on this change.

Change subject: IMPALA-3342: Runtime profile TotalCpuTime should eliminate wait times
......................................................................


Patch Set 1:

I think we already  print  enough information by calling - getrusage(RUSAGE_THREAD, &usage) and obtain the
total wall clock time, systime and the user time  in the profile

The usage struct contains these 2 fields 
struct timeval ru_utime; /* user CPU time used */
 struct timeval ru_stime; /* system CPU time used */

The ru_utime value matches the time reported by using the new timer I have added.
So maybe we already print the required information in the profile.

We can added the new timer class and we can reuse it later somewhere when we need to measure the CPU time spent.

-- 
To view, visit http://gerrit.cloudera.org:8080/4052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8edd0c3559968ff12e42f83dd970e424fa4a3c8
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <ap...@cloudera.com>
Gerrit-Reviewer: anujphadke <ap...@cloudera.com>
Gerrit-HasComments: No