Need to tune sshfs

Hi All,

I am facing performance and disconnect issue using sharing NFS share again with the help of Sshfs - can any one tell the best parametrs to use for mounting with SSHFS or any advice using it for sharing again a NFS share?
apunkabollywoodAsked:
Who is Participating?
 
Michael WorshamConnect With a Mentor Infrastructure / Solutions ArchitectCommented:
If NFS is a need, something you might want to consider is using autofs. Autofs uses the automount daemon to manage your mount points by only mounting them dynamically when they are accessed. Autofs is great for things like shared /home directories across multiple servers.

http://www.linuxtopia.org/online_books/rhel5/rhel5_administration/rhel5_s1-nfs-client-config-autofs.html
0
 
gheistCommented:
Never heard of NFS share.
0
 
Michael WorshamInfrastructure / Solutions ArchitectCommented:
Is this NFS share being presented from a SAN device (i.e. NetApp) and available to multiple machines?

What do you currently have as parameters for the mount?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
gheistCommented:
Only tuning for sshfs is to add preference for AES-128 and gzip level 1 (on either client or server), but still it will be painfully latency-sensitive.
0
 
apunkabollywoodAuthor Commented:
Okay let me more clear - I have NFS share from Netapp storage mounted on my machine - now i am again sharing the same share to other machines using sshfs but problem is bad performance and sometime got issues n reboot.
0
 
gheistConnect With a Mentor Commented:
SSHFS is very sensitive to latency just like SSH
you cannot fix it much as 80% of SSH session is waiting for single data packet to come over the network. You can add compression to SSH to make that packet hold more data
You can halve the left 20% by using simpler AES128 encryption.
There are HPC patches to ssh that rises SSH transmit window size and allows ssh protocol over plaintext (google knows right places to find it)
0
 
apunkabollywoodAuthor Commented:
Thanks gheist - Any suggested link on how to configure that encryption or patches - I didnt find any good one :(
0
 
apunkabollywoodAuthor Commented:
More infor on issue:

when i want to mount a sshfs path permanently to one of my server
- it is all working fine (the mount)
- but after a while (could be 1 min our several hours), i used to get  STALE FILE issue on some directories
- not always the same
they just umount/remount ans it is ok

But its weired i want reliable mount points
0
 
Michael WorshamInfrastructure / Solutions ArchitectCommented:
Since stability seems to be a concern, why use SSHFS? As gheist pointed out, SSHFS is very sensitive to latency. Unless you have a government facility-like environment that has to be STIG / DISA compliant, there is really no performance gain using SSHFS -- actually the opposite can be said for using it.
0
 
gheistCommented:
For stale file you need to enable keepalive in either client or server
0
 
apunkabollywoodAuthor Commented:
Thanks Michael and Gheist,.

Are you talking about keepalive in ssh_config file?

Also if there is no good solution for stale file issue - any other alternative which can be use for sharing nfs share again as nfs share with better performance?
0
 
gheistCommented:
Connect directly to NFS over VPN?
0
 
apunkabollywoodAuthor Commented:
But our problem is - we need to keep a proxy in between having Redhat Satellite n RHN proxy
0
 
apunkabollywoodAuthor Commented:
Is there any thing we could do from netapp side ?
0
 
gheistCommented:
How that relates to SSH and NFS?
0
 
apunkabollywoodAuthor Commented:
Hi Gheist - Netapp is giving a NFS share to the server and i am sharing the same share to other clients using SSHFS.  do you have any better alternative or any solution to better performance? please help with proper technical steps if yes?

Hi Michael - Its not feasible to configure autofs for every client as there are lotz of clients and many of them need for few packages.
0
 
gheistCommented:
I dont see problem stated.

We can just confirm your observation that SSHFS is slow as hell. You can help yourself with stale files by either:
setting keepalive
using autofs

Mounting NFS over VPN will be 1c faster as NFS keeps more requests in-flight and thus somewhat better gets over WAN latencies.
0
 
gheistCommented:
If i read you correctly you need apache http server and createrepo command. All the juggling with NFS/sshfs is completely useless.
0
 
apunkabollywoodAuthor Commented:
Okay so could you help me with :

1. Steps to configure keepalive parameter?
2. Any quick or script we could use to configure autofs on client side?
0
 
gheistCommented:
But our problem is - we need to keep a proxy in between having Redhat Satellite n RHN proxy

Are you in compliance with your redhat subscriptions?
0
 
apunkabollywoodAuthor Commented:
Not yet but planning to confiure on a same server - But initially we just go with local repositories
0
 
apunkabollywoodAuthor Commented:
Sorry i am asking so much but i need to find best solution within
0
 
gheistCommented:
It is called CentOS.
0
 
Michael WorshamInfrastructure / Solutions ArchitectCommented:
Before we get off on a tangent, what is it you are trying to do (i.e. big picture) and what solutions are you looking for?
0
 
gheistCommented:
Big picture - redistribute goods from redhat's subscription clearly against his licencing arrangements.
0
 
Michael WorshamInfrastructure / Solutions ArchitectCommented:
Asker: If you are looking for a way to circumvent the Red Hat licensing until licensing can be acquired, then the discussion needs to end here. EE and its experts are not allowed to provide help or solutions of this type as it is a violation of the site rules.
0
 
apunkabollywoodAuthor Commented:
No at all - I think i need to clear my query again :

1. I have an NFS share from NETAPP storage given to my server.
2. I have and i can mount it as NFS share on my server .
3. Now i need to make my server as a NFS server again - so that client can again mount those share as a NFS.
 means to share sharing of NFS share again to my clients.

Purpose is to create yum repositories - Ignore/clear the picture of RHN and Sataelite proxy from this question.

For now i am using SSHFS for sharing that NFS share again from my server. but facing performance and disconnection issues.
0
 
Michael WorshamInfrastructure / Solutions ArchitectCommented:
From a networking perspective, do you have seperate VLANS? It sounds that you are trying to use SSHFS mounts upon your base network environment, which most likely is having latency problems. If that is the case, you need a separate network vlan so that you aren't encountering the base network traffic.
0
 
skullnobrainsCommented:
why the hell don't you use the nfs shares directly from the clients ?

---

unfs will let you export a mounted nfs filesystem. it will likely be faster and more stable than sshfs but not perfect either

samba should be able to use an nfs mounted fs as a backend, an ftp server, webdav and a huge wealth of more esoteric stuff as well

if you use nfsv4, it should be reasonably easy to setup tunnelling. i would not try with anterior versions of nfs under linux

AIX has support for nfs proxy

ipf has support for rpc proxying and should ba able to open and nat rpc connections but it was in beta last time i checked

i never used this, but may do the trick as well : https://github.com/cloudera/hdfs-nfs-proxy

--

btw i suppose you already tried to loop-mount the nfs export somewhere else and export that location ? play with symbolic links ?
0
 
skullnobrainsConnect With a Mentor Commented:
i forgot to state you could also export a fuse-nfs mount (revere the approach of unfs)... no idea which would be more stable or faster...
0
 
apunkabollywoodAuthor Commented:
Okay thanks let me try and will keep you updated
0
 
apunkabollywoodAuthor Commented:
Thanks all for your expert advice it works
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.