{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/22631","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/22631/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/22631/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/22631/events","html_url":"https://github.com/nodejs/node/pull/22631","id":356091331,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNDY5MDU1","number":22631,"title":"WIP: Pluggable thread pool","user":{"login":"davisjam","id":22822319,"node_id":"MDQ6VXNlcjIyODIyMzE5","avatar_url":"https://avatars0.githubusercontent.com/u/22822319?v=4","gravatar_id":"","url":"https://api.github.com/users/davisjam","html_url":"https://github.com/davisjam","followers_url":"https://api.github.com/users/davisjam/followers","following_url":"https://api.github.com/users/davisjam/following{/other_user}","gists_url":"https://api.github.com/users/davisjam/gists{/gist_id}","starred_url":"https://api.github.com/users/davisjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davisjam/subscriptions","organizations_url":"https://api.github.com/users/davisjam/orgs","repos_url":"https://api.github.com/users/davisjam/repos","events_url":"https://api.github.com/users/davisjam/events{/privacy}","received_events_url":"https://api.github.com/users/davisjam/received_events","type":"User","site_admin":false},"labels":[{"id":155267502,"node_id":"MDU6TGFiZWwxNTUyNjc1MDI=","url":"https://api.github.com/repos/nodejs/node/labels/C++","name":"C++","color":"e11d21","default":false},{"id":154312478,"node_id":"MDU6TGFiZWwxNTQzMTI0Nzg=","url":"https://api.github.com/repos/nodejs/node/labels/in%20progress","name":"in progress","color":"ffff00","default":false},{"id":281232761,"node_id":"MDU6TGFiZWwyODEyMzI3NjE=","url":"https://api.github.com/repos/nodejs/node/labels/lib%20/%20src","name":"lib / src","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-08-31T19:00:01Z","updated_at":"2018-09-17T17:52:26Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/22631","html_url":"https://github.com/nodejs/node/pull/22631","diff_url":"https://github.com/nodejs/node/pull/22631.diff","patch_url":"https://github.com/nodejs/node/pull/22631.patch"},"body":"**DO NOT MERGE** (yet? ever?).\r\n\r\nThis is an *experimental PR* based on the [\"pluggable thread pool\" concept](https://github.com/libuv/libuv/issues/1959).\r\n\r\nThis PR will eventually contain the changes necessary to use a pluggable thread pool in Node.js, as well as one or more prototype pluggable thread pools and a description of the performance impact.\r\n\r\nThis PR won't compile as presented here because on my development machine I am using my [PluggableThreadPool](https://github.com/libuv/libuv/pull/1726) branch of libuv. If you want to try it yourself, check out that branch and overwrite `deps/uv` with it.\r\n\r\nI am opening this PR rather prematurely in an attempt to solicit feedback from the community about the general idea, as well as particular suggestions on Node.js-level threadpool designs.\r\n\r\n##### Checklist\r\n\r\n- [ ] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [ ] tests and/or benchmarks are included\r\n- [ ] documentation is changed or added\r\n- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/422109816","html_url":"https://github.com/nodejs/node/pull/22631#issuecomment-422109816","issue_url":"https://api.github.com/repos/nodejs/node/issues/22631","id":422109816,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjEwOTgxNg==","user":{"login":"davisjam","id":22822319,"node_id":"MDQ6VXNlcjIyODIyMzE5","avatar_url":"https://avatars0.githubusercontent.com/u/22822319?v=4","gravatar_id":"","url":"https://api.github.com/users/davisjam","html_url":"https://github.com/davisjam","followers_url":"https://api.github.com/users/davisjam/followers","following_url":"https://api.github.com/users/davisjam/following{/other_user}","gists_url":"https://api.github.com/users/davisjam/gists{/gist_id}","starred_url":"https://api.github.com/users/davisjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davisjam/subscriptions","organizations_url":"https://api.github.com/users/davisjam/orgs","repos_url":"https://api.github.com/users/davisjam/repos","events_url":"https://api.github.com/users/davisjam/events{/privacy}","received_events_url":"https://api.github.com/users/davisjam/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T17:52:26Z","updated_at":"2018-09-17T17:52:26Z","author_association":"CONTRIBUTOR","body":"The most recently pushed changes introduce `tools/visualize-threadpool-behavior.py`, which doesn't quite live up to its name. I am intending it to eventually be a threadpool tuning aid.\r\n\r\nAt the moment, if you invoke my version of node with `NODE_THREADPOOL_TYPE=SPLIT_BY_ORIGIN` and then feed the resulting log file to this tool, it will create some graphs (not super useful yet) and print the distribution of task types by origin (nice snapshot of how an application uses the threadpool).\r\n\r\nFor example, on a toy application it produces this summary:\r\n\r\n```\r\nDistribution of task types by origin\r\ntask-origin  task-type\r\nLIBUV        CPU           10000\r\n             DNS            5000\r\n             FS           655000\r\nV8           CPU            3554\r\n```\r\n\r\nAt the moment I am looking for applications that use the threadpool for anything besides FS, since on FS-only workloads this PR won't have any effect.\r\n- Does anyone out there know of open-source application(s) that fit this description?\r\n- Does anyone out there have closed-source application(s) that they would be willing to benchmark on?\r\n\r\nIf so, comment here or contact me by [email](https://github.com/davisjam/)!"}}
{"actor":{"display_login":"davisjam"}}