purposes. As long as no other purpose also writes an "ISC" element to
user-context there should not be a conflict.
+.. _dhcp4-multi-threading-settings:
+
+Multi-threading settings
+------------------------
+
+The Kea server can be configured to process packets in parallel using multiple
+threads. Related setting for this feature are:
+
+- ``enable-multi-threading`` - use multiple threads to process packets in
+ parallel
+
+- ``packet-thread-pool-size`` - specify the number of threads to process
+ packets in parallel. Supported values are: 0 (autodetect), any positive
+ number sets number of threads explicitly.
+
+- ``packet-thread-queue-size`` - specify the size of the queue used by each
+ thread to process packets. Supported values are: 0 (unlimited), any positive
+ number sets size explicitly.
+
+An example configuration that sets these parameter looks as follows:
+
+::
+
+ "Dhcp4": {
+ "enable-multi-threading": true,
+ "packet-thread-pool-size": 4,
+ "packet-thread-queue-size": 16,
+ ...
+ }
+
.. _host-reservation-v4:
Host Reservation in DHCPv4
container serving mulitple purposes. As long as no other purpose also
writes an "ISC" element to user-context there should not be a conflict.
+.. _dhcp6-multi-threading-settings:
+
+Multi-threading settings
+------------------------
+
+The Kea server can be configured to process packets in parallel using multiple
+threads. Related setting for this feature are:
+
+- ``enable-multi-threading`` - use multiple threads to process packets in
+ parallel
+
+- ``packet-thread-pool-size`` - specify the number of threads to process
+ packets in parallel. Supported values are: 0 (autodetect), any positive
+ number sets number of threads explicitly.
+
+- ``packet-thread-queue-size`` - specify the size of the queue used by each
+ thread to process packets. Supported values are: 0 (unlimited), any positive
+ number sets size explicitly.
+
+An example configuration that sets these parameter looks as follows:
+
+::
+
+ "Dhcp6": {
+ "enable-multi-threading": true,
+ "packet-thread-pool-size": 4,
+ "packet-thread-queue-size": 16,
+ ...
+ }
+
.. _host-reservation-v6:
Host Reservation in DHCPv6
public:
/// @brief command line parameter thread count
- /// when parameter is not specified, the default value is used
- /// the default value is: -1 means disabled (single-threaded),
- /// 0 means auto-detect, other values set thread count explicitly
+ /// when parameter is not specified, the default value -1 is used
+ /// which means disabled (single-threaded), 0 means auto-detect, other
+ /// values set thread count explicitly.
static int srv_thread_count_;
/// Class methods for DHCPv4-over-DHCPv6 handler
public:
/// @brief command line parameter thread count
- /// when parameter is not specified, the default value is used
- /// the default value is: -1 means disabled (single-threaded),
- /// 0 means auto-detect, other values set thread count explicitly
+ /// when parameter is not specified, the default value -1 is used
+ /// which means disabled (single-threaded), 0 means auto-detect, other
+ /// values set thread count explicitly.
static int srv_thread_count_;
/// @note used by DHCPv4-over-DHCPv6 so must be public and static
// Set dhcp4o6-port
dhcp->set("dhcp4o6-port",
Element::create(static_cast<int>(dhcp4o6_port_)));
-
+ // Set enable-multi-threading
+ dhcp->set("enable-multi-threading",
+ Element::create(enable_multi_threading_));
+ // Set packet-thread-pool-size
+ dhcp->set("packet-thread-pool-size",
+ Element::create(static_cast<int>(pkt_thread_pool_size_)));
+ // Set packet-thread-queue-size
+ dhcp->set("packet-thread-queue-size",
+ Element::create(static_cast<int>(pkt_thread_queue_size_)));
// Set dhcp-ddns
dhcp->set("dhcp-ddns", d2_client_config_->toElement());
// Set interfaces-config