Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save danieldeb/6fa28bb5bf4c650d755c4b5ca7cfc8f2 to your computer and use it in GitHub Desktop.

Select an option

Save danieldeb/6fa28bb5bf4c650d755c4b5ca7cfc8f2 to your computer and use it in GitHub Desktop.

Revisions

  1. @ekashida ekashida revised this gist Jun 24, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ $ sysctl kern.maxfilesperproc
    kern.maxfilesperproc: 10240
    $ ulimit -n
    2560
    256
    $ sysctl -A | grep "net.inet.ip.portrange"
    net.inet.ip.portrange.lowfirst: 1023
  2. @ekashida ekashida created this gist Jun 14, 2013.
    46 changes: 46 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    ## Default values

    ```
    $ sysctl kern.maxfiles
    kern.maxfiles: 12288
    $ sysctl kern.maxfilesperproc
    kern.maxfilesperproc: 10240
    $ ulimit -n
    2560
    $ sysctl -A | grep "net.inet.ip.portrange"
    net.inet.ip.portrange.lowfirst: 1023
    net.inet.ip.portrange.lowlast: 600
    net.inet.ip.portrange.first: 49152
    net.inet.ip.portrange.last: 65535
    net.inet.ip.portrange.hifirst: 49152
    net.inet.ip.portrange.hilast: 65535
    ```

    ## Modified values

    ```
    $ sudo sysctl -w kern.maxfiles=24576
    kern.maxfiles: 12288 -> 24576
    $ sudo sysctl -w kern.maxfilesperproc=20480
    kern.maxfilesperproc: 10240 -> 20480
    $ ulimit -n 20480
    $ sudo sysctl -w net.inet.ip.portrange.first=32768
    net.inet.ip.portrange.first: 49152 -> 32768
    $ sudo sysctl -w net.inet.ip.portrange.hifirst=32768
    net.inet.ip.portrange.hifirst: 49152 -> 32768
    ```





    * [Maximum Files in Mac OS X](http://krypted.com/mac-os-x/maximum-files-in-mac-os-x/)
    * [Does Mac OS X throttle the RATE of socket creation?](http://superuser.com/questions/145989/does-mac-os-x-throttle-the-rate-of-socket-creation)
    * [Bind: Address Already in Use](http://hea-www.harvard.edu/~fine/Tech/addrinuse.html)