ctdb memory usage

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Jan 8 02:02:13 MST 2010

On Fri, Jan 08, 2010 at 09:55:44AM +1100, ronnie sahlberg wrote:
> It would be _VERY_ nice to have something similar for samba.

There are two problems with this:

smbd is multi-process, so it is not trivial to catch all
debug messages from all processes in a central store. It
could be done via some IPC mechanism like a daemon catching
the messages via pipes or in a central tdb.

The second problem: Generating debug level 10 logs is not
free CPU-wise. For example, right now we generate timestamps
for every message, and the sprintf calls are not always
trivial. The DEBUG macro in Samba, ugly as it is, makes sure
that the arguments are only evaluated when the corresponding
debug message is actually needed. This way we make sure that
for example sid_to_fstring calls are not even done when the
debug level is too low. With lazy calling conventions like
haskell has them this would be easier, but the call-by-value
nature of C makes this ugly macro necessary.

If you have ideas how to get around these two problems,
please let me know!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100108/8511451c/attachment.pgp>

More information about the samba-technical mailing list