Stuart Henderson <[email protected]> writes:
Hi Stuart,
>>>> Also ps(1) output seems to confirm that named process limit is the
>>>> entire memory of the machine.
>>>>
>>>> root@openbsd: /var/named/tmp # ps -ax -v | head
>>>> PID STAT TIME SL RE PAGEIN VSZ RSS LIM TSIZ %CPU %MEM
>>>> COMMAND
>>>> 31077 S 277:43.57 0 127 15 608272 610340 8145988 1292 10.6 7.3
>>>> /usr/sbin/named
>>>
>>> lim is "memory" not "datasize".
>>>
>>> Considering the amount of memory this process is actually using, it
>>> looks to me more like it's being run with a 512MB datasize limit,
>>> so perhaps it's not running under the expected 'daemon' class.
>>>
>>
>> Thanks Stuart, this seems reasonable. How can I find under what class
>> the named process is? Study the sources?
>
> I'm not sure if you can directly identify this after the fact,
> but this is determined by how it was started.
>
> If started by a user logged-in directly as root, it should be
> using the root user's class, by default 'daemon'.
>
> As per rc.d(8) if started by the normal system startup scripts,
> either at boot or manually afterwards, the class will be 'daemon'
> *unless* a class with the name of the daemon (in this case "named")
> exists in login.conf, in which case that will be used instead.
>
> If restarted at runtime *without* using the rc.d scripts, e.g.
> 'sudo pkill named; sudo named' then it would use the limits that
> applied to the user you were logged in as *at the time you logged
> in*. Note that if you change login.conf while you're logged in
> you will need a totally new login before the new limits
> apply. (In the case of ssh multiplexing, the old master process
> will need to go away too, not just your shell). Also note that
> people using login.conf.db will need to update it (I would not
> normally recommend login.conf.db though).
Thanks for the good explanations.
I always start bind either at system boot, or manually under the root
user using the rc.d script. Therefore the class should be "daemon"
according to your explanations and from what I see in
/etc/rc.d/rc.subr.
However it seems that the process is running with 512MB datasize. Which
led me to this comment in /etc/login.conf:
# The default values
# To alter the default authentication types change the line:
# :tc=auth-defaults:\
# to be read something like: (enables passwd, "myauth", and activ)
# :auth=passwd,myauth,activ:\
# Any value changed in the daemon class should be reset in default
# class.
#
So the value in daemon is
daemon:\
:ignorenologin:\
:datasize=infinity:\
:maxproc=infinity:\
:openfiles-cur=128:\
:stacksize-cur=8M:\
:localcipher=blowfish,8:\
:tc=default:
while
default:\
:path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin
/usr/local/bin:\
:umask=022:\
:datasize-max=512M:\
:datasize-cur=512M:\
:maxproc-max=256:\
:maxproc-cur=128:\
:openfiles-cur=128:\
:stacksize-cur=4M:\
:localcipher=blowfish,6:\
:ypcipher=old:\
:tc=auth-defaults:\
:tc=auth-ftp-defaults:
could it be that datasize-max prevails from "default"?
I think I will add a "named" section in login.conf after I study its man
page ;-)
What do you think?
Regards,
Kostas
--
Kostas Zorbadelos
twitter:@kzorbadelos http://gr.linkedin.com/in/kzorba
----------------------------------------------------------------------------
() www.asciiribbon.org - against HTML e-mail & proprietary attachments
/\