SSHFS mounts use too much memory

memory usagesshfs

I have 21 SSHFS mounts from a Debian server to another one. The servers are on a 1Gbps LAN.
When I mount these 21 FS, 675 MB of real memory (not buffer nor cache) are allocated on the server mounting the resources (the one acting as a client). I also tried the option "-o cache=no", but it didn't change anything.

Since I'll need to mount via SSHFS some hundreds of filesystems in production, with these memory usage it will never be scalable. Is it normal for SSHFS mounts to consume all this RAM? Is there anything I can do to reduce it? As I said, they're linked with a 1Gbps LAN and latency on file access is not critical for the project, so caching is not required.

Best Answer

Yes, this is normal.

Why don't you build a tunnel between the two machines, let's say with OpenVPN, and use normal networked file systems instead like NFS then? Or something else which might suit more your needs.