[Samba] Possible memory leak in

Matt Oursbourn moursbourn at gmail.com
Sun Sep 12 19:48:41 UTC 2021

My setup comes from a complete novice approach to linux and network sharing
as I have only ever used windows.

This is my process for getting the computers up and running so I can plot
chia.  This is the complete process from a computer with no OS to plotting
chia and getting the large samba process in memory.

   - Install some form of linux (ubuntu, mint, pop, ect.) I have only been
   using linux for a month so I have been exploring.
   - do apt update, apt upgrade
   - install samba
   - copy these lines into smbd.comf
      - client min protocol = NT1
      - server min protocol = NT1
      - usershare owner only = false
      - force user = moursbourn  (just because every computer I have is
      logged into this username, and it stopped the permission issues I was
      - if the computer is the server
      - create /mnt/storage
      - sudo chmod -R 777 /mnt/storage
      - *right click on the storage folder in the UI and share it from
      there. *
      - Install duf, htop, ssh, iftop
      - Recently, I have added mergerfs onto the server as well.
   - on the client (plotter)
   - sudo mkdir /mnt/chiaPlots
      - sudo chmod -R 777 /mnt/chiaPlots
      - sudo mount -t cifs -o
      username=moursbourn,file_mode=0777,dir_mode=0777 //
      - install mad max chia plotter and start plotting to /mnt/chiaPlots

What I have noticed from looking at the Processes tab in System Monitor on
the server:
The server is on a 10GB network.  When I start a chia plot (~106Gb file)
transfer from a client computer that is also connected to the 10Gb network
the transfer starts off at ~1000Mb/s until the samba process is larger than
32.5GiB. The largest I have seen is 39GiB.   The transfer rate then drops
down to the hdd write speed of ~170Mb/s.  That samba process never gets any
smaller than 32.5GiB.  Even after the transfer is complete.

If a client computer that is connected with a 1Gb nic starts a transfer,
another samba process is spawned. That transfer stays around 130Mb/s to 150
Mb/s and the samba process grows to ~9GiB. After that transfer is complete
the process drops down to ~5MiB.

After a day of plotting and transferring ~100 plot files to the server from
those two computers there are still only the two samba processes running.
Plotting has been stopped for several hours  and one is 32.5Gib, the other
is 4.9Mib.

The only other computer connected to the server is a windows 10 computer
running a farmer with the servers network share connected to it that would
be checking the plots as part of the chia farming process.


On Sun, Sep 12, 2021 at 1:44 AM Rowland Penny via samba <
samba at lists.samba.org> wrote:

> On Sat, 2021-09-11 at 12:50 -0700, Matt Oursbourn wrote:
> > All I do is add these lines to smb.comf under global.:
> > client min protocol = NT1
> > server min protocol = NT1
> > usershare owner only = false
> > force user = moursbourn
> >
> > I do not know what the NT1 stuff does other than it helped windows
> > see the share.
> It allows the use of SMBv1, which is required for network browsing.
> >
> > Here is the output:
> >
> > Load smb config files from /etc/samba/smb.conf
> > Loaded services file OK.
> > Weak crypto is allowed
> >
> > Server role: ROLE_STANDALONE
> >
> > # Global parameters
> > [global]
> >         client min protocol = NT1
> >         log file = /var/log/samba/log.%m
> >         logging = file
> >         map to guest = Bad User
> >         max log size = 1000
> >         obey pam restrictions = Yes
> >         pam password change = Yes
> >         panic action = /usr/share/samba/panic-action %d
> >         passwd chat = *Enter\snew\s*\spassword:* %n\n
> > *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
> >         passwd program = /usr/bin/passwd %u
> >         server min protocol = NT1
> >         server role = standalone server
> >         unix password sync = Yes
> >         usershare allow guests = Yes
> >         usershare owner only = No
> >         idmap config * : backend = tdb
> >         force user = moursbourn
> Just about the only problem (and it is probably only a slight problem)
> is the use of 'force user', it is really only meant to be in a share
> and I cannot understand why you added it.
> You also do not seem to have any shares apart from the 'homes' share,
> what are you copying the data to/from ?
> Rowland
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list