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

Too many open files on native #45

Open
theduke opened this issue Feb 27, 2024 · 1 comment
Open

Too many open files on native #45

theduke opened this issue Feb 27, 2024 · 1 comment

Comments

@theduke
Copy link
Contributor

theduke commented Feb 27, 2024

Right now we are reaching "too many open files" when running wrk and winterjs natively:

$ winterjs ./simple.js

And, in other shell tab:

$ wrk -t12 -c400 -d10s http://127.0.0.1:8080
Running 10s test @ http://127.0.0.1:8080
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.91ms 10.03ms 294.68ms 99.16%
Req/Sec 6.25k 2.00k 11.33k 73.92%
747990 requests in 10.02s, 122.69MB read
Socket errors: connect 155, read 306, write 0, timeout 0
Requests/sec: 74615.22
Transfer/sec: 12.24MB

I do have ulimit -n of 256. Once I did update ulimit -n 10000 things were solved. However, why are we opening that many files? We should fix this.

https://linear.app/wasmer/issue/WAX-86/too-many-open-files-winterjs

@wagk
Copy link

wagk commented Mar 18, 2024

I suspect that this is not winterjs's fault, but wrk, in that wrk is probably keeping each connection open for the duration of the benchmark (so in this case up to 400 of them) and quickly depletes the file handles available.

As a quick test I ran it with -n100 (and ulimit -n 256) and no errors were emitted. A quick glance over winterjs code also does not raise any obvious issues relating to holding on to unusual amounts of file handles.

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

No branches or pull requests

2 participants