Slow SMB Local Copy Performance

Mthrboard
Posts: 2
Joined: Wed Dec 28, 2011 7:35 am

Slow SMB Local Copy Performance

Postby Mthrboard » Wed Dec 28, 2011 8:55 am

I just replaced the aging WHS install on my server with a fresh new Amahi install, and so far I'm loving it except for one small detail. I'm trying to migrate all my data from the NTFS volumes to a Greyhole pool. I'm connecting via VNC to my HDA to do the copying. I mounted the SMB shares locally using the mount_shares_locally script I found in the Wiki. When I move the files to /mnt/samba/Whatever, I'm getting extremely slow transfer rates (8-10MB/sec). But here's the weird thing. If I connect to the share from within the Gnome file manager (Go -> Location -> smb://hda/Whatever), moving the same set of files suddenly jumps to 30-32MB/sec. And If I try copying files directly to the drive (/var/hda/files/drives/sdc1/Whatever) I can get 60-65MB/sec. But here's where it gets even weirder. If I copy files from my Windows desktop to the server via Gigabit Ethernet, I can copy files at 60-65MB/sec again.

I've been trying a few things to see if they help. I tried unmounting the share and remounting with the hostname instead of localhost IP, but that slowed performance even more. I also tried the external IP (192.168.1.50) with the same results. It's the same results across multiple shares as well. It doesn't seem to matter if a share's landing zone is on a pool drive or not.

I realize this is more of a temporary problem for me. Once I migrate my data, I shouldn't be copying this large a volume of data at once any more, but it would be nice to finish copying the data this year. I still have roughly 15TB of data on 7 drives to move. Any help anyone can provide would be greatly appreciated. Thank you in advance.

dinomic
Posts: 65
Joined: Mon Jan 03, 2011 6:49 am

Re: Slow SMB Local Copy Performance

Postby dinomic » Mon Jan 02, 2012 4:31 am

I too am experiencing slow performance, copying from one share to the other (eg /mnt/samba/Share1 to /mnt/samba/Share2). It's averaging at 7.1MB/sec, and it's also taking up about 60-70% CPU on average while it's doing this! I too initiated the copy via VNC, but that shouldn't be an issue, should it? I wouldn't have thought so, as the machine I initiated it from was put to sleep during the copy, and it still continued copying at the same rate.

I assumed that this would be the fastest way to copy the files over. I'll try your other method next time (ie via smb://hda/Share1). But what I find confusing is why the performance would be even faster when files are copied over the network??
Norco 4220 Case
Gigabyte GA-G33-DS3R Motherboard w/ 8GB RAM
LSI SAS2116PCIe 6GB/s SAS (replaced 3Ware 9690SA-4I & Chenbro CK1360)
1 x Hitachi 160Gb2.5" System Drive (original 1 x OCZ 60GB Vertex 2 SATAII 2.5" SSD died)
8 x 4TB Hitachi Deskstars
6 x 3TB Hitachi Deskstars
6 x 2TB Hitachi Deskstars (1 dead!)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Slow SMB Local Copy Performance

Postby bigfoot65 » Tue Jan 03, 2012 3:51 pm

If using Greyhole, try installing the mount_shares_locally script. It can be found in the wiki.

http://wiki.amahi.org/index.php/Mount_Shares_Locally

Then when copying files, do it to the shares vs the /mnt/share. You should always work with the shares (/var/hda/files/sharename, not the samba mount in my opinion.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

vladgur
Posts: 6
Joined: Sun Mar 25, 2012 1:28 pm

Re: Slow SMB Local Copy Performance

Postby vladgur » Sun Mar 25, 2012 1:32 pm

If using Greyhole, try installing the mount_shares_locally script. It can be found in the wiki.

http://wiki.amahi.org/index.php/Mount_Shares_Locally

Then when copying files, do it to the shares vs the /mnt/share. You should always work with the shares (/var/hda/files/sharename, not the samba mount in my opinion.
What you're saying is against whats written in the wiki that you linked to: "Greyhole data should only be accessed through shares, so mounting those shares locally is an easy way to work with Greyhole data safely."

What this means to me is that you mount your /var/hda/files/sharename as /mnt/samba/sharename and then only write to this share via /mnt/samba/sharename.

Please advise on which approach is correct. My internal copy speed from an internal hard drive to smb share on another internal hardrive is about 21MB/sec

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Slow SMB Local Copy Performance

Postby bigfoot65 » Sun Mar 25, 2012 2:31 pm

Unfortuantely I am no Greyhole expert, so what I have indicated is based on my experiences.

The wiki is a little misleading. I have always worked with files on my box via the share (i.e. /var/hda/files/share). Maybe that was incorrect, but I have never had any issues. I have heard folks working with the /mnt/samba/shares area as well. The main thing I guess is that you don't mess with files in the gh directories.

Typically slow copy performance is network related. Not sure if that is your case, but google might point you in the right direction.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

vladgur
Posts: 6
Joined: Sun Mar 25, 2012 1:28 pm

Re: Slow SMB Local Copy Performance

Postby vladgur » Sun Mar 25, 2012 10:22 pm

Unfortuantely I am no Greyhole expert, so what I have indicated is based on my experiences.

The wiki is a little misleading. I have always worked with files on my box via the share (i.e. /var/hda/files/share). Maybe that was incorrect, but I have never had any issues. I have heard folks working with the /mnt/samba/shares area as well. The main thing I guess is that you don't mess with files in the gh directories.

Typically slow copy performance is network related. Not sure if that is your case, but google might point you in the right direction.
No offense, but your response does not inspire confidence since at least two wiki entries(including this one http://wiki.amahi.org/index.php/Greyhole ) plus numerous sources online describing greyhole specifically warn against direct(not through smb share) access to GreyHole-pooled files.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Slow SMB Local Copy Performance

Postby bigfoot65 » Mon Mar 26, 2012 5:02 am

I am sorry if my response was misleading or incorrect. I rarely mess with files directly on the HDA.

This is probably how I did it, just did not remember.
What this means to me is that you mount your /var/hda/files/sharename as /mnt/samba/sharename and then only write to this share via /mnt/samba/sharename.
That is what the script does. Sorry if I confused or mislead you. Honestly, that was not the intent.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

modem7
Posts: 215
Joined: Tue Mar 20, 2012 6:00 pm

Re: Slow SMB Local Copy Performance

Postby modem7 » Mon Apr 23, 2012 5:37 am

Make sure you enable write cache in the BIOS.

Before I did this I was getting 4-5mb/s and now I'm getting in excess of 60-70mb/s

bigmango
Posts: 62
Joined: Wed Aug 31, 2011 11:36 am

Re: Slow SMB Local Copy Performance

Postby bigmango » Mon Apr 23, 2012 9:39 am

Same problem here. I am also doing everything over the gigabit network from the windows box as it is much faster than doing it locally.

I am hoping that the new samba version in Fedora 16 will fix this issue.

User avatar
ciscoh
Posts: 158
Joined: Thu Mar 10, 2011 1:53 pm

Re: Slow SMB Local Copy Performance

Postby ciscoh » Tue Apr 24, 2012 1:01 pm

so i am sure someone will disagree with me here but....

there is really little "danger" with working directly with the /var/hda/files/ShareName directories vs. the samba share that i can see.

The biggest difference is when Greyhole "deals" with them. If you use the samba shares, samba logs the file write, greyhole sees it and makes it's copies and sym links,

If you use the direct share, Greyhole waits until the next --fsck is run.

I think using samba has some performance sacrifices during the file transfer from my experience.

Who is online

Users browsing this forum: No registered users and 4 guests