Skip to content
Snippets Groups Projects
Commit 4cd8b77f authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "loadbalancer: support setting nbthread with variable haproxy_threads"

parents dbad6c1f e0438286
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,8 @@ keepalived_traffic_mode: "multicast" ...@@ -51,6 +51,8 @@ keepalived_traffic_mode: "multicast"
# Extended global configuration, optimization options. # Extended global configuration, optimization options.
haproxy_max_connections: 40000 haproxy_max_connections: 40000
haproxy_threads: 1
# More than 1 process is deprecated by HAProxy, prefer haproxy_threads
haproxy_processes: 1 haproxy_processes: 1
haproxy_process_cpu_map: "no" haproxy_process_cpu_map: "no"
# Matches the mariadb 10000 max connections limit # Matches the mariadb 10000 max connections limit
......
...@@ -7,6 +7,7 @@ global ...@@ -7,6 +7,7 @@ global
log {{ syslog_server }}:{{ syslog_udp_port }} {{ syslog_haproxy_facility }} log {{ syslog_server }}:{{ syslog_udp_port }} {{ syslog_haproxy_facility }}
maxconn {{ haproxy_max_connections }} maxconn {{ haproxy_max_connections }}
nbproc {{ haproxy_processes }} nbproc {{ haproxy_processes }}
nbthread {{ haproxy_threads }}
{% if (haproxy_processes | int > 1) and (haproxy_process_cpu_map | bool) %} {% if (haproxy_processes | int > 1) and (haproxy_process_cpu_map | bool) %}
{% for cpu_idx in range(0, haproxy_processes) %} {% for cpu_idx in range(0, haproxy_processes) %}
cpu-map {{ cpu_idx + 1 }} {{ cpu_idx }} cpu-map {{ cpu_idx + 1 }} {{ cpu_idx }}
......
---
features:
- |
HAProxy supports setting nbthread via variable haproxy_threads.
Threads are recommended instead of processes since HAProxy 1.8.
They cannot be used both at the same time.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment