LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-05-2015, 12:54 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Showing files in Linux samba share SLOW!


I've been running a Windows laptop "mapping" to 3 samba shares on a remote Linux host. This has been running fine for years. I've recently installed Linux/Ubuntu as a dual-boot OS on this same laptop. I mapped to the share from Linux with:

Code:
//mydom.com/trashbin /mnt/trash cifs credentials=/etc/samba/novatecTrashbin,_netdev,uid=mfoley,gid=mfoley	0 0
in my /etc/fstab. That maps OK, but is it horrendously slow. For example, it took over 20 minutes in Cinnamon to show 836 files in this directory. It also takes a long time in the Unity desktop, but I haven't timed it yet. if I list the folder at a command line (`ls /mnt/trash`) it takes 4 seconds.

NFS is even worse, much worse. NFS command line ls took 5 minutes the first time, then 23 secs the 2nd time.

20 minutes to show the folder in the GUI desktop makes this unusable. Does anyone have any idea how to fix this? I can't believe that Windows <--> Linux is faster than Linux <--> Linux.
 
Old 11-06-2015, 08:42 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I've never run into this, but I don't need to use mapped drives often. Am I correct that the slowness is in loading the mapped directories through the mapped link?

If so, try connecting to those same directories directly from your file manager (smb://xxx.xxx.xxx.xxx), rather than through the mapped link to see whether that is similarly slow.

Also, while the slow connection is loading, you could show a series of traceroutes. It might might provide some more data. See man traceroute for details (that's tracert on Windows).

Frankly, I'm not really sure what either of these would show, but what is causing this has to be tracked down before it can be fixed, and these tests came to mind as a start in collecting some data.
 
Old 11-09-2015, 08:01 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by frankbell View Post
I've never run into this, but I don't need to use mapped drives often. Am I correct that the slowness is in loading the mapped directories through the mapped link?

If so, try connecting to those same directories directly from your file manager (smb://xxx.xxx.xxx.xxx), rather than through the mapped link to see whether that is similarly slow.
Not sure I understand your question. By "mapped link", do you mean the fstab entry? Here is my fstab entry on the client:

Code:
//mydom.com/trashbin /mnt/trash cifs credentials=/etc/samba/novatecTrashbin,_netdev,uid=mfoley,gid=mfoley	0 0
//mydom.com/homes /mnt/mfoley cifs credentials=/etc/samba/novatecTrashbin,_netdev,uid=mfoley,gid=mfoley	0 0
Also not sure what you mean by "try connecting to those same directories directly from your file manager". You have an IP template in your example, but what about the sharename? Did you just forget that? Should it be e.g. smb://xxx.xxx.xxx.xxx/trashbin? (I'm not in a position to test this at the moment)

Actually, I've found it is quite sufficiently fast if I use a 'List View' instead of an 'icons view'. It comes up in seconds rather than minutes. Don't really know why since there are only a handful of icons involved. I found this out accidentally because I happen to prefer the list view.

However, I think I would like to try a different file manager anyway. With Nemo, every sub-directory opened creates a new window. Navigating through a tall hierarchy fills my panel with File Manager icons. I'd rather just click the 'go to parent' (which *is* on the window) rather than close a bunch of windows.

Also, the scroll bar doesn't appear to have a spot for next/previous "page" like Windows Explorer. Makes it difficult to scroll through a long list of files. Wherever you click the scroll bar it goes to that absolute position in the list. I haven't found any settings to control this.

Before I go nutz trying different file managers, do you have a recommendation that might at least address these two peeves?

Last edited by mfoley; 11-09-2015 at 08:02 PM.
 
Old 11-09-2015, 09:20 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
By "mapped" link, I was visualizing an icon on a desktop which could be clicked on to open the share.

By suggesting using the ip address of the share rather than the share name, I was visualizing a situation in which attempting to open a share in a file manager could avoid needing a DNS server to find the location of the share but instead go directly to the share location in the network.

My idea, malformed as it may have been, was to find a way to try to isolate what might be behind the problem you are experiencing. With no benchmarks, there are no comparisons.

I regret that you find my suggestions less than useful.

Last edited by frankbell; 11-09-2015 at 09:28 PM.
 
Old 11-10-2015, 12:28 AM   #5
Dave Lerner
Member
 
Registered: May 2005
Location: Florida, USA
Distribution: Pop_OS, Xubuntu
Posts: 152

Rep: Reputation: 44
Quote:
Originally Posted by mfoley View Post
Before I go nutz trying different file managers, do you have a recommendation that might at least address these two peeves?
With Nautilus, Thunar and PCManFM, clicking on a folder opens it "in place". The first two of these FM's also have settings to control this behavior. All three have back/forward buttons. Maybe there are settings in Nemo that you've overlooked?

Regarding Samba, I gave up on that and use sshfs instead. I think it's much easier. It only requires that the remote server supports ssh. Maybe it wouldn't work in your environment, though.
 
Old 11-10-2015, 05:46 AM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Frankbell:
Quote:
by "mapped" link, I was visualizing an icon on a desktop which could be clicked on to open the share.
I haven't quite figured out how to do that yet: http://www.linuxquestions.org/questi...op-4175557743/. As to using the IP address, I don't think DNS is the issue. As I mentioned, if I use 'List View' instead of 'Icon View' it is perfectly fast. This tells me there is an issue with the File Manager.

Dave Lerner:
Quote:
With Nautilus, Thunar and PCManFM, clicking on a folder opens it "in place". ... Maybe there are settings in Nemo that you've overlooked?
You are right. I found the setting: Edit > Preferences > Behavior > "Open each folder in its own window". I unchecked that and voila!

Quote:
Regarding Samba, I gave up on that and use sshfs instead. I think it's much easier. It only requires that the remote server supports ssh.
I'll check that out, never heard of it. However, the server hosting the Samba mounts is used by both Linux and Windows, so I think I'll still need the Samba mechanism.
 
Old 11-10-2015, 05:55 AM   #7
Dave Lerner
Member
 
Registered: May 2005
Location: Florida, USA
Distribution: Pop_OS, Xubuntu
Posts: 152

Rep: Reputation: 44
Regarding sshfs, this might be an issue for you:
Quote:
For distributed remote file systems with multiple users, protocols such as Apple Filing Protocol, Network File System and Server Message Block are more often used. SSHFS is an alternative to those protocols only in situations where users are confident that files and directories will not be targeted for writing by another user, at the same time.
https://en.wikipedia.org/wiki/SSHFS
 
1 members found this post helpful.
Old 11-10-2015, 11:59 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
OK, I'll play with that. I am the only user of the file system in question, so "sharing" with other users is not a problem. Thanks for the info.
 
  


Reply

Tags
samba, slow



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba share and accdb Access 2007 files very slow performance. peterlnd Linux - Server 1 02-07-2015 10:15 AM
Linux Samba Share and Mac OS X - Files Disappearing? klugenratte Linux - Software 15 12-25-2011 11:58 PM
samba - windows files lose "created on" date stamp when moved to samba share on linux jaredk51 Linux - Software 5 02-19-2010 03:13 PM
Samba share not showing any files michaelsr Linux - Server 2 11-03-2009 03:07 PM
Using Samba to share files between Linux's raypen Linux - Software 1 06-19-2008 12:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration