Skip to contentSkip to conversation

update ipvs sysctl document

PATCH Superseded Hangbin Liu 3 participants 15 messages Feb 17, 2017 – Mar 15, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover update ipvs sysctl document

Fix and add some new ipvs sysctl options. Also use tab instead of whitespaces to indent the descriptions.

Hangbin Liu (4):
ipvs: fix sync_threshold description and add sync_refresh_period,
sync_retries
ipvs: Document sysctl sync_qlen_max and sync_sock_size
ipvs: Document sysctl sync_ports
ipvs: Document sysctl pmtu_disc

 Documentation/networking/ipvs-sysctl.txt | 68 ++++++++++++++++++++++++++++----
 1 file changed, 60 insertions(+), 8 deletions(-)
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/4 ipvs: fix sync_threshold description and add sync_refresh_period, sync_retries

Fix sync_threshold description which should have two values. Also add sync_refresh_period and sync_retries based on commit 749c42b620a9 ("ipvs: reduce sync rate with time thresholds").

---
 Documentation/networking/ipvs-sysctl.txt | 40 +++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 9 deletions(-)
Documentation/networking/ipvs-sysctl.txt +31 -9
index e6b1c02..7acaaa6 100644
@@ -185,15 +185,37 @@ secure_tcp - INTEGER
         The value definition is the same as that of drop_entry and
         drop_packet.
 
-sync_threshold - INTEGER
-        default 3
-
-        It sets synchronization threshold, which is the minimum number
-        of incoming packets that a connection needs to receive before
-        the connection will be synchronized. A connection will be
-        synchronized, every time the number of its incoming packets
-        modulus 50 equals the threshold. The range of the threshold is
-        from 0 to 49.
+sync_threshold - vector of 2 INTEGERs: sync_threshold, sync_period
+	default 3 50
+
+	It sets synchronization threshold, which is the minimum number
+	of incoming packets that a connection needs to receive before
+	the connection will be synchronized. A connection will be
+	synchronized, every time the number of its incoming packets
+	modulus sync_period equals the threshold. The range of the
+	threshold is from 0 to sync_period.
+
+	When sync_period and sync_refresh_period are 0, send sync only
+	for state changes or only once when pkts matches sync_threshold
+
+sync_refresh_period - UNSIGNED INTEGER
+	default 0
+
+	In seconds, difference in reported connection timer that triggers
+	new sync message. It can be used to avoid sync messages for the
+	specified period (or half of the connection timeout if it is lower)
+	if connection state is not changed since last sync.
+
+	This is useful for normal connections with high traffic to reduce
+	sync rate. Additionally, retry sync_retries times with period of
+	sync_refresh_period/8.
+
+sync_retries - INTEGER
+	default 0
+
+	Defines sync retries with period of sync_refresh_period/8. Useful
+	to protect against loss of sync messages. The range of the
+	sync_retries is from 0 to 3.
 
 snat_reroute - BOOLEAN
 	0 - disabled
Signature · 1 line
2.5.5
#2 lore raw

PATCH 2/4 ipvs: Document sysctl sync_qlen_max and sync_sock_size

In reply to Hangbin Liu

Document sysctl sync_qlen_max and sync_sock_size based on commit 1c003b1580e2 ("ipvs: wakeup master thread").

---
 Documentation/networking/ipvs-sysctl.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/networking/ipvs-sysctl.txt +13 -0
index 7acaaa6..7622ba5 100644
@@ -217,6 +217,19 @@ sync_retries - INTEGER
 	to protect against loss of sync messages. The range of the
 	sync_retries is from 0 to 3.
 
+sync_qlen_max - UNSIGNED LONG
+
+	Hard limit for queued sync messages that not sent yet. It defaults to
+	1/32 of the memory pages but actually represents number of messages.
+	It will protect us from allocating large parts of memory when the
+	sending rate is lower than the queuing rate.
+
+sync_sock_size - INTEGER
+	default 0
+
+	Configuration of SNDBUF (master) or RCVBUF (slave) socket limit.
+	Default value is 0 (preserve system defaults).
+
 snat_reroute - BOOLEAN
 	0 - disabled
 	not 0 - enabled (default)
Signature · 1 line
2.5.5
#3 lore raw

PATCH 3/4 ipvs: Document sysctl sync_ports

In reply to Hangbin Liu

Document sysctl sync_ports based on commit f73181c8288f ("ipvs: add support for sync threads").

---
 Documentation/networking/ipvs-sysctl.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/networking/ipvs-sysctl.txt +8 -0
