Solved

Need to tune sshfs

Posted on 2014-03-07
32
803 Views
Last Modified: 2014-06-23
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?
0
Comment
Question by:apunkabollywood
  • 13
  • 11
  • 6
  • +1
32 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 39913220
Never heard of NFS share.
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 39913423
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
 
LVL 62

Expert Comment

by:gheist
ID: 39913610
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:apunkabollywood
ID: 39914377
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
 
LVL 62

Assisted Solution

by:gheist
gheist earned 200 total points
ID: 39914752
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
 

Author Comment

by:apunkabollywood
ID: 39915916
Thanks gheist - Any suggested link on how to configure that encryption or patches - I didnt find any good one :(
0
 

Author Comment

by:apunkabollywood
ID: 39917135
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
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 39917191
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
 
LVL 62

Expert Comment

by:gheist
ID: 39917233
For stale file you need to enable keepalive in either client or server
0
 

Author Comment

by:apunkabollywood
ID: 39917244
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
 
LVL 62

Expert Comment

by:gheist
ID: 39917379
Connect directly to NFS over VPN?
0
 

Author Comment

by:apunkabollywood
ID: 39917481
But our problem is - we need to keep a proxy in between having Redhat Satellite n RHN proxy
0
 

Author Comment

by:apunkabollywood
ID: 39917534
Is there any thing we could do from netapp side ?
0
 
LVL 62

Expert Comment

by:gheist
ID: 39917789
How that relates to SSH and NFS?
0
 
LVL 29

Accepted Solution

by:
Michael Worsham earned 200 total points
ID: 39919358
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
 

Author Comment

by:apunkabollywood
ID: 39919728
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
 
LVL 62

Expert Comment

by:gheist
ID: 39919797
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
 
LVL 62

Expert Comment

by:gheist
ID: 39919816
If i read you correctly you need apache http server and createrepo command. All the juggling with NFS/sshfs is completely useless.
0
 

Author Comment

by:apunkabollywood
ID: 39919817
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
 
LVL 62

Expert Comment

by:gheist
ID: 39919828
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
 

Author Comment

by:apunkabollywood
ID: 39919858
Not yet but planning to confiure on a same server - But initially we just go with local repositories
0
 

Author Comment

by:apunkabollywood
ID: 39921349
Sorry i am asking so much but i need to find best solution within
0
 
LVL 62

Expert Comment

by:gheist
ID: 39921526
It is called CentOS.
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 39921661
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
 
LVL 62

Expert Comment

by:gheist
ID: 39921675
Big picture - redistribute goods from redhat's subscription clearly against his licencing arrangements.
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 39921813
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
 

Author Comment

by:apunkabollywood
ID: 39922661
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
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 39923111
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
 
LVL 27

Expert Comment

by:skullnobrains
ID: 39932772
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
 
LVL 27

Assisted Solution

by:skullnobrains
skullnobrains earned 100 total points
ID: 39932778
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
 

Author Comment

by:apunkabollywood
ID: 39934920
Okay thanks let me try and will keep you updated
0
 

Author Closing Comment

by:apunkabollywood
ID: 40152547
Thanks all for your expert advice it works
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question