graphql-js
graphql-js copied to clipboard
benchmark: increase process priority
...to try to avoid involuntary context switches.
This seems to me to be pretty TETAW ("too easy to actually work").
Deploy Preview for compassionate-pike-271cb3 ready!
Name | Link |
---|---|
Latest commit | e7fc7dd897ca519b7992dc873a2ff22a0ebf71d7 |
Latest deploy log | https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/62a0ab9f7137bb000819f989 |
Deploy Preview | https://deploy-preview-3633--compassionate-pike-271cb3.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋
Supported commands
Please post this commands in separate comments and only one per comment:
-
@github-actions run-benchmark
- Run benchmark comparing base and merge commits for this PR -
@github-actions publish-pr-on-npm
- Build package from this PR and publish it on NPM
@github-actions run-benchmark
https://github.com/graphql/graphql-js/runs/6779810535?check_suite_focus=true#step:6:17
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_setpriority returned EACCES (permission denied) at new SystemError (node:internal/errors:239:5) at new NodeError (node:internal/errors:342:7) at Object.setPriority (node:os:305:11) at file:///home/runner/work/graphql-js/graphql-js/[eval1]:7:8 at ModuleJob.run (node:internal/modules/esm/module_job:198:25) at async ESMLoader.eval (node:internal/modules/esm/loader:252:24) at async loadESM (node:internal/process/esm_loader:85:5) at async handleMainPromise (node:internal/modules/run_main:61:12) { code: 'ERR_SYSTEM_ERROR', info: { errno: -13, code: 'EACCES', message: 'permission denied', syscall: 'uv_os_setpriority' }, errno: [Getter/Setter], syscall: [Getter/Setter] }
Not sure if sudo can help us here. if i were github actions, it wouldn't!
@yaacovCR I tried it locally and it didn't work. But we can try on CI, maybe it will work there. Also, CPU affinity can help, since the GH runner has 2 CPUs we can bound the benchmark to the second one.
sudo and setPriority seem to be working! although another erupts when writing for some reason...
I can read more about affinity
I am guessing when using a shell, piping via 3 does not work
https://github.com/graphql/graphql-js/blob/b91f51b8f9c6bc7a2d0b5d1ef7b6121bf094cac4/resources/benchmark.ts#L408
@yaacovCR You need to pass sudo -C4
https://superuser.com/questions/394522/sudo-preserve-non-std-file-descriptors
@yaacovCR Simpler solution would be to run the entire benchmark under sudo.
@yaacovCR Simpler solution would be to run the entire benchmark under sudo.
That works for me.
As a side note, I want to make sure this works cross platform. I would assume that ci would add sudo to the whole command and local users would be required to do so on their own or use the windows equivalent.
@github-actions run-benchmark
@github-actions run-benchmark
@github-actions run-benchmark
@IvanGoncharov
sudo: you are not permitted to use the -C option
Needs further research
Needs further research
@yaacovCR Can I quickly try to run some experiments on top of your PR?
Needs further research
@yaacovCR Can I quickly try to run some experiments on top of your PR?
Definitely. Good luck!