Skip to content
Constantine edited this page Sep 10, 2024 · 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 amount of memory reserved for the Tempesta database, which is allocated across all NUMA nodes and divided proportionally among them. The default value is 512M. Minimum value is 32MB per node. For example, for two nodes, minimum will be 64MB. The value is 2MB aligned.

Syntax: tempesta_dbmem=value[KMG]

Example: tempesta_dbmem=1G

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
  • or use -f to watch new logs in real time:
$ journalctl -u tempesta-fw -f
  • run Tempesta FW on system start:
$ systemctl enable tempesta-fw
$ systemctl disable tempesta-fw
$ systemctl reload tempesta-fw
Clone this wiki locally