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

src: reduce cpu profiler overhead #466

Closed

Conversation

bnoordhuis
Copy link
Member

Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when
the CPU profiler is active.

The benefits are quite substantial on systems where it is expensive to
query the system time (most virtualized environments). Before, it was
common to see over 20% of wall clock time being spent on clock_gettime()
system calls.

R=@piscisaureus

@bnoordhuis
Copy link
Member Author

@bnoordhuis
Copy link
Member Author

This PR seems to cause a regression on the centos5-64 bot. Investigating.

@bnoordhuis
Copy link
Member Author

The centos5-64 kernel is old enough that it doesn't support epoll_pwait(). It's possible the fallback path in libuv is not working as expected.

@bnoordhuis
Copy link
Member Author

Fix: libuv/libuv#162

@Fishrock123
Copy link
Contributor

@bnoordhuis looks like the fixed version of libuv has landed here.

Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events.  Avoids unnecessary wakeups when
the CPU profiler is active.

The benefits are quite substantial on systems where it is expensive to
query the system time (most virtualized environments).  Before, it was
common to see over 20% of wall clock time being spent on clock_gettime()
system calls.
@bnoordhuis bnoordhuis force-pushed the reduce-cpu-profiler-overhead branch from cfbbf82 to 310ce15 Compare January 29, 2015 17:49
@bnoordhuis
Copy link
Member Author

@Fishrock123 Yep. Updated and having the CI check it now: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/130/

@bnoordhuis
Copy link
Member Author

CI is happy. R=@piscisaureus?

@Qard
Copy link
Member

Qard commented Feb 2, 2015

taps @piscisaureus on the shoulder

@piscisaureus
Copy link
Contributor

Oh, oops missed this. LGTM

bnoordhuis added a commit that referenced this pull request Feb 4, 2015
Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when the
CPU profiler is active.

The benefits are quite substantial on systems where it is expensive to
query the system time (most virtualized environments). Before, it was
common to see over 20% of wall clock time being spent on clock_gettime()
system calls.

PR: #466
Reviewed-by: Bert Belder <[email protected]>
@piscisaureus
Copy link
Contributor

Thanks, landed in 96ffcb9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants