SOLVED: Tweaking Samba/SMB2 for Mac & Androids

Thanks for the reply, I see some scripts in the folder you mention I can take a look there. I have used Linux very little over the years… I can do small changes.
But the main problem is after I applied the changes you suggested I’m not seeing any changes in the smb behavior. The connection is still slow and many times the files in directories don’t show up. I’m connecting using Mac with Sierra OS. I have tried some option on the MacOS end like disable smb individual packet signing and few other things but nothing worked.

Here is a copy of my smb.conf file global section and tm_config.conf. Please let me know if you have any suggestions.

[ global ]
netbios name = MyCloudEX2Ultra
server string = 2-Bay NAS
veto files = /:2eDS_Store/.bin/Network Trash Folder/.systemfile/lost+found/Nas_Prog/mir
workgroup = WORKGROUP
security = user
passdb backend = smbpasswd
ldap ssl = no
local master = no
os level = 0
preferred master = no
smb2 leases = yes
fruit:copyfile= yes
printing = bsd
printcap name = /dev/null
disable spoolss = yes
max protocol = SMB3
max xmit = 131072
max log size = 10
log level = 0
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=2097152 SO_SNDBUF=2097152
delete veto files = yes
unix charset = UTF8
encrypt passwords = yes
map to guest = bad user
null passwords = yes
guest account = nobody
dns proxy = no
use mmap = yes
use spnego = yes
disable netbios = no
strict allocate = yes
csc policy = disable
min receivefile size = 16k
allocation roundup size = 0
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
use sendfile = yes
smb passwd file = /etc/samba/smbpasswd
disable spoolss = yes
nt acl support = yes
acl map full control = yes
load printers = no
unix extensions = no
follow symlinks = yes
wide links = yes
printable = no
include = /etc/samba/tm_config.conf

[ TimeMachineBackup ]
strict sync = yes
vfs object =catia fruit streams_xattr
durable handles = yes
kernel oplocks = no
kernel share modes = no
posix locking = no
inherit acls = yes
drive cache flush = yes