index 7622ba5..e4d9235 100644
@@ -230,6 +230,14 @@ sync_sock_size - INTEGER
 	Configuration of SNDBUF (master) or RCVBUF (slave) socket limit.
 	Default value is 0 (preserve system defaults).
 
+sync_ports - INTEGER
+	default 1
+
+	The number of threads that master and backup servers can use for
+	sync traffic. Every thread will use single UDP port, thread 0 will
+	use the default port 8848 while last thread will use port
+	8848+sync_ports-1.
+
 snat_reroute - BOOLEAN
 	0 - disabled
 	not 0 - enabled (default)
Signature · 1 line
2.5.5
#4 lore raw

PATCH 4/4 ipvs: Document sysctl pmtu_disc

In reply to Hangbin Liu

Document sysctl pmtu_disc based on commit 3654e61137db ("ipvs: add pmtu_disc option to disable IP DF for TUN packets").

---
 Documentation/networking/ipvs-sysctl.txt | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/networking/ipvs-sysctl.txt +9 -0
index e4d9235..fb65d4a 100644
@@ -175,6 +175,15 @@ nat_icmp_send - BOOLEAN
         for VS/NAT when the load balancer receives packets from real
         servers but the connection entries don't exist.
 
+pmtu_disc - BOOLEAN
+	0 - disabled
+	not 0 - enabled (default)
+
+	When enabled PMTU discovery(default) and received packets larger than
+	the next MTU, we will send back FRAG_NEEDED message and drop the
+	incoming packet. But if users prefer to fragment regardless of DF bit
+	other than drop the packet, they can disable it.
+
 secure_tcp - INTEGER
         0  - disabled (default)
 
Signature · 1 line
2.5.5
maintainer
#5 lore raw
In reply to Hangbin Liu

Hello,

Quoted 2 lines · Hangbin Liu

Fix and add some new ipvs sysctl options. Also use tab instead of whitespaces to indent the descriptions.

You change only docs, so the patchset should be for
the net-next tree.

Quoted 4 lines

Hangbin Liu (4):
ipvs: fix sync_threshold description and add sync_refresh_period,
sync_retries
ipvs: Document sysctl sync_qlen_max and sync_sock_size

- we can add "are " here but then also check if lines become too long:

"Hard limit for queued sync messages that [are ]not sent yet."

You can also move the "commit" word to next line
to make checkpatch happy:

scripts/checkpatch.pl --strict /tmp/file2.patch

Quoted 2 lines

ipvs: Document sysctl sync_ports
ipvs: Document sysctl pmtu_disc

- we can make it like this:

"By default, reject with FRAG_NEEDED all DF packets that exceed the PMTU, irrespective of the forwarding method. For TUN method the flag can be disabled to fragment such packets."

Quoted 2 lines
 Documentation/networking/ipvs-sysctl.txt | 68 ++++++++++++++++++++++++++++----
 1 file changed, 60 insertions(+), 8 deletions(-)

Regards

#6 lore raw

Hi Julian,

Thanks a lot for the comments. I will send a v2 patch.

Regards
Hangbin

2017-02-19 22:04 GMT+08:00 Julian Anastasov <[email protected]>:

Quoted 41 lines

Hello,

Quoted 2 lines · Hangbin Liu

Fix and add some new ipvs sysctl options. Also use tab instead of whitespaces to indent the descriptions.

You change only docs, so the patchset should be for
the net-next tree.

Quoted 4 lines

Hangbin Liu (4):
ipvs: fix sync_threshold description and add sync_refresh_period,
sync_retries
ipvs: Document sysctl sync_qlen_max and sync_sock_size

- we can add "are " here but then also check if lines become too long:

"Hard limit for queued sync messages that [are ]not sent yet."

You can also move the "commit" word to next line
to make checkpatch happy:

scripts/checkpatch.pl --strict /tmp/file2.patch

Quoted 2 lines

ipvs: Document sysctl sync_ports
ipvs: Document sysctl pmtu_disc

- we can make it like this:

"By default, reject with FRAG_NEEDED all DF packets that exceed the PMTU, irrespective of the forwarding method. For TUN method the flag can be disabled to fragment such packets."

Quoted 2 lines
 Documentation/networking/ipvs-sysctl.txt | 68 ++++++++++++++++++++++++++++----
 1 file changed, 60 insertions(+), 8 deletions(-)

Regards

--
Julian Anastasov <[email protected]>

#7 lore raw

