From be218fd9634342052217cc6f1ee1c9e6a3bd0f6a Mon Sep 17 00:00:00 2001 From: Ashley Svetlik Date: Wed, 24 Jul 2019 09:38:06 -0500 Subject: [PATCH 1/3] Updated Open File Limit Section --- docs/administration.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/administration.md b/docs/administration.md index 6aa52fa2f..45a010e39 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -42,7 +42,26 @@ While Pilosa does have some high system requirements it is not a best practice t Pilosa requires a large number of open files to support its memory-mapped file storage system. Most operating systems put limits on the maximum number of files that may be opened concurrently by a process. On Linux systems, this limit is controlled by a utility called [ulimit](https://ss64.com/bash/ulimit.html). Pilosa will automatically attempt to raise the limit to `262144` during startup, but it may fail due to access limitations. If you see errors related to open file limits when starting Pilosa, it is recommended that you run `sudo ulimit -n 262144` before starting Pilosa. -On Mac OS X, `ulimit` does not behave predictably. [This blog post](https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/) contains information about setting open file limits in OS X. +On Mac OS X, `ulimit` does not behave predictably. The Mac OS X system has a utility called csrutil that prevents you from changing the file limit easily. Because of this, you must disable the csrutil program before attempting to set the open file limit. To disable the csrutil program, restart your laptop and when the start up screen pops up, hold down command + R to enter Reboot Mode. Open a terminal and enter `csrutil disable`, then restart your computer as you normally would. Now that the csrutil is disabled, you can change the open file limit. The open file limit can be changed by creating the following files and changing their ownership: + +``` +sudo vim /Library/LaunchDaemons/limit.maxfiles.plist +``` + +Copy the code located in [this](https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxfiles.plist) github repository into the file. + +``` +sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist +sudo vim /Library/LaunchDaemons/limit.maxproc.plist +``` + +Copy the code located in [this](https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxproc.plist) github repository into the file. + +``` +sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist +``` + +To ensure the open file limit has successfully changed, run `ulimit -a`. Your open files should be set to a number greater than 256 (in the range of 524288) and your max users processes should be greater than 709 (in the range of 2048). ### Importing and Exporting Data From 27e62c40cfebaedfe75eaf5a195b17e55561c70e Mon Sep 17 00:00:00 2001 From: Ashley Svetlik Date: Wed, 24 Jul 2019 10:22:09 -0500 Subject: [PATCH 2/3] Improved Open File Limit section wording --- docs/administration.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/administration.md b/docs/administration.md index 45a010e39..3cc71eb32 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -42,20 +42,15 @@ While Pilosa does have some high system requirements it is not a best practice t Pilosa requires a large number of open files to support its memory-mapped file storage system. Most operating systems put limits on the maximum number of files that may be opened concurrently by a process. On Linux systems, this limit is controlled by a utility called [ulimit](https://ss64.com/bash/ulimit.html). Pilosa will automatically attempt to raise the limit to `262144` during startup, but it may fail due to access limitations. If you see errors related to open file limits when starting Pilosa, it is recommended that you run `sudo ulimit -n 262144` before starting Pilosa. -On Mac OS X, `ulimit` does not behave predictably. The Mac OS X system has a utility called csrutil that prevents you from changing the file limit easily. Because of this, you must disable the csrutil program before attempting to set the open file limit. To disable the csrutil program, restart your laptop and when the start up screen pops up, hold down command + R to enter Reboot Mode. Open a terminal and enter `csrutil disable`, then restart your computer as you normally would. Now that the csrutil is disabled, you can change the open file limit. The open file limit can be changed by creating the following files and changing their ownership: +On Mac OS X, `ulimit` does not behave predictably. The Mac OS X system has a utility called csrutil that prevents you from changing the open file limit easily. One workaround that may work for you involves disabling the csrutil program. To disable the csrutil program, restart your laptop and when the start up screen pops up, hold down command + R to enter Recovery Mode. Open a terminal and enter `csrutil disable`, then restart your computer as you normally would. Now that the csrutil is disabled, you can change the open file limit. The open file limit can be changed by creating the following files and changing their ownership: -``` -sudo vim /Library/LaunchDaemons/limit.maxfiles.plist -``` - -Copy the code located in [this](https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxfiles.plist) github repository into the file. +Copy the contents of [this] file into a new file on your system located at /Library/LaunchDaemons/limit.maxfiles.plist, then run: ``` sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist -sudo vim /Library/LaunchDaemons/limit.maxproc.plist ``` -Copy the code located in [this](https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxproc.plist) github repository into the file. +Copy the contents of [this] file into a new file on your system located at /Library/LaunchDaemons/limit.maxfiles.plist, then run: ``` sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist From 6e6c591f62426de01e8200ce4460dca459be8cb9 Mon Sep 17 00:00:00 2001 From: Ashley Svetlik Date: Wed, 24 Jul 2019 10:41:54 -0500 Subject: [PATCH 3/3] Added max url links --- docs/administration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/administration.md b/docs/administration.md index 3cc71eb32..ba57fc22f 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -44,13 +44,13 @@ Pilosa requires a large number of open files to support its memory-mapped file s On Mac OS X, `ulimit` does not behave predictably. The Mac OS X system has a utility called csrutil that prevents you from changing the open file limit easily. One workaround that may work for you involves disabling the csrutil program. To disable the csrutil program, restart your laptop and when the start up screen pops up, hold down command + R to enter Recovery Mode. Open a terminal and enter `csrutil disable`, then restart your computer as you normally would. Now that the csrutil is disabled, you can change the open file limit. The open file limit can be changed by creating the following files and changing their ownership: -Copy the contents of [this] file into a new file on your system located at /Library/LaunchDaemons/limit.maxfiles.plist, then run: +Copy the contents of [this](https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxfiles.plist) file into a new file on your system located at /Library/LaunchDaemons/limit.maxfiles.plist, then run: ``` sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist ``` -Copy the contents of [this] file into a new file on your system located at /Library/LaunchDaemons/limit.maxfiles.plist, then run: +Copy the contents of [this](https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxproc.plist) file into a new file on your system located at /Library/LaunchDaemons/limit.maxproc.plist, then run: ``` sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist