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

Allow site wide configuration settings for all users #239873

Open
lgarrison opened this issue Feb 7, 2025 · 7 comments
Open

Allow site wide configuration settings for all users #239873

lgarrison opened this issue Feb 7, 2025 · 7 comments
Labels
config VS Code configuration, set up issues feature-request Request for new features or functionality

Comments

@lgarrison
Copy link

Occasionally users on our cluster will open a large directory tree (10s of millions of files) on a shared network filesystem (CephFS) as a workspace. This causes noticeable latency for all users of the filesystem, as unfortunately network filesystems have notoriously bad performance isolation. I believe this happens during the initial indexing of the files in the directory tree, since setting

"files.watcherExclude": {
    "**/ceph/**": true,
}

doesn't help. I can watch the fileWatcher process indexing the directory tree via strace regardless of this setting. (Even if it did help, I don't think we have a way to deploy this as a site-wide setting.) For what it's worth, CephFS doesn't support inotify, but if I'm understanding what I'm seeing correctly, that doesn't really matter since the issue happens during the initial crawl.

While we continue to identify these issues case-by-case and try to educate users about workspaces, I'm wondering if there could be a technical solution. I think the ideal behavior might be that we could set a site-wide "blacklist" of directories to never crawl preemptively. I realize this might affect the behavior of extensions that want to discover properties of the workspace, but in our case this would be acceptable -- the CephFS filesystem is for storing large data files, not code, so it doesn't need to function properly as a part of a workspace.

Is such a feature be possible? Or is there another approach that you would recommend for issues like this? Thanks!

@bpasero
Copy link
Member

bpasero commented Feb 7, 2025

Can you do a test by entirely disabling the file watcher via:

"files.watcherExclude": {
    "**": true
}

@bpasero bpasero added the info-needed Issue requires more information from poster label Feb 7, 2025
@lgarrison
Copy link
Author

That does seem to stop the crawl! And changing it back to **/ceph/** immediately triggers it. Here's what I observed:

  1. Set "files.watcherExclude": { "**": true }
  2. On a cluster node via Remote-SSH, open /mnt/home/lgarrison/ceph as a workspace, which is a symlink to /mnt/ceph/users/lgarrison
  3. Check strace -f -p <fileWatcher PID>, don't see stats
  4. Set "files.watcherExclude": { "**/ceph/**": true }
  5. Immediately see stat flood in strace

This happens regardless of whether I open the workspace as /mnt/home/lgarrison/ceph (the symlink) or /mnt/ceph/users/lgarrison (the target), for what it's worth.

However, taking a step back, even if watcherExclude could be set to stop watching ceph paths, is there any way to deploy such a setting site-wide? We have new users connecting all the time from their personal devices where we don't control the VS Code settings.

@bpasero
Copy link
Member

bpasero commented Feb 7, 2025

No, not to my knowledge.

@lgarrison
Copy link
Author

Okay, in that case I think this issue has 2 parts, a bug/question and a feature request.

Bug/question: why doesn't "files.watcherExclude": { "**/ceph/**": true } stop crawls of /mnt/ceph/users/lgarrison as a workspace? What's the right syntax?

Feature request: a way to deploy a files.watcherExclude setting site-wide, or perhaps more generically inherit a site-wide settings.json. I don't mind if the user has the capability to override site-wide settings (in fact, that's probably better); we're just trying to set smart defaults.

@bpasero
Copy link
Member

bpasero commented Feb 8, 2025

I hope this clarifies it:

Image

Turning into a feature request for the second part.

@bpasero bpasero changed the title global latency issues on network filesystem when opening large directory tree as workspace Allow site wide configuration settings for all users Feb 8, 2025
@bpasero bpasero added feature-request Request for new features or functionality config VS Code configuration, set up issues and removed info-needed Issue requires more information from poster labels Feb 8, 2025
@bpasero bpasero removed their assignment Feb 8, 2025
@vs-code-engineering vs-code-engineering bot added this to the Backlog Candidates milestone Feb 8, 2025
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@lgarrison
Copy link
Author

Thanks! And just to confirm for anyone else since it wasn't immediately obvious to me: setting "files.watcherExclude": { "/mnt/ceph/": true } does appear to effectively exclude the entire directory tree rooted at that point, including any paths that point into that tree via symlinks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config VS Code configuration, set up issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants