SUMMARY: Size of semaphore data structures

From: Daniel Lorenzini (lorenzd@gcm.com)
Date: Fri Feb 25 2000 - 15:22:56 CST


Greetings,

Regarding my question about the sizes of semaphore data structures, I
would like to thank the following people who took the time to respond:

        Bill Hathaway <wdh@perfectorder.com>
        "Luis Payano" <lpayano@baydatacon.com>
        Johnie Stafford <stafforj@core.afcc.com>
        Robert Alexander <Robert.Alexander@premier-systems.net>
        "GC-Richardson, Chris" <chrisrichardson@nfisg.com>
        Vince Taluskie <taluskie@jump.net>

I apologize for not asking my question clearly enough. What I really
was trying to get at was the amount of kernel memory that was
associated with the various semaphore perameters so that I could judge
how big to make them without using too much memory. So some of the
responses were to use ipcs and sysdef, which show how the parameters
are configured or used, but not how much memory they take up.
Nevertheless, the list comes through and Vince Taluskie directed me to

http://www.sunworld.com/sunworldonline/swol-10-1997/swol-10-insidesolaris.html

which has lots of information. Vince also added the following comments
regarding some errors in the document:

>> This is a very helpful article - unfortunately the formula is somewhat
>> incorrect and is off by a factor of 2.
>>
>> semid_ds is 84 bytes
>> undo is 8 bytes
>> sem_undo is 16 bytes
>> undo record is 8 bytes
>>
>> The formula they quote:
>>
>> seminfo.semusz = (sem_undo structure size) + (semume * sem_undo structure
>> size)
>>
>> in the article is not correct - they want to use sizeof(undo) = 8
>> bytes rather than sizeof(sem_undo) which is 16 bytes.
>>
>> seminfo.semusz = 16 + semume * 8 bytes
>>
>> undo structures are the biggest component of the amount of kernel memory
>> needed for semaphores.

Also mentioned was Adrian Cockcroft's "Sun Performance and Tuning",
which didn't have the numbers I was looking for, but was useful for
getting at kernel memory sizes. Thanks to all.

Regards,

Dan Lorenzini Greenwich Capital Markets
dal@gcm.com 600 Steamboat Road
203-625-6088 Greenwich, CT 06830

------------------------------------------------------------------------

Original post:

> I am trying to find out the size of data structures associated with
> semaphores (Solaris 2.6). Searching through docs.sun.com I can find
> the names and defaults of the various parameters (seminfo_semmap,
> seminfo_semmni, etc.), and suggested values for a particular machine.
> However, I can not find the resource usage for the structures
> themselves. I assume this is documented somewhere. Does anyone know
> what these values are or can direct me to the documentation that gives
> resource usage for these parameters? I would appreciate it. Thanks.
>
**********************************************************************
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
************************************************************************



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:03 CDT