Professional Web Applications Themes

how to change process limits? - FreeBSD

Hi The following is aon 5.3-RELEASE-p5 If I do a limits command I get # limits Resource limits (current): cputime infinity secs filesize infinity kb datasize 524288 kb stacksize 65536 kb coredumpsize infinity kb memoryuse infinity kb memorylocked infinity kb maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kb # However, login.conf has (and no other classes defined) default:\ :passwd_format=md5:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ :datasize=unlimited:\ :stacksize=unlimited:\ :memorylocked=unlimited:\ :memoryuse=unlimited:\ :filesize=unlimited:\ :coredumpsize=unlimited:\ :openfiles=unlimited:\ :maxproc=unlimited:\ :sbsize=unlimited:\ :vmemoryuse=unlimited:\ :priority=0:\ :ignoretime:\ :umask=022: ------ I am wondering where the datasize and stacksize get set. These ...

  1. #1

    Default how to change process limits?

    Hi

    The following is aon 5.3-RELEASE-p5

    If I do a limits command I get

    # limits
    Resource limits (current):
    cputime infinity secs
    filesize infinity kb
    datasize 524288 kb
    stacksize 65536 kb
    coredumpsize infinity kb
    memoryuse infinity kb
    memorylocked infinity kb
    maxprocesses 5547
    openfiles 11095
    sbsize infinity bytes
    vmemoryuse infinity kb
    #

    However, login.conf has (and no other classes defined)


    default:\
    :passwd_format=md5:\
    :copyright=/etc/COPYRIGHT:\
    :welcome=/etc/motd:\
    :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
    :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
    /usr/local/bin /usr/X11R6/bin ~/bin:\
    :nologin=/var/run/nologin:\
    :cputime=unlimited:\
    :datasize=unlimited:\
    :stacksize=unlimited:\
    :memorylocked=unlimited:\
    :memoryuse=unlimited:\
    :filesize=unlimited:\
    :coredumpsize=unlimited:\
    :openfiles=unlimited:\
    :maxproc=unlimited:\
    :sbsize=unlimited:\
    :vmemoryuse=unlimited:\
    :priority=0:\
    :ignoretime:\
    :umask=022:

    ------

    I am wondering where the datasize and stacksize get set. These have
    limits when listed with "limits" but they do not appear to be getting
    set through login as the login.conf has unlimitged.

    I have looked at the output of sysctl -a with grep for various things
    (limit, datasize, 512 524288 etc and not seen any obvious candidates)

    I am trying to run stuff from the Coroner's Toolbox and am getting "Out
    of memory!" and so would like to try this with some adjusted process
    values.

    Any help on where these get set and how to change them would be
    appreciated.

    Thanks
    Chad

    Chad Guest

  2. #2

    Default how to change process limits?

    Hi

    The following is aon 5.3-RELEASE-p5

    If I do a limits command I get

    # limits
    Resource limits (current):
    cputime infinity secs
    filesize infinity kb
    datasize 524288 kb
    stacksize 65536 kb
    coredumpsize infinity kb
    memoryuse infinity kb
    memorylocked infinity kb
    maxprocesses 5547
    openfiles 11095
    sbsize infinity bytes
    vmemoryuse infinity kb
    #

    However, login.conf has (and no other classes defined)


    default:\
    :passwd_format=md5:\
    :copyright=/etc/COPYRIGHT:\
    :welcome=/etc/motd:\
    :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
    :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
    /usr/local/bin /usr/X11R6/bin ~/bin:\
    :nologin=/var/run/nologin:\
    :cputime=unlimited:\
    :datasize=unlimited:\
    :stacksize=unlimited:\
    :memorylocked=unlimited:\
    :memoryuse=unlimited:\
    :filesize=unlimited:\
    :coredumpsize=unlimited:\
    :openfiles=unlimited:\
    :maxproc=unlimited:\
    :sbsize=unlimited:\
    :vmemoryuse=unlimited:\
    :priority=0:\
    :ignoretime:\
    :umask=022:

    ------

    I am wondering where the datasize and stacksize get set. These have
    limits when listed with "limits" but they do not appear to be getting
    set through login as the login.conf has unlimitged.

    I have looked at the output of sysctl -a with grep for various things
    (limit, datasize, 512 524288 etc and not seen any obvious candidates)

    I am trying to run stuff from the Coroner's Toolbox and am getting "Out
    of memory!" and so would like to try this with some adjusted process
    values.

    Any help on where these get set and how to change them would be
    appreciated.

    Thanks
    Chad

    _______________________________________________
    org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to
    "org"

    Chad Guest

  3. #3

    Default Re: how to change process limits?

    In the last episode (Mar 09), Chad Leigh -- Shire.Net LLC said: 

    I believe those are extra-hard limits enforced by the kernel. You can
    raise them by adding this to /boot/loader.conf:

    kern.maxdsiz=2147483648
    kern.maxssiz=2147483648

    Then you can edit login.conf to set whatever soft and hard limits you
    want (remember to run "cap_mkdb /etc/login.conf" when you're done).
    I'm not exactly sure why those limits are boot-time tunables as opposed
    to regular sysctls, or why they exist at all.

    --
    Dan Nelson
    com
    Dan Guest

  4. #4

    Default Re: how to change process limits?


    On Mar 10, 2005, at 2:46 PM, Dan Nelson wrote:
     
    >
    > I believe those are extra-hard limits enforced by the kernel. You can
    > raise them by adding this to /boot/loader.conf:
    >
    > kern.maxdsiz=2147483648
    > kern.maxssiz=2147483648[/ref]

    Should I be able to do a sysctl to look at their current values? On my
    5.3 and my 4.9 systems, there are no kern.max%siz listed at all (% = d
    or s) to inspect.

    thanks
    Chad

    Chad Guest

  5. #5

    Default Re: how to change process limits?

    In the last episode (Mar 10), Chad Leigh -- Shire.Net LLC said: 
    > >
    > >I believe those are extra-hard limits enforced by the kernel. You can
    > >raise them by adding this to /boot/loader.conf:
    > >
    > >kern.maxdsiz=2147483648
    > >kern.maxssiz=2147483648[/ref]
    >
    > Should I be able to do a sysctl to look at their current values? On my
    > 5.3 and my 4.9 systems, there are no kern.max%siz listed at all (% = d
    > or s) to inspect.[/ref]

    You would be able to if they were sysctls, but they're just tunables.
    You can see what tunables are set by running "kenv", but that only
    shows entries that you or the kernel have explicitly set. Personally,
    I think all the TUNABLE_*_FETCH variables in /sys/kern/subr_parm.c
    should be sysctls with the CTLFLAG_TUN flag set, so they are visible as
    both tunables and sysctls. Some currently have sysctl nodes created in
    other places (kern.maxfiles is in /sys/kern/kern_descrip.c, for
    example), but many don't.

    --
    Dan Nelson
    com
    Dan Guest

  6. #6

    Default Re: how to change process limits?


    On Mar 11, 2005, at 8:21 AM, Dan Nelson wrote:
     
    >>
    >> Should I be able to do a sysctl to look at their current values? On
    >> my
    >> 5.3 and my 4.9 systems, there are no kern.max%siz listed at all (% = d
    >> or s) to inspect.[/ref]
    >
    > You would be able to if they were sysctls, but they're just tunables.
    > You can see what tunables are set by running "kenv", but that only
    > shows entries that you or the kernel have explicitly set. Personally,
    > I think all the TUNABLE_*_FETCH variables in /sys/kern/subr_parm.c
    > should be sysctls with the CTLFLAG_TUN flag set, so they are visible as
    > both tunables and sysctls. Some currently have sysctl nodes created in
    > other places (kern.maxfiles is in /sys/kern/kern_descrip.c, for
    > example), but many don't.[/ref]

    OK, thanks! I learn something new every day. I was not aware if
    sysctls being different...

    best regards
    Chad

    Chad Guest

Similar Threads

  1. Replies: 0
    Last Post: October 18th, 09:18 PM
  2. Replies: 1
    Last Post: February 3rd, 09:30 AM
  3. videocard change stops W3K server boot process
    By Nina in forum Windows Server
    Replies: 3
    Last Post: July 31st, 03:23 PM
  4. Replies: 2
    Last Post: October 10th, 07:20 AM
  5. change process name
    By Uros in forum PHP Development
    Replies: 0
    Last Post: July 16th, 02:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139