You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2015/05/02 04:52:46 UTC

[1/2] trafficserver git commit: TS-3484 Make inactivity_cop frequency (schedule) configurable

Repository: trafficserver
Updated Branches:
  refs/heads/master 566194cc9 -> fc8eeb6e4


TS-3484 Make inactivity_cop frequency (schedule) configurable


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ad77de62
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ad77de62
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ad77de62

Branch: refs/heads/master
Commit: ad77de622bfd717efbd279bdb0cc1315a6fa78a9
Parents: 566194c
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Apr 3 09:04:19 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri May 1 20:51:00 2015 -0600

----------------------------------------------------------------------
 doc/reference/configuration/records.config.en.rst | 6 ++++++
 iocore/net/UnixNet.cc                             | 7 ++++++-
 mgmt/RecordsConfig.cc                             | 2 ++
 3 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ad77de62/doc/reference/configuration/records.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst
index 9243747..a9a2c68 100644
--- a/doc/reference/configuration/records.config.en.rst
+++ b/doc/reference/configuration/records.config.en.rst
@@ -303,6 +303,12 @@ Network
    `proxy.process.net.default_inactivity_timeout_applied` metric
    is incremented.
 
+.. ts:cv:: CONFIG proxy.config.net.inactivity_check_frequency INT 1
+
+   How frequent (in seconds) to check for inactive connections. If you deal
+   with a lot of concurrent connections, increasing this setting can reduce
+   pressure on the system.
+
 .. ts:cv:: LOCAL proxy.local.incoming_ip_to_bind STRING 0.0.0.0 [::]
 
    Controls the global default IP addresses to which to bind proxy server ports. The value is a space separated list of IP addresses, one per supported IP address family (currently IPv4 and IPv6).

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ad77de62/iocore/net/UnixNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 03c3bec..7ffefff 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -61,6 +61,8 @@ public:
     (void)event;
     ink_hrtime now = ink_get_hrtime();
     NetHandler &nh = *get_NetHandler(this_ethread());
+
+    Debug("inactivity_cop_check", "Checking inactivity on Thread-ID #%d", this_ethread()->id);
     total_connections_in = 0;
     // Copy the list and use pop() to catch any closes caused by callbacks.
     forl_LL(UnixNetVConnection, vc, nh.open_list)
@@ -367,7 +369,10 @@ initialize_thread_for_net(EThread *thread)
 
 #ifndef INACTIVITY_TIMEOUT
   InactivityCop *inactivityCop = new InactivityCop(get_NetHandler(thread)->mutex);
-  thread->schedule_every(inactivityCop, HRTIME_SECONDS(1));
+  int cop_freq = 1;
+
+  REC_ReadConfigInteger(cop_freq, "proxy.config.net.inactivity_check_frequency");
+  thread->schedule_every(inactivityCop, HRTIME_SECONDS(cop_freq));
 #endif
 
   thread->signal_hook = net_signal_hook_function;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ad77de62/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index aa499dc..c655c20 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -826,6 +826,8 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.net.default_inactivity_timeout", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
+  {RECT_CONFIG, "proxy.config.net.inactivity_check_frequency", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  ,
 
   //##############################################################################
   //#


[2/2] trafficserver git commit: Add TS-3484 to CHANGES

Posted by zw...@apache.org.
Add TS-3484 to CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fc8eeb6e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fc8eeb6e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fc8eeb6e

Branch: refs/heads/master
Commit: fc8eeb6e430f04e4f8375e49a952e2b6e4fc7286
Parents: ad77de6
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri May 1 20:49:32 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri May 1 20:51:05 2015 -0600

----------------------------------------------------------------------
 CHANGES | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fc8eeb6e/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 1cc0ac1..3639131 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 6.0.0
 
+  *) [TS-3484] Make inactivity_cop frequency (schedule) configurable,
+   proxy.config.net.inactivity_check_frequency.
+
   *) [TS-3392] Fix static initialization order, for OSX.
    Author: Bin Zeng <bz...@linkedin.com>