Skip to content

Tuning the archive#

Mysql#

By default the installer sets modest buffer sizes. If you have +8 GB memory, try these settings:

[mysqld]
innodb_buffer_pool_size = 2.5G
innodb_buffer_pool_instances = 4
innodb_log_file_size = 512M
innodb_log_buffer_size = 128M
innodb_flush_log_at_trx_commit = 1
innodb_flush_neighbors = 0
innodb_file_per_table = 1
innodb_io_capacity = 800
innodb_io_capacity_max = 1600
innodb_read_io_threads = 4
innodb_write_io_threads = 4

thread_handling = pool-of-threads

max_connections = 250
table_open_cache = 4000
open_files_limit = 65535
skip_name_resolve = 1

tmp_table_size = 128M
max_heap_table_size = 128M
aria_pagecache_buffer_size = 128M

query_cache_type = 0
query_cache_size = 0
performance_schema = OFF

Systemd overrides (/etc/systemd/system/mariadb.service.d/override.conf)

[Service]
LimitNOFILE=65535

Linux sysctl tunings#

# MariaDB + general DB workload tuning
vm.swappiness = 1
vm.dirty_background_ratio = 5
vm.dirty_ratio = 15
fs.file-max = 2097152

# Networking
net.core.somaxconn = 65535
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_intvl = 60
net.ipv4.tcp_keepalive_probes = 9

Manticore#

Try these settings if you have +8 GB memory:

searchd {
    ...
    rt_mem_limit = 2G
    workers = threads
    dist_threads = 4
    max_children = 30
}

Piler#

The number of worker processes should be the number of cpu cores + 1, eg. for 2 CPUs: 3

The piler-smtp daemon buffers the email to memory. The max_message_size variable determines the max message size that piler-smtp accepts. The max_smtp_memory variable caps the max allocatable memory that piler-smtp may claim. Be sure to set these to match your needs in /etc/piler/piler.conf:

max_message_size=50000000
max_smtp_memory=500000000
# having 2 cpus
number_of_worker_processes=3