SonarW configuration

The configuration of SonmarW is managed through the file sonard.conf This file resides in the /etc/sonar/ directory.

Most parameters have a default value and therefore are commented out. In order to set a configuration value if the variable is commented, you’ll need to un-comment it first and then set the desired value.

Note: changing configuration values will impact the way the product works, and may result in different behaviour. It is therefore reccomended to always save a backup of the config file prior to making any changes.

SonarW configuration parameters

Lines beginning with ‘#’ are comments (i.e. ignored)

Basic options

SonarW daemon port number

default: 27117

listen_port = 27117

SonarW daemon bind IP address



bind_ip =


SSL mode

Options: “disabled”, “allowSSL”, “preferSSL”, or “requireSSL”

default: disabled

#sslMode = disabled


#sslPEMKeyFile = “”

#sslPEMKeyPassword = “”

SSL CA file path

#sslCAFile = “”

SL Certificate Revocation List file path

#sslCRLFile = “”

SSL accepts clients without certificate

default: false

#sslWeakCertificateValidation = false

SSL disable hostname validation

default: false

#sslAllowInvalidHostnames = false

SSL allow invalid certificates

default: false

#sslAllowInvalidCertificates = false

Authentication, authorization, and audit

Enables authentication

default: true

#auth = true

Authentication mechanisms (MONGODB-CR, GSSAPI, SCRAM-SHA-1)


#auth_mechanisms = MONGODB-CR, SCRAM-SHA-1

Enables audit, needs authentication active to work

default: true

#audit_on = true

Authentication debug log level (0 to 5)

default: 3

#auth_internal_log_level = 3

Shared secret file path

#auth_keyfile = “”

SASL Plain auth LDAP socket

default: “”

#ldap_socket = “”

Enables localhost exception

default: false

#localhost_exception = false

SASL hostname

default: localhost

#sasl_hostname = localhost

SASL service

default: “sonarw”

#sasl_service = sonarw

SonarW options

Allow duplicate _id

default: false

#allow_duplicate_ids = false

Enables text index

default: true

#auto_text_index = true

Number of blocks that the Cache Memory System can handle per database

Directly impacts the memory usage, but can lead to better performance

default: 512

#cache_buffer_count = 512

Maximum amount of memory the Cache Memory System can use.

If 0, only the number of blocks (i.e. cache_buffer_count) is the limiting factor

Can be expressed in bytes or using some size unit (k, m, g)

default: 0

#cache_max_ram_size = 0

Maximum amount of buffers the Cache Memory System can use for temporary databases.

Same as cache_buffer_count, but for temporary databases

default: 16

#cache_buffer_count_tmp_db = 16

Data compression level (0 to 9)

default: 4.

0 means no compression at all.

#compression_level = 4

Maximum number of concurrent queries allowed to run

0 means 1 query per core

default: 0

#concurrent_queries = 0

Cursor timeout

default: 10m (s for seconds, m for minutes, h for hours, d for days)

#cursor_timeout = 10m

Limit the maximum number of aggregation groups (-1 means no limit)

default: -1

#default_group_limit = -1

Maximum number of documents to sort

default: 10000000000000 (10 teradocuments)

#default_sort_limit = 10000000000000

Maximum number of documents to return in a $text search

default: 100

#default_text_search_limit = 100

Allocated size for GPU text search area (size unit: k, m, g)

default: 64m

#gpu_text_search_block_size = 64m

Number of disk pages hold in memory for _id field

default: 10240

#id_index_cache_size = 10240

Page size for the _id field

Must be a power of two between 512 and 65536 inclusive

default: 8192

#id_index_page_size = 8192

Folder used by database merge

default: ${SONAR_HOME}/import

#import_dir =

Time in seconds to run auto flush on ingested data

default: 15m (s for seconds, m for minutes, h for hours, d for days)

#ingest_timeout = 15m

Only allow creation of admin user when under localhost exception

default: false

#lexc_admin_user_create_only = false

Kill the pipeline if the memory limit is reached

default: false

#limit_memory_usage = false

Pipeline memory limit (size unit: k, m, g)

default: 4g

#limit_memory_usage_threshold = 4g

Maximum number of complex documents when sorting

default: 4194304

#max_complex_sort_doc_count = 4194304

Maximum number of client requests

default: 8

#max_concurrent_jobs = 8

Maximum persist file size (size unit: k, m, g)

default: 128m

#max_disk_persist_file_size = 128m

Maximum number of disk read allocation buffers

default: 256

#max_disk_read_buffers = 256

Maximum string size when using disk sort

default: 64

#max_disk_sort_string_len = 64

Maximum coalesced collection size

default: 50000000 (50 megadocs)

#max_documents_in_aggregation_column = 50000000

Maximum number of connections

