From 4ed2bfb3ca33cd074578b86923e5ea2e9f373f6d Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Fri, 29 Mar 2019 12:23:53 -0500 Subject: [PATCH] increase default max map and file counts Explained in a comment: We default these Max File/Map counts very high. This is basically a backwards compatibility thing where we don't want to cause different behavior for those who had previously set their system limits high, and weren't experiencing any bad behavior. Ideally you want these set a bit below your system limits. --- docs/configuration.md | 12 ++++++------ server/config.go | 12 +++++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 5a0313d63..05aabf970 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -127,12 +127,12 @@ The config file is in the [toml format](https://github.com/toml-lang/toml) and h timestamps will create lots of fragments. When Pilosa exhausts the max-map-count it falls back to reading files directly into memory. This can be a bit slower, and cause slower restarts, but is generally fine. - * Flag: `--max-map-count=60000` - * Env: `PILOSA_MAX_MAP_COUNT=60000` + * Flag: `--max-map-count=1000000` + * Env: `PILOSA_MAX_MAP_COUNT=1000000` * Config: ```toml - max-map-count = 60000 + max-map-count = 1000000 ``` #### Max Writes Per Request @@ -152,11 +152,11 @@ The config file is in the [toml format](https://github.com/toml-lang/toml) and h open simultaneously. When past this limit, Pilosa will only keep files open for as long as it needs to write updates. This will negatively affect performance in cases where Pilosa is doing lots of small updates. -* Flag: `--max-file-count=500000` -* Env: `PILOSA_MAX_FILE_COUNT=500000` +* Flag: `--max-file-count=1000000` +* Env: `PILOSA_MAX_FILE_COUNT=1000000` * Config: ```toml - max-file-count = 500000 + max-file-count = 1000000 ``` #### Gossip Advertise Host diff --git a/server/config.go b/server/config.go index 9a7147307..c42d41b6c 100644 --- a/server/config.go +++ b/server/config.go @@ -143,9 +143,15 @@ func NewConfig() *Config { DataDir: "~/.pilosa", Bind: ":10101", MaxWritesPerRequest: 5000, - MaxMapCount: 60000, - MaxFileCount: 500000, - TLS: TLSConfig{}, + + // We default these Max File/Map counts very high. This is basically a + // backwards compatibility thing where we don't want to cause different + // behavior for those who had previously set their system limits high, + // and weren't experiencing any bad behavior. Ideally you want these set + // a bit below your system limits. + MaxMapCount: 1000000, + MaxFileCount: 1000000, + TLS: TLSConfig{}, } // Cluster config.