Storage gateway mount slow on Linux while fast on Mac and Windows

0

Hi all,

I have a storage gateway & file share SMB(CIFS) mounted which is mounted on 3 OS types (windows, macos & linux), Ubuntu 18.04. On windows and mac the file share is fast, downloading and uploading data is going very fast, on linux it's very slow.

(rw,relatime,vers=3.0,cache=strict,username=**********,domain=,uid=900,forceuid,gid=900,forcegid,addr=10.0.2.156,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=120)

Also the storage gateway was created on the 7th of January. A warning was send by Amazon about possible issue with storage gateways created between 5 and 10 January. The settings in question 'Opportunistic lock (oplock)', the 'Force case sensitivity', and the 'Access based enumeration for files and directories' are all turned off.

Is there anything I can do to make the download and upload speed match the ones from Windows and Mac?

  • Based on the mount command you shared, it appears like you are connecting to NFS file share hosted on the Storage Gateway. Is that correct?

    If you are using NFS file share, the PHD message you received doesn't apply. It only applies to SMB file shares created during Jan 5 - 10.

    We recommend using "hard" and "nolock" options in the mount command. Please refer to this documentation page.

    https://docs.aws.amazon.com/filegateway/latest/files3/GettingStartedAccessFileShare.html

    Even though it may not improve the performance, we strongly recommend including those two options. Can you please make this change and share your experience? Please share your updated mount command.

  • It is actually an SMB (CIFS) share, so I assume that PHD message does apply.

asked 2 years ago888 views
1 Answer
0

Hi, using SMBv3 encryption can impact the performance. To help improve the performance, I would suggest using the SMB version 2 (vers=2.1) in mount options and changing the SMB security strategy on file gateway to either client negotiated or enforce signing. Based on your dataset and average file size, you may also consider changing the rsize and wsize to higher value up-to 16 MB.

Example entry for fstab with SMB version 2 and rsize, wsize modified.

//filegateway-ip/fileshare /mountpoint cifs rw,relatime,vers=2.1,cache=strict,username=<username>,uid=0,noforceuid,gid=0,noforcegid,addr=<filegateway-ip>,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,echo_interval=60,actimeo=1

Setting a security level for your gateway : https://docs.aws.amazon.com/filegateway/latest/files3/security-strategy.html

I would also recommend considering utility like fpsync or GNU parallel on Ubuntu client which can use multiple processes in parallel to copy to the file share. Please refer below article for instructions to enable these tools.

https://aws.amazon.com/premiumsupport/knowledge-center/efs-copy-data-in-parallel/

profile pictureAWS
Surya
answered 2 years ago
  • Hi

    I tried out your suggestion of changing the SMB version., but it seems that it is actually slower now. This problem only started to appear after i migrated it to a new storage gateway. All settings stayed the same as they where on the previous storage gateway.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions