LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2010, 01:11 PM   #1
d072330
Member
 
Registered: Nov 2007
Location: USA
Distribution: CentOS 5/6
Posts: 186

Rep: Reputation: 6
Value of shmmni


Currently we have a system that has 4800 shared memory segments by doing a ipcs -m. I wrote a perl script to add up the nattch column and that is where the 4800 number came from. The default value is 4096. I can increase this on the fly without a reboot and I can add it to the /etc/sysctl.conf file for future use.

My question is what happens to the system when you go over the alloted value of shmmni? Will this effect logins, software etc etc?

I don't understand how it can over a max value unless defunct processes are counted in the ipcs -m command but are not actually a count.

Any help would be appreciated.

Thanks

Last edited by d072330; 11-11-2010 at 02:44 PM.
 
Old 11-12-2010, 08:36 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
nattch is number of attachments. shmmni is number of shared memory identifiers. You can have multiple attachments (and often will) to a single identifier. Since shared memory is designed for interprocess communication (ipc) it would be useless if it only allowed for one attachment.

Typically if you ran out of available identifiers you'd see "shmget" errors (either on application start or in logs).

Not everything uses shared memory segments (don't confuse this with shared libraries and the like which is a different kind of sharing to eliminate having multiple copies of the same library in memory). As noted above Shared Memory is one of the 3 types of IPC (the others being semaphores and message queues). Standard logins aren't going to be using shm. The heaviest use of shared memory is typically done by databases (often they'll use a semaphore/shared memory segment combination to make unique "queues" which should not be confused with message queues).

Finally note that nattch only shows you current attachments. Other processes may attach or detach over time. This is why you shouldn't remove a shared memory segment unless your entirely sure the application that created it is completely down.
 
Old 11-15-2010, 06:53 PM   #3
d072330
Member
 
Registered: Nov 2007
Location: USA
Distribution: CentOS 5/6
Posts: 186

Original Poster
Rep: Reputation: 6
Thanks

That was the type of answer I was looking for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off




All times are GMT -5. The time now is 03:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration