How to tweak the limit of RAM for a daemon started by a user?

2009-11-30 Thread Matthew Young
Hello,

Ive been reading at man login.conf and specifically the parameters for
  memoryuse . I have raised these for 1024MB for the specific user in
question as per blow


console:\
:ignorenologin:\
:datasize=infinity:\
:maxproc=infinity:\
:memoryuse=1024
:openfiles-cur=128:\
:stacksize-cur=8M:\
:localcipher=blowfish,8:\
:tc=default:

However, when it starts up it complains its unable to allocate more
then 512 of memory. even if I start it as root it gives the same
result.

What is the best way to debug this, and am  raising the memory
allocation correctly so that the user can run a daemon that can use
1GB of ram?

Thank you

Matt



Re: How to tweak the limit of RAM for a daemon started by a user?

2009-11-30 Thread Otto Moerbeek
On Mon, Nov 30, 2009 at 11:55:09AM -0600, Matthew Young wrote:

 Hello,
 
 Ive been reading at man login.conf and specifically the parameters for
   memoryuse . I have raised these for 1024MB for the specific user in
 question as per blow
 
 
 console:\
 :ignorenologin:\
 :datasize=infinity:\
 :maxproc=infinity:\
 :memoryuse=1024
 :openfiles-cur=128:\
 :stacksize-cur=8M:\
 :localcipher=blowfish,8:\
 :tc=default:
 
 However, when it starts up it complains its unable to allocate more
 then 512 of memory. even if I start it as root it gives the same
 result.
 
 What is the best way to debug this, and am  raising the memory
 allocation correctly so that the user can run a daemon that can use
 1GB of ram?

memoryuse only limits the amount of memory in core. datasize if the
paramater you are looking for.

First thing you want to check is if the user actually is in the
proper login class, see userinfo(8).

-Otto



Re: How to tweak the limit of RAM for a daemon started by a user?

2009-11-30 Thread Joachim Schipper
On Mon, Nov 30, 2009 at 11:55:09AM -0600, Matthew Young wrote:
 Hello,
 
 Ive been reading at man login.conf and specifically the parameters for
   memoryuse . I have raised these for 1024MB for the specific user in
 question as per blow
 
 
 console:\
 :ignorenologin:\
 :datasize=infinity:\
 :maxproc=infinity:\
 :memoryuse=1024
 ^^^
 :openfiles-cur=128:\
 :stacksize-cur=8M:\
 :localcipher=blowfish,8:\
 :tc=default:
 
 However, when it starts up it complains its unable to allocate more
 then 512 of memory. even if I start it as root it gives the same
 result.

In addition to Otto's comments, you are missing M:\ here.

Joachim