Sponsored Content
Full Discussion: kernel parameter settings
Top Forums UNIX for Dummies Questions & Answers kernel parameter settings Post 32892 by TioTony on Monday 9th of December 2002 11:10:56 PM
Old 12-10-2002
I don't know exactly what you are looking for but this may help a bit.

SEMMNI - Processes that use semaphores often group all their semaphores together in a set so they can manage them as 1 unit. Sometimes processes will have many sets, but often they only have one. If I remember correctly on Sun, if you request a semaphore you must put it in a set. In other words you cannot have a semaphore and no semaphore set. So semmni defines how many sets the system can allocate at one point in time.

SEMMNS - Here is a very bad joke we have at work: What is a Semaphore? Haulin' stuff. I know it's bad. Really a semaphore is used to ensure your process is the only process updating a piece of data. This is to ensure you and I don't both try to update the same data at the same time. Who would win? SEMMNS defines how many semaphores can be allocated on the system at one time.

One value that is not mentioned below is SEMMAP. This keeps track of unused semaphores. This could cause potential problems for you if you have a high SEMMNS value. Think of semaphores as being resident in one continuous memory space. If Process A requests a semaphore, a chunk of this space is broken off and given to Process A. When Process A is done, in theory it gives the semaphore back to the OS. This isn't always true though. Do an ipcs -a and look for semaphores with "no entry". Anyway, when the chunk is given back to the OS, it's SEMMAP's job to keep track of the available chunks. In this case there would be 2, the one returned from Process A and the rest of the original chunk. Over time the pieces, or fragments, can become numerous. If your semmap value is set to 100 and you end up with 101 fragments, semmap drops 1 because it can only keep track of 100. You do not get that back until you reboot. You can see how this could be a problem over time. In reality, this happens very slowly or never but is something to be aware of if your process requests a semaphore and can't get one.

From memory I do not recall what SEMMSL is. Sorry.

SHMMAX is the largest size one shared memory segment can be. I haven't read the docs for Solaris 9 fully yet as I just installed it on my machine a few weeks ago. Older versions of Solaris would limit this value to 25% of your Real Memory (RAM). So if you had 1 GB of mem, set this to 4G, the largest segment that could ever be allocated on your system is 250 MB. This 25% consists of the total of ALL shared memory segments so your it is not likely you would get 250 MB for 1 process as some will probably be used by another process by the time Oracle comes up. If this is no longer the case in Solaris 9, it leaves room for the concerns RTM mentioned. If Solaris 9 still has the 25% limit, I would not worry much because you are guaranteed to have ~75% of RAM left for 'other stuff'.

SHMMIN should be left at 1. Several pieces of software I have used in the past request shared memory by requesting a segment of size 1, and then releasing it, and asking for a size of 2, etc until it gets to the size it should be. This is a bad implementation in most cases but this way the program can figure out the max segment size it can request based on the last good one it was given. If you have it set higher then 1, the program will request 1 and fail (since it must request at least the minimum). At that point the process will usually fail. I know of no practical reason to change it but others on the forum may. By the way, this is the minimum 'piece' of shared memory a process can request.

SHMMNI is the max number of shared memory segments that can exist on the box at one time. It works similar to the semaphore concept where thier is one continuous memory space for all the shared memory. In your case you are saying it is OK to break this up into no more then 100 pieces.

SHMSEG says a given process can only reques X (10 in your case) shared memory segments. For a multi-process piece of software like Oracle, it could be possible to get more since each process can have 10. Oracle in general will have 1 large one and sometimes a few smaller ones.

The examples you have look fine. You just add them to the end of the /etc/system file and reboot for them to take affect. If nothing else is running on the system you should be fine.

Hope this help someone if it does not help you.
TioTony
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

kernel parameter

Hi all How to change the system parameter (kernel Parameter) in sun solaris..i wan't to increase the maximum no of user processs.i found it frm sysdef command that it has a value of 3048 i wan't to increase it as smtime while forking a new proceess it,s giving error max limit of user process... (1 Reply)
Discussion started by: Prafulla
1 Replies

2. UNIX for Dummies Questions & Answers

kernel settings

Would someone please help explain what the following kernel settings indicate on HP 11.00. Thanks Kristian. Parameter Value maxuprc 10156 nfile 65430 semmni 45185 semmnu 20236 semmns 45315 shmmni 18264 (1 Reply)
Discussion started by: kristian
1 Replies

3. UNIX for Dummies Questions & Answers

kernel parameter

Hi all I am using HPUX 11.00 .its a HP9000 L class server with 1gb ram and dual processor 540Mhz. i want to know abt the two kernel parameter mentioned below 1)maxdsize 2)maxssize these two parameter has the default values and it has not been changed once. as some application on this... (1 Reply)
Discussion started by: Prafulla
1 Replies

4. UNIX for Dummies Questions & Answers

How to change a kernel parameter

Hello and thank you everyone that has helped guide me in the past. I need to change the max_thread_proc parameter in order for certain Oracle utilities to function correctly. It is currently set at 64. I am a dba not an sa so please excuse my lack of knowledge on something that is probably... (7 Replies)
Discussion started by: soestx
7 Replies

5. UNIX for Dummies Questions & Answers

kernel parameter in SOL

Hello everbody: I have Sol9, and I need to check its kernekl parameters, do you know how to list them or in which file they can be found. Thanks in Advance (3 Replies)
Discussion started by: aladdin
3 Replies

