Skip to content

Instantly share code, notes, and snippets.

@axetroy
Created December 17, 2018 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axetroy/9752136684cf88594c525c9d078f34e9 to your computer and use it in GitHub Desktop.
Save axetroy/9752136684cf88594c525c9d078f34e9 to your computer and use it in GitHub Desktop.
Mac上的优化,提升文件打开数/连接数
$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -w kern.maxfiles=65536
$ sudo sysctl -w kern.maxfilesperproc=65536
$ ulimit -n 65536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment