You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2018/05/31 21:10:10 UTC

[trafficserver] branch master updated: Allow disable throttling.

This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 460377f  Allow disable throttling.
460377f is described below

commit 460377fc069b10a0c8e229428afdd9671c8935e8
Author: Susan Hinrichs <sh...@apache.org>
AuthorDate: Thu May 31 13:46:51 2018 -0500

    Allow disable throttling.
---
 doc/admin-guide/files/records.config.en.rst | 2 +-
 iocore/net/P_UnixNet.h                      | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index aa43cea..1ec213c 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -411,7 +411,7 @@ Network
    given time. Roughly 10% of these connections are reserved for origin server
    connections, i.e. from the default, only ~9,000 client connections can be
    handled. This should be tuned according to your memory size, and expected
-   work load.
+   work load.  If this is set to 0, the throttling logic is disabled.
 
 .. ts:cv:: CONFIG proxy.config.net.default_inactivity_timeout INT 86400
    :reloadable:
diff --git a/iocore/net/P_UnixNet.h b/iocore/net/P_UnixNet.h
index 400061b..c981e26 100644
--- a/iocore/net/P_UnixNet.h
+++ b/iocore/net/P_UnixNet.h
@@ -408,7 +408,7 @@ check_net_throttle(ThrottleType t)
 {
   int connections = net_connections_to_throttle(t);
 
-  if (connections >= net_connections_throttle)
+  if (net_connections_throttle != 0 && connections >= net_connections_throttle)
     return true;
 
   return false;
@@ -435,9 +435,11 @@ change_net_connections_throttle(const char *token, RecDataT data_type, RecData v
   (void)value;
   (void)data;
   int throttle = fds_limit - THROTTLE_FD_HEADROOM;
-  if (fds_throttle < 0)
+  if (fds_throttle == 0) {
+    net_connections_throttle = fds_throttle;
+  } else if (fds_throttle < 0) {
     net_connections_throttle = throttle;
-  else {
+  } else {
     net_connections_throttle = fds_throttle;
     if (net_connections_throttle > throttle)
       net_connections_throttle = throttle;

-- 
To stop receiving notification emails like this one, please contact
shinrich@apache.org.