6. HP-UX

Equivalent Kernel parameter in HP-UX

Hi, May I pls. know what would be the equivalent kernel parameter in HP-UX for the below Linux kernel parameter. sysctl kern.ps_showallprocs - This setting in Linux would let users see their own processes in "ps". Thanks, Narasimha (1 Reply)
Discussion started by: vnarsim
1 Replies

7. UNIX for Dummies Questions & Answers

kernel parameter values

Hi All Need to find kernel parameter values of our UNIX box. /filesys1/tmp>uname -a HP-UX hps1_dc B.11.11 U 9000/800 1681349356 unlimited-user license /filesys1/CDBLprodrun/tmp> Can anyone help me with the cmd to find kernel parameter values? Thanks in advance. (1 Reply)
Discussion started by: mhbd
1 Replies

8. HP-UX

nk thread kernel parameter

Hi. I wanted to know, that if an issue is coming, where ,on running a load test, the memory of the APP server(unix) increases, but does not come down once the test is over, in that case, does tuning the nk thread paramter help in teleasing of the memory..??? plz answer soon (2 Replies)
Discussion started by: TC123
2 Replies

9. UNIX for Advanced & Expert Users

How to check what are the current kernel parameter settings

Hi all, I have four (4) different UNIX flavours and I want to know whether the following commands are correct with respect to wanting to check on what are my current kernel parameter settings. I just want to clear the doubts hanging over my head whether the commands below are the right ones... (2 Replies)
Discussion started by: newbie_01
2 Replies

10. UNIX for Advanced & Expert Users

TCP Kernel Settings

I have solaris 9 system. I want to change the "tcp_conn_req_max_q" setting in /etc/system. whats the correct way, set ndd:tcp_conn_req_max_q=2048 or set tcp:tcp_conn_req_max_q=2048 thanks (1 Reply)
Discussion started by: chaandana
1 Replies
SEM_OVERVIEW(7) 					     Linux Programmer's Manual						   SEM_OVERVIEW(7)

NAME
sem_overview - Overview of POSIX semaphores DESCRIPTION
POSIX semaphores allow processes and threads to synchronize their actions. A semaphore is an integer whose value is never allowed to fall below zero. Two operations can be performed on semaphores: increment the semaphore value by one (sem_post(3)); and decrement the semaphore value by one (sem_wait(3)). If the value of a semaphore is currently zero, then a sem_wait(3) operation will block until the value becomes greater than zero. POSIX semaphores come in two forms: named semaphores and unnamed semaphores. Named semaphores A named semaphore is identified by a name of the form /somename; that is, a null-terminated string of up to NAME_MAX-4 (i.e., 251) characters consisting of an initial slash, followed by one or more characters, none of which are slashes. Two processes can operate on the same named semaphore by passing the same name to sem_open(3). The sem_open(3) function creates a new named semaphore or opens an existing named semaphore. After the semaphore has been opened, it can be operated on using sem_post(3) and sem_wait(3). When a process has finished using the semaphore, it can use sem_close(3) to close the semaphore. When all processes have finished using the semaphore, it can be removed from the system using sem_unlink(3). Unnamed semaphores (memory-based semaphores) An unnamed semaphore does not have a name. Instead the semaphore is placed in a region of memory that is shared between multiple threads (a thread-shared semaphore) or processes (a process-shared semaphore). A thread-shared semaphore is placed in an area of memory shared between by the threads of a process, for example, a global variable. A process-shared semaphore must be placed in a shared memory region (e.g., a System V shared memory segment created using shmget(2), or a POSIX shared memory object built created using shm_open(3)). Before being used, an unnamed semaphore must be initialized using sem_init(3). It can then be operated on using sem_post(3) and sem_wait(3). When the semaphore is no longer required, and before the memory in which it is located is deallocated, the semaphore should be destroyed using sem_destroy(3). The remainder of this section describes some specific details of the Linux implementation of POSIX semaphores. Versions Prior to kernel 2.6, Linux only supported unnamed, thread-shared semaphores. On a system with Linux 2.6 and a glibc that provides the NPTL threading implementation, a complete implementation of POSIX semaphores is provided. Persistence POSIX named semaphores have kernel persistence: if not removed by sem_unlink(3), a semaphore will exist until the system is shut down. Linking Programs using the POSIX semaphores API must be compiled with cc -lrt to link against the real-time library, librt. Accessing named semaphores via the file system On Linux, named semaphores are created in a virtual file system, normally mounted under /dev/shm, with names of the form sem.somename. (This is the reason that semaphore names are limited to NAME_MAX-4 rather than NAME_MAX characters.) Since Linux 2.6.19, ACLs can be placed on files under this directory, to control object permissions on a per-user and per-group basis. CONFORMING TO
POSIX.1-2001. NOTES
System V semaphores (semget(2), semop(2), etc.) are an older semaphore API. POSIX semaphores provide a simpler, and better designed inter- face than System V semaphores; on the other hand POSIX semaphores are less widely available (especially on older systems) than System V semaphores. EXAMPLE
An example of the use of various POSIX semaphore functions is shown in sem_wait(3). SEE ALSO
sem_close(3), sem_destroy(3), sem_getvalue(3), sem_init(3), sem_open(3), sem_post(3), sem_unlink(3), sem_wait(3), pthreads(7) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-05-22 SEM_OVERVIEW(7)
All times are GMT -4. The time now is 09:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy