Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Dec 2000 07:15:45 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        float@firedrake.org
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: LINT vs. ipcs
Message-ID:  <20001222071545.V54775@gsmx07.alcatel.com.au>
In-Reply-To: <bulk.71182.20001221102334@hub.freebsd.org>; from owner-freebsd-hackers-digest@FreeBSD.ORG on Thu, Dec 21, 2000 at 10:23:34AM -0800
References:  <bulk.71182.20001221102334@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 20 Dec 2000 20:05:58 +0000, void <float@firedrake.org> wrote"
>LINT and the ipcs command seem to disagree on some points, like the
>meaning of shmall (bytes vs. pages).

In all such cases, the source code is the ultimate reference.

>  options         SHMALL=1025     # max amount of shared memory (bytes)
> vs.
>  shmall:    1024 (max amount of shared memory in pages)

SHMALL is in pages.  The comment in LINT is incorrect (this has been
corrected in -CURRENT).

>Also, some values are very different:

I'm not sure that the values in LINT are supposed to reflect the
default values in the system.  ipcs will report the actual values.
The default values can be found in /sys/kern/sysv_{shm,sem}.c

>What I really want to know is, what do all these LINT variables mean?

There is not a great deal of documentation about them in FreeBSD -
only 1-line descriptions in <sys/sem.h> and <sys/shm.h>, as well as
the source code mentioned above.  In some cases, the explanations have
been expanded in NOTES (the replacement for LINT) in -CURRENT.  I've
expanded the semop(2) and semctl(2) man pages in kern/12014.

If you have access to other systems, try the Intro(2) man page on
any System V OS (eg Solaris).

>  I have a user who needs more semaphores and shm segments
>configured, and I want to make sure I tune the right ones.

SysV semaphores are allocated in groups, where each group can contain
multiple semaphores.  SEMMNI defines the (system wide) number of
semaphore groups and SEMMNS defines the (system wide) total number of
semaphores in all groups.  SEMMSL is a per-uid limit on the number
of semaphores.

SHMMNI defines the system-wide limit on shm segments and SHMSEG defines
the per-process limit on shm segments.

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001222071545.V54775>