Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Setup bluebird and/or wikipedia benchmarks for promise performance #188

Open
bmeurer opened this issue Jan 15, 2018 · 12 comments
Open

Setup bluebird and/or wikipedia benchmarks for promise performance #188

bmeurer opened this issue Jan 15, 2018 · 12 comments

Comments

@bmeurer
Copy link
Member

bmeurer commented Jan 15, 2018

Specifically we're interested in the difference between regular runs with these workloads and runs where we have async_hooks enabled (see #181 for background).

@bmeurer
Copy link
Member Author

bmeurer commented Jan 15, 2018

Also see the first item on the list for nodejs/diagnostics#124.

bmeurer added a commit to bmeurer/async-hooks-performance-impact that referenced this issue Jan 16, 2018
This repository contains the data to address the question of the Promise
performance impact of async_hooks raised in
nodejs/benchmarking#188.
@bmeurer
Copy link
Member Author

bmeurer commented Jan 16, 2018

Ok, I managed to run the aforementioned benchmarks today with and without async_hooks, and the results show a significant slow-down, even with just an empty init hook.

Results for Node 9.3.0

The full results and benchmarks are available at https://github.com/bmeurer/async-hooks-performance-impact. Not sure it makes sense to include these benchmarks as part of the regular nightly runs at this point. It seems that we might first need to come to an agreement whether we think that async_hooks can be shipped liked this.

@AndreasMadsen
Copy link
Member

@bmeurer By bluebird, do you mean with petkaantonov/bluebird#1472 applied?

@bmeurer
Copy link
Member Author

bmeurer commented Jan 16, 2018

No it's the bluebird benchmarks running with native promises.

@alexkozy
Copy link
Member

It looks like to implement async_hooks for promises V8 enters C++ code and then go back into JavaScript land to call actual callback. Should we somehow migrate promise hooks from C++ builtin to TF builtin to get a performance boost?

And probably it is not best place for this question but what is main use case for async_hooks? Is it for some kind of async context tracking?

@bmeurer
Copy link
Member Author

bmeurer commented Jan 17, 2018

@gsathya already suggested to move the promise hooks to JS and eventually spec them. This would help to reduce the C++ overhead, but so far I don't think that's the only/main bottleneck.

@mhdawson
Copy link
Member

Discussed, last meeting, nothing for TSC to decide at this point. Let async hooks team address, removing tag for now.

@ofrobots
Copy link
Collaborator

Seems like @nodejs/async_hooks hasn't been mentioned here yet. Doing so.

@Trott
Copy link
Member

Trott commented Feb 13, 2018

Seems like the tsc-agenda label should be removed? If I'm wrong about that, by all means, add it again.

@Trott Trott removed the tsc-agenda label Feb 13, 2018
@mhdawson
Copy link
Member

@Trott thanks, I had removed manually from the last agenda, but forgot to remove the tag.

@mhdawson
Copy link
Member

mhdawson commented Apr 2, 2018

@bmeurer since we have no other promise centric benchmarks I'm wondering if running these nightly would be better than nothing?

@bmeurer
Copy link
Member Author

bmeurer commented Apr 3, 2018

@mhdawson Makes sense. I've created versions of these benchmarks, see https://github.com/v8/promise-performance-tests, which we use for V8 internally to track Promise and async/await performance. Shouldn't be hard to setup on Node infrastructure as well (and run with async_hook on and off).

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

No branches or pull requests

6 participants