v2 cover update ipvs sysctl document

In reply to Hangbin Liu

Fix and add some new ipvs sysctl options. Also use tab instead of whitespaces to indent the descriptions.

V2: Fix some descriptions based on Julian's advice.

Hangbin Liu (4):
ipvs: fix sync_threshold description and add sync_refresh_period, sync_retries
ipvs: Document sysctl sync_qlen_max and sync_sock_size
ipvs: Document sysctl sync_ports
ipvs: Document sysctl pmtu_disc

 Documentation/networking/ipvs-sysctl.txt | 68 ++++++++++++++++++++++++++++----
 1 file changed, 60 insertions(+), 8 deletions(-)
Signature · 1 line
2.5.5
#8 lore raw

PATCH v2 1/4 ipvs: fix sync_threshold description and add sync_refresh_period, sync_retries

Fix sync_threshold description which should have two values. Also add sync_refresh_period and sync_retries based on commit 749c42b620a9 ("ipvs: reduce sync rate with time thresholds").

---
 Documentation/networking/ipvs-sysctl.txt | 40 +++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 9 deletions(-)
Documentation/networking/ipvs-sysctl.txt +31 -9
index e6b1c02..7acaaa6 100644
@@ -185,15 +185,37 @@ secure_tcp - INTEGER
         The value definition is the same as that of drop_entry and
         drop_packet.
 
-sync_threshold - INTEGER
-        default 3
-
-        It sets synchronization threshold, which is the minimum number
-        of incoming packets that a connection needs to receive before
-        the connection will be synchronized. A connection will be
-        synchronized, every time the number of its incoming packets
-        modulus 50 equals the threshold. The range of the threshold is
-        from 0 to 49.
+sync_threshold - vector of 2 INTEGERs: sync_threshold, sync_period
+	default 3 50
+
+	It sets synchronization threshold, which is the minimum number
+	of incoming packets that a connection needs to receive before
+	the connection will be synchronized. A connection will be
+	synchronized, every time the number of its incoming packets
+	modulus sync_period equals the threshold. The range of the
+	threshold is from 0 to sync_period.
+
+	When sync_period and sync_refresh_period are 0, send sync only
+	for state changes or only once when pkts matches sync_threshold
+
+sync_refresh_period - UNSIGNED INTEGER
+	default 0
+
+	In seconds, difference in reported connection timer that triggers
+	new sync message. It can be used to avoid sync messages for the
+	specified period (or half of the connection timeout if it is lower)
+	if connection state is not changed since last sync.
+
+	This is useful for normal connections with high traffic to reduce
+	sync rate. Additionally, retry sync_retries times with period of
+	sync_refresh_period/8.
+
+sync_retries - INTEGER
+	default 0
+
+	Defines sync retries with period of sync_refresh_period/8. Useful
+	to protect against loss of sync messages. The range of the
+	sync_retries is from 0 to 3.
 
 snat_reroute - BOOLEAN
 	0 - disabled
Signature · 1 line
2.5.5
#9 lore raw

PATCH v2 2/4 ipvs: Document sysctl sync_qlen_max and sync_sock_size

In reply to Hangbin Liu

Document sysctl sync_qlen_max and sync_sock_size based on commit 1c003b1580e2 ("ipvs: wakeup master thread").

---
 Documentation/networking/ipvs-sysctl.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Documentation/networking/ipvs-sysctl.txt +14 -0
index 7acaaa6..159d70b 100644
@@ -217,6 +217,20 @@ sync_retries - INTEGER
 	to protect against loss of sync messages. The range of the
 	sync_retries is from 0 to 3.
 
+sync_qlen_max - UNSIGNED LONG
+
+	Hard limit for queued sync messages that are not sent yet. It
+	defaults to 1/32 of the memory pages but actually represents
+	number of messages. It will protect us from allocating large
+	parts of memory when the sending rate is lower than the queuing
+	rate.
+
+sync_sock_size - INTEGER
+	default 0
+
+	Configuration of SNDBUF (master) or RCVBUF (slave) socket limit.
+	Default value is 0 (preserve system defaults).
+
 snat_reroute - BOOLEAN
 	0 - disabled
 	not 0 - enabled (default)
Signature · 1 line
2.5.5
#10 lore raw

PATCH v2 3/4 ipvs: Document sysctl sync_ports

In reply to Hangbin Liu

Document sysctl sync_ports based on commit f73181c8288f ("ipvs: add support for sync threads").

