tensorflow / tensorflow/tensorboard
Too many open files under RustBoard (EMFILE)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 1
Description
I am getting a lot of warnings about too many open files -- is there a way to reduce or cap the number of open file descriptors?
2021-05-11T14:31:46Z WARN rustboard_core::run] Failed to open event file EventFileBuf("[RUN NAME]"): Os { code: 24, kind: Other, message: "Too many open files" }
I don't have that many runs (~2000), so it shouldn't really be an issue. Using lsof to count the number of open FDs shows over 12k being used...
>> lsof | awk '{print $1}' | sort | uniq -c | sort -r -n | head
6210 tokio-run
6210 Reloader-
1035 StdinWatc
1035 server
1035 Reloader
184 gmain
168 gdbus
134 grpc_glob
85 bash
80 snapd
Compared to <500 in "slow" mode.
>> lsof | awk '{print $1}' | sort | uniq -c | sort -r -n | head
427 tensorboa
184 gmain
168 gdbus
85 bash
80 snapd
72 systemd
71 screen
52 dconf\x20
51 dbus-daem
48 llvmpipe-
In my case, the "slow" mode actually loads files faster since it doesn't run into this issue.
Originally posted by @Raphtor in https://github.com/tensorflow/tensorboard/issues/4784#issuecomment-838599948
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing RustBoard's event-file handling in the mode that produces the tokio-run and Reloader processes, then compare it with slow mode. Reproduce the run while monitoring lsof and verify that file-descriptor use stays bounded and the EMFILE warnings stop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100