On Sep 4, 2013, at 5:02 PM, [email protected] wrote:
> Updated Branches:
> refs/heads/master ebe3502c1 -> 1b75d0f0f
>
>
> TS-2168 Make RecordsConfig.cc more inline with default builds.
>
>
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1b75d0f0
> Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1b75d0f0
> Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1b75d0f0
I'm not sure I like this, because it means it would be impossible to implement
TS-1882 ("ATS doesn't warn about unknown config items").
What I would like is one of
1) Set the defaults to 0 consistently, as it was.
2) Make the entries in records.config.default.in also conditional (I don't know
if this is possible).
#2 still has the problem that it could generate errors later on when someone
switches ATS build or configs, but that's probably OK.
Also, the new text in records.config is *much* too verbose IMO. Attached is a
proposed new format. This also includes what I think is a bug fix, the debug
config restricts to values 0 or 1, but there are two bit fields, so it should
be at least 0-3.
Cheers,
-- Leif
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 919675f..c1fec36 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1944,14 +1944,14 @@ RecordElement RecordsConfig[] = {
//# Using for Reclaimable InkFreeList memory pool
//#
//############
- {RECT_CONFIG, "proxy.config.allocator.debug_filter", RECD_INT, "0",
RECU_NULL, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
+ {RECT_CONFIG, "proxy.config.allocator.enable_reclaim", RECD_INT, "1",
RECU_NULL, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.allocator.max_overage", RECD_INT, "3",
RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.allocator.enable_reclaim", RECD_INT, "1",
RECU_NULL, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.allocator.reclaim_factor", RECD_FLOAT, "0.3",
RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
+ {RECT_CONFIG, "proxy.config.allocator.debug_filter", RECD_INT, "0",
RECU_NULL, RR_NULL, RECC_NULL, "[0-3]", RECA_NULL}
+ ,
#endif /* TS_USE_RECLAIMABLE_FREELIST */
//############
diff --git a/proxy/config/records.config.default.in
b/proxy/config/records.config.default.in
index a5abe55..900d571 100644
--- a/proxy/config/records.config.default.in
+++ b/proxy/config/records.config.default.in
@@ -606,35 +606,24 @@ CONFIG proxy.config.diags.show_location INT 0
#
# Configuration for Reclaimable InkFreeList memory pool
#
-# NOTE: The following options are no meaningful unless compiles TrafficServer
-# with '--enable-reclaimable-freelist' option. Looks like:
-# $ ./configure --enable-reclaimable-freelist
+# NOTE: The following options are meaningfull only when Traffic Server is
+# compiled with the following option to configure:
+#
+# --enable-reclaimable-freelist
#
##############################################################################
- # Dump debug information according bit mask of debug_filter, if a bit is set
- # in the mask, then debug information of the corresponding action are dumped:
- # bit 0: reclaim memory in ink_freelist_new
- # bit 1: allocate memory from partial-free Chunks(if exist) or OS
- # NOTE: This option make no sense unless compiles TrafficServer
- # with '--enable-reclaimable-freelist' option.
-CONFIG proxy.config.allocator.debug_filter INT 0
- # The value of enable_reclaim should be 0 or 1. Default 1, reclaim enabled.
- # NOTE: This option make no sense unless compiles TrafficServer
- # with '--enable-reclaimable-freelist' option.
-CONFIG proxy.config.allocator.enable_reclaim INT 1
- # The value of reclaim_factor should be in 0.0 ~ 1.0, allocator use it to
- # calculate average value of idle memory in InkFreeList, which will determine
- # when to reclaim memory. The larger the value, the faster the reclaiming.
- # This value is effective only when enable_reclaim is 1.
- # NOTE: This option make no sense unless compiles TrafficServer
- # with '--enable-reclaimable-freelist' option.
+CONFIG proxy.config.allocator.enable_reclaim INT 1
+ # The value of reclaim_factor should be in the 0.0 to 1.0 range. Allocators
+ # use it to calculate size of unused memory, which is used to determine when
+ # to reclaim memory. The larger the value, the more aggressive reclaims.
CONFIG proxy.config.allocator.reclaim_factor FLOAT 0.300000
# Allocator will reclaim memory only when it continuously satisfy the reclaim
- # condition for max_overage times. This value is effective only when
- # enable_reclaim is 1.
- # NOTE: This option make no sense unless compiles TrafficServer
- # with '--enable-reclaimable-freelist' option.
+ # condition for max_overage continuous checks.
CONFIG proxy.config.allocator.max_overage INT 3
+ # For debugging, enable debug_filter, which is a bit-map with these fields:
+ # bit 0: reclaim memory in ink_freelist_new
+ # bit 1: allocate memory from partial-free Chunks(if exist) or OS
+CONFIG proxy.config.allocator.debug_filter INT 0
##############################################################################
#