Fwd: Help Needed: Samba share slow to query not existing files
rpenny at samba.org
Wed Jan 20 17:55:51 UTC 2021
On 20/01/2021 17:37, Jônatas Hudler via samba-technical wrote:
> Hello everyone,
> *(First mail in this mailing list, so take it easy if I'm infringing any
> good manners here)*
Welcome to the list 😁
Unfortunately it is really the wrong list, you should have posted to the
samba mailing list, not samba technical.
Having said, lets try to help you.
> In a samba share we have a directory with lots of files - binaries and
> resources to run our ERP application (around 20K entries).
> The application is taking too long to load. The found reason is that the
> application tries to load several files in a trial/error fashion, looking
> for extensions in a particular order (e.g: file.dll, file.lbr, file.gnt,
> file.int). Many of these files are not required and doesn't even exist.
> Every "not found" hit take ~0.2 seconds. And there are lots of these events.
> The thing is that apparently samba is not caching this result. My guess is
> that every new not existing file open request causes a full directory's
> entries lookup.
> If I run this code (in a Windows Command Prompt) in this samba share, it
> takes considerable time, whereas in a native Windows share it is
> for /L %i in (1,1,50) do @dir \\server\share\not_existing.txt >nul
> Anything that can be done?
Two things might help, stop using a Samba AD DC as a fileserver
> Current smb.conf content:
> # Global parameters
> netbios name = ***omitted***
> realm = ***omitted***
> server role = active directory domain controller
> workgroup = ***omitted***
> idmap_ldb:use rfc2307 = yes
> dns forwarder = ***omitted***
The other is to remove everything (that you appear to have added) from
here onward from your DC's smb.conf
> vfs objects = acl_xattr
> map acl inherit = yes
> store dos attributes = yes
> aio read size = 1
> aio write size = 1
> aio write behind = true
> socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535
> read raw = yes
> write raw = yes
> max xmit = 65535
> dead time = 0
> getwd cache = no
> max connections = 5000
> time server = yes
> Environment Details:
> - CentOS Linux release 7.6.1810 (Core)
> - Samba version 4.8.3
> - Application Runtime: Microfocus NetExpress (Cobol) v3.1
Where did you get the Samba packages from ? You normally cannot
provision the Centos Samba packages as a DC, also Samba 4.8.3 is a bit
old (the latest version is 4.13.3).
More information about the samba-technical