::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

[Mac] Too many open files ´ëÀÀ limit ¼³Á¤, max proc limit ¼³Á¤

°Ô½ÃÆÇ
OS Others
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2017-09-29 17:23:58
ÀÐÀº¼ö
4573
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ
°ü·Ã¸µÅ©01
https://www.macobserver.com/tips/deep-dive/evade-macos-many-open-files-error-pushing-limits/ 
°ü·Ã¸µÅ©02
https://www.macobserver.com/tips/deep-dive/evade-macos-many-open-files-error-pushing-limits/2/ 
 Img #1 : Disable System Integrity Protection (SIP)

[zany@dione ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 4872
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1418
virtual memory          (kbytes, -v) unlimited

[zany@dione study]$ sysctl kern.maxproc
kern.maxproc: 2128

[zany@dione study]$ sysctl kern.maxprocperuid
kern.maxprocperuid: 1418

[zany@dione study]$ sysctl kern.maxfilesperproc
kern.maxfilesperproc: 64000


¡Ü Disable System Integrity Protection (SIP)
open files Á¦ÇÑ ÇØÁ¦´Â SIP(System Integrity Protection) ¶§¹®¿¡ ±×³É ¼öÁ¤À» ºÒ°¡´ÉÇÔ.
SIP ±â´ÉÀº ±ÇÇѾø´Â ÇÁ·Î¼¼½º°¡ ½Ã½ºÅÛ ÆÄÀÏÀ̳ª µð·ºÅ丮¸¦ º¯°æÇÏ´Â °ÍÀ» ¸·±â À§ÇØ OS X El Capitan ¿¡ ¼Ò°³µÈ ±â´É.
SIP ±â´ÉÀ» ²ôÁö ¾Ê°í´Â root °èÁ¤ ¶Ç´Â sudo ¸í·ÉÀ» ÅëÇØ root ±ÇÇÑÀ» ÃëµæÇÑ °èÁ¤À̶ó ÇÒÁö¶óµµ ½Ã½ºÅÛ ÆÄÀÏÀ̳ª µð·ºÅ丮¸¦ º¯°æÇÏ´Â °ÍÀº ºÒ°¡´ÉÇÔ.
SIP ±â´ÉÀ» ²ô·Á¸é, ¸Æ ºÎÆýà ¾ÖÇà ·Î°í°¡ ³ª¿Ã ¶§±îÁö Command+R Å°¸¦ ´­·¯ Recovery mode ·Î ÁøÀÔÇÏ¿©
Å͹̳ΠâÀ» ¿­°í ¾Æ·¡ ¸í·ÉÀ» ÀÔ·ÂÇØ¾ß ÇÑ´Ù.
csrutil disable
ÀçºÎÆÃÇÏ°í Á¤»óÀûÀ¸·Î ·Î±×ÀÎÇÏ¸é µÊ.


¡Ü Configuring Your New File Limits
ÆÄÀÏÀÌ ¾øÀ¸¸é »õ·Î ¸¸µé¸é µÊ.
sudo tee /Library/LaunchDaemons/limit.maxfiles.plist <<-'EOF'
64000 Àº ¼ÒÇÁÆ® ¸®¹Ô (soft limit)
524288 Àº ÇÏµå ¸®¹Ô (hard limit) ÀÌ´Ù.
hard limit À» ³Ñ¾î¼­¸é 'Too many files open in system' ¿¡·¯¸¦ º¸°Ô µÈ´Ù.


¡Ü max user processes ¼öÁ¤
ÆÄÀÏÀÌ ¾øÀ¸¸é »õ·Î ¸¸µé¸é µÊ.
sudo tee /Library/LaunchDaemons/limit.maxproc.plist <<-'EOF'


¡Ü °á°ú
[zany@dione ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 64000
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 2048
virtual memory          (kbytes, -v) unlimited


[zany@dione ~]$ sysctl kern.maxfiles
kern.maxfiles: 524288

[zany@dione ~]$ sysctl kern.maxproc
kern.maxproc: 2128

[zany@dione ~]$ sysctl kern.maxprocperuid
kern.maxprocperuid: 2048

[zany@dione ~]$ sysctl kern.maxfilesperproc
kern.maxfilesperproc: 64000

 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
14223 helix 4800 2017-11-07 13:24:26
helix 4573 2017-09-29 17:23:58
14170 helix 7551 2017-08-03 17:35:09
14169 helix 8185 2017-08-03 09:54:25
14151 helix 1872 2017-07-09 16:47:01
14140 helix 1827 2017-07-04 10:50:16
14135 helix 21000 2017-07-03 10:00:41
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.016 Secs