Skip to content
Alexander Krizhanovsky edited this page Jul 7, 2023 · 6 revisions

Prepare to Start

Tempesta FW requires the patched Linux kernel. It can be built from sources or installed from binary packages. Boot to the patched kernel before running Tempesta FW.

Optionally, add kernel parameter tempesta_dbmem to the kernel command line. The value is the order of 2MB memory blocks reserved on each NUMA node for Tempesta database. Huge pages are used if possible. The default value is 8 which stands for 512Mb reserved on each NUMA node. Minimum value is 4 (32MB).

tempesta_dbmem=4

This memory area is used by Tempesta DB tables, so the size of the area must be greater or equal to the sum of sizes of all the tables. At this moment following tables are used (this may change with next releases):

  • web cache table. If NUMA replicated mode is used, then you need to multiply the cache_size by the number of NUMA nodes. Default mode is replicated and default size is 256MB, so by default if you run on 2 physical processors, then you need 512MB for web cache.

  • IP filter table, defined by filter_tbl_size, 16MB by default.

  • HTTP sessions table, controlled with sessions_tbl_size, 16MB by default.

  • clients accounting, controlled with client_tbl_size, 16MB by default.

Startup script

A simple startup provided with Tempesta FW sources is able to load Tempesta FW kernel modules, configure network adapters for better performance and start Tempesta FW. The same script can also be to stop and reload Tempesta FW.

Start and stop Tempesta FW:

$ ${tempesta_src_dir}/scripts/tempesta.sh --start
$ ${tempesta_src_dir}/scripts/tempesta.sh --stop

BY default the startup script uses configuration file located at etc/tempesta_fw.conf in Tempesta FW sources directory. It is possible to start Tempesta FW with custom configuration file location:

$ TFW_CFG_PATH="/opt/tempesta.conf" ${tempesta_src_dir}/scripts/tempesta.sh --start

On-the-fly reconfiguration:

$ ${tempesta_src_dir}/scripts/tempesta.sh --reload

Systemd service

Tempesta FW binary packages also provide tempesta-fw.service systemd unit file for loading Tempesta FW on system start. Unlike manual start via the startup script the systemd unit supports only one location of configuration file: /etc/tempesta_fw.conf. The unit file is controlled in the same way like any other systemd units:

  • starting and stopping:
$ systemctl start tempesta-fw
$ systemctl stop tempesta-fw
$ systemctl restart tempesta-fw
  • Tempesta FW service status:
$ systemctl status tempesta-fw
  • service logs:
$ journalctl -u tempesta-fw
  • run Tempesta FW on system start:
$ systemctl enable tempesta-fw.service
$ systemctl disable tempesta-fw.service
$ systemctl reload tempesta-fw.service
Clone this wiki locally