Samba Memory usage

Hy there,

I have a brand new UCS that is role as a slave and i see that is consume a lot of memory, see the attach pic.

Is that normal??

Sorry asking again, but is this samba memory usage normal?

After some time i will always have too process eating a lot of ram, i don’t think this is normal, because if i kill them and the restart the services, the memory decrease a lot a keep low for some time.

Thanks

This looks normal to me, I have 3 UCS File Servers all are using a lot of memory. It looks like your UCS only has 3GB of memory, this is a bit low for a file server at least with a lot of users, which is what I am guessing is going on. You might have to add memory depending on your number of users and how much reads/writes they are doing. All my files servers are about 16GB, and with 25 users they run at about 25%. I’d never run any UCS with less than 8GB ram regardless of what it was being used for. Just throwing that nugget out there.

I don’t think that is normal.
I kill two samba process, the two with more memory and cpu time, and after that the memory use is completely low. Check the pic.

And about the users, at the moment i don’t have users using the servers yet… so only the 4GB, when the servers will be in prodution i will have about 100 users, but i will have 5 or 6 slave servers 1 por each local site… if i must have 5 or 6 servers with 8gb of ram will be a no go.

I may not have full insight in all usage scenarios but several gigs of mem for an unused application seems to be too much.

Well each usage scenario is unique. However a UCS Server of any mode with only 4GB of RAM seems under powered for anything to me. Our standard minimum UCS server is 8GB RAM, and that is the low end.
Our high end is our KVM Cluster which all 3 nodes have 196GB, and the UVMM server has 92GB.

In our testing of UCS really didn’t perform well under 8GB RAM in a physical server, now as a VM 4 GB worked well for most apps/modes.

Not sure if your file server is a VM or physical.

Another thing is we avoid putting DC and File Server on the same box. I think this is best practice. Depending on other services the DC provided you might be hitting a resource limit somewhere.

My main goal is testing to know if will be possible migrate ours currents servers from win2003 to UCS, actually we have 3 domains, eachs with 2gb of ram, and work well, bu in windows.

The pics i sent is from a virtual server with 6gb of ram, with only the services running, and one client pc to try logins/group policies, so i don’t think have much samba process running and one of them eating 2GB could be normal, so i asked it.

I can try that aproach too, split DC and fileshare, in fact i’m still try to find a solution to have the fileshare remote and them backup it up to central location. i can’t find nothing in UCS to do it…

Spltting DC and fileservices is recommended according to DOC: 9.2.2.2. File services.

What i planned was:
1 site + 4 remote locals

MAIN -> 1 DC server plus fileserver for local users
REMOTE1 -> 1 slave server plus fileserver for local users
REMOTE2 -> 1 slave server plus fileserver for local users
REMOTE3 -> 1 slave server plus fileserver for local users
REMOTE4 -> 1 slave server plus fileserver for local users

Then search a solution to make the local folders from remote sites sync with MAIN and after that backup MAIN (this server is running in xenserver and the backup will be a full snapshot)

Do you suggest from that file i should have two servers for each local?

Not necessarily. I just quoted the docs. There are a lot known single server instances which are doing AD-DC as well as File Services on the same machine. As always it depends on the usage scenario which includes users, amount of data and usage profile.

As long as we dont know where the memory profile of your S4 instances is originated I would not derive any conclusions especially for deployment options.

Ok.

The users will be about 100, the main use will be fileshare and AD for computers logins, and Windows 2008 TErminal Server users logins.

How can i debug try more information about this? Yesterday i restart samba, then memory goes down, for some time, after goes to the roof again.

It may be hard to analyze this without deeper knowledge of the mechanisms how applications in Linux are handling memory and possible sources of memory leaks. If you want to do this you can find enough resource on the internet by searching for “linux memory usage” “linux memory leak”.
From the view-point of normal administration it may be more useful to see if there are any hints (read: errors) in the logs of the system or the application.

The problem persist!!!

CPU

29879 root 70.7 % /usr/sbin/samba -D 29880 root 27.1 % /usr/sbin/samba -D 29877 root 0.7 % /usr/sbin/samba -D 29883 root 0.6 % /usr/sbin/samba -D 29874 root 0.1 % /usr/sbin/samba -D 29872 root 0.0 % /usr/sbin/samba -D 29873 root 0.0 % /usr/sbin/samba -D 29876 root 0.0 % /usr/sbin/samba -D 29878 root 0.0 % /usr/sbin/samba -D 29881 root 0.0 % /usr/sbin/samba -D 29882 root 0.0 % /usr/sbin/samba -D 29884 root 0.0 % /usr/sbin/samba -D

Memory

29880 root 2.76 GB /usr/sbin/samba -D 29879 root 696.43 MB /usr/sbin/samba -D 29874 root 490.50 MB /usr/sbin/samba -D 29883 root 490.01 MB /usr/sbin/samba -D 29877 root 486.43 MB /usr/sbin/samba -D 29884 root 485.95 MB /usr/sbin/samba -D 29872 root 485.77 MB /usr/sbin/samba -D 29873 root 485.77 MB /usr/sbin/samba -D 29876 root 485.77 MB /usr/sbin/samba -D 29878 root 485.77 MB /usr/sbin/samba -D 29881 root 485.77 MB /usr/sbin/samba -D 29882 root 485.77 MB /usr/sbin/samba -D

