System Prerequisites
Linux limits
For production Linux installations, configure process limits for the MonkDB user (and root/superuser if required by your environment):
- File descriptors: soft/hard
unlimited - Memory lock: soft/hard
unlimited - Threads: soft/hard
4096 - Virtual memory (Linux): soft/hard
unlimited vm.max_map_count(Linux):262144
Typical files:
/etc/security/limits.conf/etc/sysctl.confor/etc/sysctl.d/*.conf
Example:
# /etc/security/limits.conf
monkdb soft nofile unlimited
monkdb hard nofile unlimited
monkdb soft memlock unlimited
monkdb hard memlock unlimited
monkdb soft nproc 4096
monkdb hard nproc 4096
monkdb soft as unlimited
monkdb hard as unlimited
# /etc/sysctl.d/99-monkdb.conf
vm.max_map_count=262144
Apply sysctl changes:
sudo sysctl --system
JVM and heap
MonkDB is JVM-based. Set heap via MONKDB_HEAP_SIZE.
- Start with about 25% of machine RAM.
- Keep heap between
1GBand about30.5GBfor Compressed Oops efficiency. - If
bootstrap.memory_lock: trueis used, ensurememlocklimits permit lock.
Swap
Avoid swap for MonkDB processes. Prefer:
bootstrap.memory_lock: true- Host-level swap tuning/disabling per your ops policy
Network and ports
Default ports commonly used:
- HTTP:
4200 - PGWire:
5432 - Transport:
4300
Use firewall rules and TLS in production.
psql client installation
Install psql client on any machine from which you run SQL administration or tests.
Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y postgresql-client
RHEL / CentOS / Rocky / AlmaLinux
sudo dnf install -y postgresql
macOS (Homebrew)
brew install libpq
brew link --force libpq
Verify
psql --version