Estou trabalhando em uma máquina de teste e quero aumentar o máximo de arquivos abertos e procedimentos máximos do ulimit no macOS Sierra.
Eu corro sudo ulimit -n 100000 120000
e sudo ulimit -u 10000 12000
. nenhum erro é exibido. Mas quando eu corro ulimit -a
nada mudou.
O que devo fazer?
$ launchctl limit
cpu unlimited unlimited
filesize unlimited unlimited
data unlimited unlimited
stack 8388608 67104768
core 0 unlimited
rss unlimited unlimited
memlock unlimited unlimited
maxproc 1064 1064
maxfiles 1000000 1000000
$ 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) 10000
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1064
virtual memory (kbytes, -v) unlimited
$ csrutil status
System Integrity Protection status: disabled.
/etc/launchd.conf chmod: 644 raiz do chown: roda
limit maxfiles 1000000 1000000
limit maxproc 1000000 1000000
/Library/LaunchDaemons/limit.maxfiles.plist chmod: 644 raiz do chown: roda
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>1000000</string>
<string>1000000</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
/Library/LaunchDaemons/limit.maxproc.plist chmod: 644 raiz do chown: roda
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxproc</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>maxproc</string>
<string>1000000</string>
<string>1000000</string>
</array>
<key>RunAtLoad</key>
<true />
<key>ServiceIPC</key>
<false />
</dict>
</plist>
Tags ulimit mac terminal macos macos-sierra