Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-05-2013, 07:44 AM
|
#1
|
|
LQ Newbie
Registered: Oct 2008
Location: Reykjavik, Iceland
Distribution: openSUSE 12-2, Debian-Wheezy, Windows 7
Posts: 17
Rep:
|
Performance difference between sharing disk space via NFS or SSHFS
I have a "poor man's" cluster, i.e. 10 boxes connected via 1Gb/s switch and am trying to use for simple MPI calculations. So far I have used sshfs to get a shared disk space on the machines but it seems that the calculations scale worse than I expected. Is there a huge penalty with using sshfs rather than sshfs?
|
|
|
|
02-05-2013, 10:29 AM
|
#2
|
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
@plesset, Please correct your question, It is confusing. Performance is Degraded in which ? nfs or sshfs.
sshfs is actually using ssh protocol so all the traffic is moving in encryption and decryption cycle so there must be a penalty on performance.
whereas nfs send data in cleartext so performance always better in compare of sshfs.
|
|
|
|
02-05-2013, 11:16 AM
|
#3
|
|
LQ Newbie
Registered: Oct 2008
Location: Reykjavik, Iceland
Distribution: openSUSE 12-2, Debian-Wheezy, Windows 7
Posts: 17
Original Poster
Rep:
|
Sorry for the confusion. I'm using sshfs (since it is easy and I know how to) but I find the performance to be disappointing. So I think I should be using NFS but I'm not sure how to configure it, especially since all the machines are directly linked to the internet. Will using hosts.allow & hosts.deny be enough? I could also ask the network admin to block all access to all but one. Now there is only ssh access to the machines.
|
|
|
|
02-05-2013, 02:16 PM
|
#4
|
|
Senior Member
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 1,650
|
You can specify which IP address(es) you want to allow NFS connections from in /etc/exports. Having the machine on the internet shouldn't be a problem as long as you don't set up /etc/exports to allow NFS connections from anybody.
|
|
|
|
02-06-2013, 02:22 AM
|
#5
|
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,211
Rep: 
|
NFS is dead easy to set up.
It's very reliable and efficient.
You have a private sub net connecting the machines just specify
connection only on that. i would assume you will have a central data bank
and connect your calculators to that.
|
|
|
|
02-06-2013, 01:28 PM
|
#6
|
|
LQ Newbie
Registered: Dec 2008
Distribution: Slackware
Posts: 27
Rep:
|
Have you read about GlusterFS
For what seems to be your purpose, it seems like a good alternative do nfs and sshfs.
|
|
|
|
02-08-2013, 07:50 AM
|
#7
|
|
LQ Newbie
Registered: Oct 2008
Location: Reykjavik, Iceland
Distribution: openSUSE 12-2, Debian-Wheezy, Windows 7
Posts: 17
Original Poster
Rep:
|
I installed NFS and map the shared space as
Code:
toppond:/home/xxxx/fds /home/xxxx/fds nfs rw,rsize=16384,wsize=16384,hard,intr,async,nodev,nosuid 0 0
in fstab.
When I test it I actually find it to be slower than SSHFS (especially when writing)...
Code:
> time dd if=/dev/zero of=/home/xxxx/fds/test bs=16k count=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 4.91929 s, 54.6 MB/s
real 0m5.015s
user 0m0.000s
sys 0m0.160s
time dd if=/home/xxxx/fds/test of=/dev/null bs=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 2.31482 s, 116 MB/s
real 0m2.317s
user 0m0.008s
sys 0m0.120s
Code:
> sudo umount fds
[sudo] password for xxxx:
> sshfs toppond:/home/xxxx/fds fds
> time dd if=/dev/zero of=/home/xxxx/fds/test bs=16k count=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 3.42332 s, 78.4 MB/s
real 0m3.457s
user 0m0.000s
sys 0m0.244s
> time dd if=/home/xxxx/fds/test of=/dev/null bs=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 3.53909 s, 75.8 MB/s
real 0m3.560s
user 0m0.004s
sys 0m0.072s
Where have I gone wrong?
|
|
|
|
02-08-2013, 08:44 AM
|
#8
|
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,211
Rep: 
|
well there you go.
seems quite fast to me.
why do you think it's wrong? it is what it is.
|
|
|
|
02-08-2013, 09:11 AM
|
#9
|
|
Senior Member
Registered: May 2005
Location: boston, usa
Distribution: fc-12/ fc-11-live-usb/ aix
Posts: 2,664
|
i prefer sshfs because it is almost as fast as nfs and easier to use (it can also mount directories outside of your network).
maybe the pc's (updates/load) or routers (firmware) or nic's (drivers) are just slow (bad cables) ?
this thread seems to be slow/ bad hard drives which is hampering network performance:
http://www.linuxquestions.org/questi...ts-4175449064/
Last edited by schneidz; 02-08-2013 at 09:53 AM.
|
|
|
|
02-08-2013, 10:07 AM
|
#10
|
|
LQ Newbie
Registered: Oct 2008
Location: Reykjavik, Iceland
Distribution: openSUSE 12-2, Debian-Wheezy, Windows 7
Posts: 17
Original Poster
Rep:
|
Thank you all. At least I have gone through and it is always beneficial to learn something new and now I have the option to use both. Given the hassle with setting up/configuring NFS, as compared to SSHFS, I assumed the gain would be greater.
|
|
|
|
02-08-2013, 10:10 AM
|
#11
|
|
Senior Member
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 1,650
|
I wouldn't call it done right there, from the looks of it you only tried one small transfer with one block size. Try a larger file (at least 1GB+) and try different block sizes to see how that affects things. Also do each test a few times to make sure the results are consistent.
Also make sure there is no other I/O on either system during the tests if you want the most fair comparison.
Last edited by suicidaleggroll; 02-08-2013 at 10:14 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:35 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|