any help to solve debug the problem is welcome

Nothing in /var/log or /var/log/samba?
I’d also attach strace to these processes. Hard to read when doing it for the first time but useful when trying to understand what a process is doing.

From log.samba i only have warning from IPC$

[2015/09/11 17:03:21.901817, 0, pid=29884] ../lib/util/util_runcmd.c:324(samba_runcmd_io_handler) /usr/sbin/samba_dnsupdate: NOTE: Service IPC$ is flagged unavailable. [2015/09/11 17:13:21.959851, 0, pid=29884] ../lib/util/util_runcmd.c:324(samba_runcmd_io_handler) /usr/sbin/samba_dnsupdate: WARNING: No path in service IPC$ - making it unavailable! [2015/09/11 17:13:21.959909, 0, pid=29884] ../lib/util/util_runcmd.c:324(samba_runcmd_io_handler) /usr/sbin/samba_dnsupdate: NOTE: Service IPC$ is flagged unavailable. [2015/09/11 17:13:21.995842, 0, pid=29884] ../lib/util/util_runcmd.c:324(samba_runcmd_io_handler) /usr/sbin/samba_spnupdate: WARNING: No path in service IPC$ - making it unavailable! [2015/09/11 17:13:21.995874, 0, pid=29884] ../lib/util/util_runcmd.c:324(samba_runcmd_io_handler)

How can i do a trace? the process start automatic after i run service samba restart

The message regarding IPC$ is most likely not the cause, see WARNING: No path in service IPC$ - making it unavailable!.
It rather looks like the mentioned tool is called very (!) frequent. I’d revise the DNS-setup.

strace can attach to a running process with “-p PID” but I guess the informations will be likely the same as in the logs.

I havent enough time to go in depth today, my usual steps are using a search engine with keywords from the logs in case I have no idea.

Best Regards,
Dirk

I have been doing that the last days, but i can’t find anything usefull.

Only memory leak but from old versions of samba4

Thanks for you help

Process 12405 attached - interrupt to quit
^CProcess 12405 detached
% time seconds usecs/call calls errors syscall


19.51 0.000185 0 2022 sendto
16.98 0.000161 0 10340 fcntl
11.50 0.000109 0 6037 epoll_ctl
7.91 0.000075 0 2012 getsockopt
6.75 0.000064 0 1007 ioctl
6.65 0.000063 0 3020 epoll_wait
4.11 0.000039 0 3033 close
3.90 0.000037 0 1007 munmap
3.59 0.000034 0 1020 read
3.59 0.000034 0 3018 recvmsg
3.38 0.000032 0 1007 bind
3.27 0.000031 0 1007 recvfrom
3.16 0.000030 0 5038 gettimeofday
2.64 0.000025 0 1007 mmap
2.32 0.000022 0 1006 getsockname
0.74 0.000007 0 2023 socket
0.00 0.000000 0 1010 open
0.00 0.000000 0 1007 fstat
0.00 0.000000 0 10 poll
0.00 0.000000 0 28 brk
0.00 0.000000 0 2 mremap
0.00 0.000000 0 1016 connect


100.00 0.000948 46677 total
root@CCMDC01:~# strace -c -p 12405
Process 12405 attached - interrupt to quit
^CProcess 12405 detached
% time seconds usecs/call calls errors syscall


72.69 0.014227 1 17368 epoll_wait
5.67 0.001110 0 59574 fcntl
3.31 0.000647 0 11635 sendto
2.76 0.000540 0 17440 close
2.50 0.000490 0 17367 recvmsg
2.47 0.000483 0 34734 epoll_ctl
2.03 0.000398 0 28976 gettimeofday
1.69 0.000330 0 11578 getsockopt
1.28 0.000250 0 11635 socket
0.84 0.000164 0 5846 connect
0.83 0.000162 0 5805 open
0.76 0.000148 0 5862 read
0.67 0.000131 0 5789 munmap
0.54 0.000105 0 5789 mmap
0.52 0.000102 0 5789 getsockname
0.48 0.000094 0 5789 fstat
0.45 0.000088 0 5789 ioctl
0.34 0.000066 0 5789 bind
0.19 0.000037 0 5789 recvfrom
0.00 0.000000 0 57 poll
0.00 0.000000 0 150 brk
0.00 0.000000 0 11 mremap


100.00 0.019572 268561 total

Could be this

samba-tool drs showrepl

DC=ccm,DC=local
Default-First-Site-Name\SRVDC01 via RPC
DSA object GUID: 3c740b97-cccc-48cb-8c51-866c7afd018b
Last attempt @ Fri Sep 11 17:59:02 2015 WEST failed, result 1311 (WERR_NO_LOGON_SERVERS)
95537 consecutive failure(s).
Last success @ NTTIME(0)

The srvdc01 was the windows domains controller i remove after ad takeover…

Ok can mark the post as solved.

From what i can figure out the problem is with a server demoted that is still in samba ad and samba is trying replicate the information to that server too.

After remove the server entrys from active directory and reboot the samba stop from eating memory.

I think the problem is in active directory takeover that because some reason don’t clean all the information.

1 Like
Mastodon