[Patch] Stop smbprofile.tdb from growing when level is set to 0
dshachter at nasuni.com
Wed Jan 9 18:24:51 UTC 2019
From: Volker Lendecke <Volker.Lendecke at SerNet.DE>
Sent: Wednesday, January 9, 2019 12:31 PM
To: Dylan Stephano-Shachter
Cc: samba-technical at lists.samba.org
Subject: Re: [Patch] Stop smbprofile.tdb from growing when level is set to 0
On Wed, Jan 09, 2019 at 03:24:28PM +0000, Dylan Stephano-Shachter wrote:
> How does this look?
> Sorry wrong patch here is the correct one
I'm sorry, in the first round I just took a brief look and saw the
easy formal things I wanted to comment on. Now for the "real"
The first hunk in smbprofile_dump can be changed: I think you could do
an early return from the function if both variables are false. You
could save the getrusage and the other tdb calls if there's nothing to
store. I haven't tested that version, but I don't see why we should
look at tdb at all.
I think we should be able to just discard the second hunk.
smbprofile_cleanup only ever writes into one record, and I think we
should keep that logic untouched. It might be the case that the parent
smbd (or rather the cleanupd for that matter) has different profiling
settings than the children. The cleanupd does not contribute to
profiling itself at all, but it should still collect everything from
the smbds that have exited.
What do you think?
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: 0551-370000-0, mailto:kontakt at sernet.de
Gesch.F.: Dr. Johannes Loxen und Reinhild Jung
AG Göttingen: HR-B 2816 - http://www.sernet.de
I believe we still need the change in smbprofile_cleanup. The problem is whenever a new connection is created it creates a new process. Thus a new unique key for tdb_store and so it will continue to grow.
Am I understanding this correctly?
This e-mail message and all attachments transmitted with it may contain privileged and/or confidential information intended solely for the use of the addressee(s). If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message, all attachments and all copies and backups thereof.
More information about the samba-technical