default: 256

#maximum_connections = 256

Soft memory limit for project operations (size unit: k, m, g)

default: 512m

#max_memory_per_stage = 512m

Maximum time in seconds a query can wait for memory

default: 10

#max_memory_wait = 10

Maximum uncompressed size for the bson column on a collection part

Size unit: k, m, g

default: 10g

#max_part_size = 10g

Maximum amount of memory necessary to run a query

Size unit: k, m, g

If not specified, the system will try to use all system memory

default: 0

#max_ram_for_queries = 0

Maximum memory to run sort in RAM

If the input data is bigger, fallback to a slower disk sort

default: 1g

#max_ram_sort_space = 1g

How much memory to save to snippet processing

Size unit: k, m, g

default: 1g

#max_snippet_memory = 1g

Maximum subquery result size

default: 104857600 (100 mega documents)

#max_subselect_result_list_length = 104857600

Maximum size of the explain document

Size unit: k, m, g

default: 1m

#max_threshold_output_explain_strings = 1m

Maximum number of distinct or union documents to track

default: 1000000

#max_union_distinct = 1000000

Minimum number of documents to run per thread

default: 1000

#minimum_thread_docs = 1000

Maximum number of memory buffers used to communicating with a client

default: 32768

#nio_buffer_count = 32768

Size of the buffer used to communicating with a client

default: 32768

#nio_buffer_size = 32768

Maximum write size to the communication buffer

default: 16384

#nio_max_write_size = 16384

Path to nodejs executable

default: “/usr/bin/nodejs”

#nodejs = “/usr/bin/nodejs”

Number of partition processing queues

default: 2

#number_of_partitioners = 2

Allow read data files simultaneously

Should be false on regular HDs and can be true on SSDs

default: true

#parallel_disk_read = true

Partition buffer size

Size unit: k, m, g

default: 4g

#partition_buffer_size = 4g

Optimization by pipeline syntax

default: true

#pipeline_optimization = true

Number of prefetch threads

default: 8

#prefetch_threads = 8

Number of project documents per round

default: 50000

#project_docs_per_run = 50000

Number of execution threads

default: 8

#projection_threads = 8

Internal services wait period (milliseconds)

default: 10000

#service_daemon_wait_period = 10000

HADR slave mode

default: false

#slavemode_on = false

Columns to enable snippets on (comma separated)

default: “”

#snippet_columns = “”

Mininum number of columns to enable use of the BSON column

default: 2

#spare_bson_project_threshold = 2

Score for excluded string in $text

default: -1000

#text_exclude_score = -1000

Limit on the size of the sorting view

default: 10000

#max_size_sorting_view = 10000

Enables the creation of a bson column

default: true

#use_spare_bson = true

Verify internal database structures during startup

default: true

#verify_db_structure = true

Maximum number of documents to unwind

In mega documents: 2 equals 2097152 documents

default: 2

#virtual_unwind_limit = 2

Write flush timeout

default: 10000

#write_cache_flush_period = 10000

debug logging database

Collections with logged in user’s name contain debug info

default: “lmrm__debug”

#v8_debug_db = “lmrm__debug”

Directory to store sort combining temporary files

default: “/tmp”

#sort_bson_directory = “/tmp”

Directory to store secondary sort combining temporary files

Note: blank means: $SONAR_HOME/tmp

default: “”

#sort_sec_bson_directory = “”

For which databases to save the signature of each document

default: “”

#document_signatures_db = “”

Maximum amount of RAM used to reorder multi-column disk sort results

default: 1g

#max_ram_sort_reordering_space = 1g

Maximum length of materialized view

default: 10000

#maximum_materialized_view_size = 10000

The host and port of zookeeper server as “host:port”

default: “”

#zookeeper_address = “”

Delay between stats daemon updates of sonar_log.sonar_state

default: 5m (m for minutes, h for hours, d for days)

#stats_daemon_wait_period = 5m

Number of threads to use for reading sorted bson

When sort_bson_directory is stored on SSD only

default: 0

#sorting_read_threads = 0

Directory to use for external sorter

Blank means $SONAR_HOME/tmp

default: blank

#external_sort_directory =

Directory to use when external_sort_directory is full

Blank means $SONAR_HOME/tmp

default: blank

#sort_sec_bson_directory =

Max stxxl sorting memory

Amount of memory used for a multi-column disk-based sort

default: 1g

#max_stxxl_sort_space = 1g

Use % as a regular expression wildcard (for any character)

default: false

#use_percent_wildcard = false

Maximum number of documents going into materialized view

default: 100000

maximum_materialized_view_size = 100000

Maximum amount of memory for Join Hash Cache

default: 512m

join_hash_cache_size = 512m

Fail queries using non-existant field names

default: true

strict_field_name_checking = true