---
 Documentation/networking/ipvs-sysctl.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/networking/ipvs-sysctl.txt +8 -0
index 159d70b..a6feecd 100644
@@ -231,6 +231,14 @@ sync_sock_size - INTEGER
 	Configuration of SNDBUF (master) or RCVBUF (slave) socket limit.
 	Default value is 0 (preserve system defaults).
 
+sync_ports - INTEGER
+	default 1
+
+	The number of threads that master and backup servers can use for
+	sync traffic. Every thread will use single UDP port, thread 0 will
+	use the default port 8848 while last thread will use port
+	8848+sync_ports-1.
+
 snat_reroute - BOOLEAN
 	0 - disabled
 	not 0 - enabled (default)
Signature · 1 line
2.5.5
#11 lore raw

PATCH v2 4/4 ipvs: Document sysctl pmtu_disc

In reply to Hangbin Liu

Document sysctl pmtu_disc based on commit 3654e61137db ("ipvs: add pmtu_disc option to disable IP DF for TUN packets").

---
 Documentation/networking/ipvs-sysctl.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/networking/ipvs-sysctl.txt +8 -0
index a6feecd..0568986 100644
@@ -175,6 +175,14 @@ nat_icmp_send - BOOLEAN
         for VS/NAT when the load balancer receives packets from real
         servers but the connection entries don't exist.
 
+pmtu_disc - BOOLEAN
+	0 - disabled
+	not 0 - enabled (default)
+
+	By default, reject with FRAG_NEEDED all DF packets that exceed
+	the PMTU, irrespective of the forwarding method. For TUN method
+	the flag can be disabled to fragment such packets.
+
 secure_tcp - INTEGER
         0  - disabled (default)
 
Signature · 1 line
2.5.5
maintainer Acked-by on the v2 series
#12 lore raw
In reply to Hangbin Liu

Hello,

Quoted 10 lines · Hangbin Liu

Fix and add some new ipvs sysctl options. Also use tab instead of whitespaces to indent the descriptions.

V2: Fix some descriptions based on Julian's advice.

Hangbin Liu (4):
ipvs: fix sync_threshold description and add sync_refresh_period, sync_retries
ipvs: Document sysctl sync_qlen_max and sync_sock_size
ipvs: Document sysctl sync_ports
ipvs: Document sysctl pmtu_disc

All patches look ok to me, thanks!

Simon, can we keep this patchset while in merge window?

Quoted 5 lines
 Documentation/networking/ipvs-sysctl.txt | 68 ++++++++++++++++++++++++++++----
 1 file changed, 60 insertions(+), 8 deletions(-)
Signature · 1 line
2.5.5

Regards

--
Julian Anastasov <[email protected]>

maintainer
#13 lore raw
Quoted 16 lines · Julian Anastasov

Hello,

Quoted 10 lines · Hangbin Liu

Fix and add some new ipvs sysctl options. Also use tab instead of whitespaces to indent the descriptions.

V2: Fix some descriptions based on Julian's advice.

Hangbin Liu (4):
ipvs: fix sync_threshold description and add sync_refresh_period, sync_retries
ipvs: Document sysctl sync_qlen_max and sync_sock_size
ipvs: Document sysctl sync_ports
ipvs: Document sysctl pmtu_disc

Quoted 5 lines

All patches look ok to me, thanks!

Simon, can we keep this patchset while in merge window?

Hi,

I apologise for the extended delay in dealing with this - I have been ill.

I have queued these up for v4.12 in ipvs-next as that seems to be the most appropriate course of action at this time. Please let me know if you'd like to explore a different approach.

#14 lore raw

2017-03-13 17:14 GMT+08:00 Simon Horman <[email protected]>:

Quoted 13 lines
Quoted 7 lines
Quoted 6 lines

Hangbin Liu (4):
ipvs: fix sync_threshold description and add sync_refresh_period, sync_retries
ipvs: Document sysctl sync_qlen_max and sync_sock_size
ipvs: Document sysctl sync_ports
ipvs: Document sysctl pmtu_disc

Quoted 5 lines

All patches look ok to me, thanks!

Simon, can we keep this patchset while in merge window?

Quoted 7 lines

Hi,

I apologise for the extended delay in dealing with this - I have been ill.

I have queued these up for v4.12 in ipvs-next as that seems to be the most appropriate course of action at this time. Please let me know if you'd like to explore a different approach.

Hi Simon,

Thanks a lot for taking care of this. I'm OK with the schedule.

Hope you can be well soon.

Best Wishes
Hangbin