4 ms·
Since I like my local development environment, I mostly use `sshfs`. It mounts a remote directory onto a local directory and lets you access remote files as if
by paskozdilar 5y ago
Since I like my local development environment, I mostly use `sshfs`.
It mounts a remote directory onto a local directory and lets you access remote files as if they're local, with slight latency. Then you can use whatever tools you use locally to edit/compile/run the software.
- ufo 5y agoI also use this setup. Works well for editing and reading the files. But be aware that some file-intensive operations don't work as well. It is better to grep or git in the remore server instead of in the local mount. Be careful if your shell prompt is configured to show git status, because that won't be instantaneous.
- mekster 5y agosshfs works for only 10 files or less project.
- paskozdilar 5y agoHow so?
- mekster 5y agoNever do find in files or run package managers? JetBrains never works on sshfs as it parses files for dependencies.
- paskozdilar 5y agoActually, you're right. I just tested recursively grepping a remote directory with a thousand 16KiB files. The speed is completely catastrophic: $ time grep -r foo test ... real 7m36,154s user 0m0,110s sys 0m0,249s The average download speed from remote host is ~2MiB/s, so it isn't a network issue - a thousand 16KiB files sum up to 16MiB so it shouldn't take more than ten seconds. Seven minutes is terrible. I don't understand why is this happening. Is this an inherent limitation of remote filesystems or is sshfs implementation just sucky? EDIT: parallelization seems to help - running 100 concurrent reads at a time uses up to ~1MiB bandwidth. I suppose ordinary unix tools don't play well with remote filesystems because they do stuff sequentially. That being said, if JetBrains is struggling with SSHFS, then they really need to fix their file browsing code.
- mekster 5y agoI think it's because it's not simply a file download but instead keeps on asking for file content or meta data making a roundtrip on each files to cause excessive latencies against many files. All the tools are basically designed to work on local files and they tend to work bad interacting directly on mounted file systems.