Run Theia with bigger UV_THREADPOOL_SIZE for better fileio performance? #17610
Replies: 2 comments
|
Hi @jonahgraham, thanks for starting this discussion! 👋 The Theia community will take a look soon. In the meantime, you might find helpful information in: 💙 Eclipse Theia is built and maintained by a community of contributors and sponsors. If Theia is valuable to your work, consider sponsoring the project. For professional support, training, or consulting services, learn more about available options. |
|
Instead of increasing I'm going to keep an eye on overall Theia performance when running with the workspace opened on an NFS to see if there are other places that may benefit from higher levels of concurrent I/O operations. |
Uh oh!
There was an error while loading. Please reload this page.
Question
Hi folks,
TL;DR is there any issue with running Theia's node process with a bigger than default
UV_THREADPOOL_SIZE?I am hitting some performance limitations in part because Theia's open project is on an NFS mount in my use case. The per-file operation performance when doing large number of file operations can be very slow.
A solution to this is to increase UV_THREADPOOL_SIZE so that more parallel file operations can be performed so that the iowait state can be spread.
In one of the more extreme cases I have I want to copy ~500 files (~15MB). With normal cp that takes 15-20 seconds. If I parallelize the copy, it still takes 4-5 seconds with default
UV_THREADPOOL_SIZEof 4. However if I increase the size I get progressively faster, with diminishing returns after 30-60. The tradeoff is more memory usage for libuv and simply more threads.UV_THREADPOOL_SIZESo I want to increase
UV_THREADPOOL_SIZEfor Theia, but before I do, I want to ensure I haven't overlooked something that others have figured out about potentially why increasingUV_THREADPOOL_SIZEin the context of Theia is a bad idea?The only concern I have so far is that child node processes (like extension host or DAP server) inherit
UV_THREADPOOL_SIZEand each of them needs too much memory or threads. Perhaps I can setprocess.env.UV_THREADPOOL_SIZEback to 4 after startup so that child nodes aren't too big.See node docs and posts like this on linkedin for more info
All reactions