1. shared memory parameter ¼³¸í
Name Default Max Description
------ --------------- --------------- -------------------------------------
shmmax 1048576 (1Meg) 4294967295 shared memory segmentÀÇ ÃÖ´ë Å©±â¸¦
(4GB) ÁöÁ¤ÇÑ´Ù. ÀÌ Å©±â´Â shmget(2) ½Ã½ºÅÛ
2.5.1 or ÄÝ¿¡¼ ¿ä±¸ÇÒ ¼ö ÀÖ´Â ÃÖ´ë Å©±âÀÌ´Ù.
higher Ä¿³ÎÀÌ ÀÌ °ª ¸¸ÅÀÇ ¸Þ·Î¸®¸¦ ¹Ì¸®
ÇÒ´çÇÏ¿© º°µµ·Î °ü¸®ÇÏ´Â °ÍÀÌ ¾Æ´Ï°í
2147483647 ÇÊ¿äÇÒ ¶§¸¶´Ù ÇÒ´ç ¹Þ¾Æ »ç¿ëÇÑ´Ù. ±×·¡¼
(2GB) ÀÌ °ªÀ» Å©°Ô ÁöÁ¤ÇÏ¿©µµ ½Ã½ºÅÛÀÌ ³ª»Û
2.5 or lower ¿µÇâÀ» ÁÖÁö´Â ¾Ê´Â´Ù.
shmmin 1 4294967295 shared memory segmentÀÇ ÃÖ¼Ò Å©±â¸¦
(4GB) ÁöÁ¤ÇÑ´Ù. ÀÌ °ªÀº º¯°æÇÒ ÇÊ¿ä´Â ¾ø´Ù.
2.5.1 or
higher
2147483647
2.5 or lower
shmseg 6 32767 ÇϳªÀÇ ÇÁ·Î¼¼¼¿¡ ÇÒ´çµÉ ¼ö ÀÖ´Â ÃÖ´ë
(32k) shared memory segmentÀÇ °¹¼ö¸¦ ÁöÁ¤ÇÑ´Ù.
ÀÌ °ªÀº segment°¡ ÇÒ´çµÉ ¶§, segmentÀÇ
°¹¼ö¸¦ Á¶»çÇϴµ¥ »ç¿ëµÈ´Ù. ±×·¯¹Ç·Î
ÀÌ °ª¿¡ ÀÇÇÏ¿© ¹Ì¸® ÇÒ´çµÇ´Â ÀÚ¿øÀº
¾ø´Ù. ¸¸ÀÏ ÀÌ °ªÀÌ 34K¸¦ ³Ñ¾î¼¸é,
ÁÖÀÇ ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÏ°í, ±× °ªÀº 32k·Î
¼³Á¤ÇÑ´Ù.
shmmni 100 2147483647 ½Ã½ºÅÛ¿¡ °¡¿ëÇÑ shared memory
(2GB) identifierÀÇ ÃÖ´ë °¹¼ö¸¦ ÁöÁ¤ÇÑ´Ù.
¸ðµç shared memory segment´Â
ÀÌ identifier¿¡ ÀÇÇØ °ü¸®µÇ¸ç, shmget(2)
½Ã½ºÅÛ ÄÝÀÇ ¸®ÅÏ°ªÀÌ´Ù.
identifier 1°³´ç ¾à 120 ¹ÙÀÌÆ® Á¤µµÀÇ
¸Þ¸ð¸®°¡ ¹Ì¸® ÇÒ´çµÈ´Ù.
Solaris 2.5 ÀÌ»ó ¹öÀü¿¡¼´Â
¸Þ¸ð¸®ÀÇ 1/4 ÀÌ»óÀÌ ÀÌ identifier¿¡
ÇÒ´çµÇÁö ¸øÇϵµ·Ï Çϸç, ±× ÀÌ»óÀÌ
ÇÒ´çµÇ¸é °æ°í ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÏ°í,
shared memory module¸¦ loadÇÏÁö ¾Ê´Â´Ù.
2. shared memory parameter ¼³Á¤Çϱâ
shared memory parameter¸¦ ½Ã½ºÅÛ¿¡ ¼³Á¤ÇÏ·Á¸é /etc/system ÈÀÏ¿¡ ´ÙÀ½°ú
°°Àº ¶óÀÎÀ» Ãß°¡ÇÏ°í, ½Ã½ºÅÛÀ» rebootingÇÏ¸é º¯°æ»çÇ×ÀÌ ¹Ý¿µµÈ´Ù.
set shmsys:shminfo_variable = value
¿©±â¼ 'variable'Àº À§¿¡¼ ¼³¸íÇÑ Name Çʵ忡 ÀÖ´Â °ªÀÌ´Ù.
¿¹¸¦ µé¸é,
set shmsys:shminfo_shmmni = 150
shmmniÀÇ °ªÀ» 150À¸·Î º¯°æÇÑ´Ù.
3. shared memory parameter °ªÀ» Á¶»çÇϱâ
½Ã½ºÅÛ¿¡ ¼³Á¤µÇ¾î ÀÖ´Â shared memory parameterÀÇ °ªÀº 'sysdef' ¸í·É¾î·Î
È®ÀÎÇÒ ¼ö ÀÖ´Ù.
$ sysdef
.... Skip ....
*
* IPC Shared Memory
*
1048576 max shared memory segment size (SHMMAX)
1 min shared memory segment size (SHMMIN)
100 shared memory identifiers (SHMMNI)
6 max attached shm segments per process (SHMSEG)
.... Skip ....
À§¿¡ ÀÖ´Â °ªµéÀÌ 0·Î º¸ÀÏ ¼ö µµ ÀÖ´Ù. ÀÌ °æ¿ì´Â shared memory moduleÀÌ
Ä¿³Î¿¡ ¿Ã¶ó¿Í ÀÖÁö ¾Ê±â ¶§¹®ÀÌ´Ù. Solaris 2.x¿¡¼´Â dynamic kernelÀ»
»ç¿ëÇÑ´Ù. ÀÌ´Â kernel moduleµéÀÌ »ç¿ëµÉ ¶§, kernel¿¡ °áÇյǰí, »ç¿ëÇÏÁö
¾ÊÀ¸¸é Ä¿³Î¿¡¼ Á¦°ÅµÈ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù. °Á¦ÀûÀ¸·Î shared memory moduleÀ»
Ä¿³Î¿¡ loadÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ 'modload' ¸í·É¾î¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
# modload -p sys/shmsys
±×¸®°í ´Ù½Ã sysdef ¸í·É¾î´Â »ç¿ëÇϸé, shared memory parameter¸¦ È®ÀÎÇÒ
¼ö ÀÖ´Ù.
4. Âü°í ¹®Çå
½Ã½ºÅÛ¿¡ ¼³Ä¡µÈ ¸Þ´º¾ó ÆäÀÌÁö¸¦ Âü°íÇÑ´Ù.
shmget(2), shmop(2), shmat(2), shmdt(2)
¿¹Á¦)
man shmget
|