Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[BP]MB-7497: Remove min_data_age and queue_age_cap

Change-Id: I192ce59267cf304ea3642881ff5ebf8ba9ce543f
Reviewed-on: http://review.couchbase.org/25278
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
  • Loading branch information...
commit 477cc4153072468ed6263a3fa926d85cecd58907 1 parent e71f8b9
@mikewied mikewied authored
View
2  Makefile.am
@@ -416,7 +416,7 @@ engine_tests: ep.la ep_testsuite.la
$(ENGINE_TESTS_EXTRA_OPTIONS) \
-E .libs/ep.so -t $(TEST_TIMEOUT) \
-T .libs/ep_testsuite.so \
- -e 'flushall_enabled=true;ht_size=13;ht_locks=7;;min_data_age=0;'
+ -e 'flushall_enabled=true;ht_size=13;ht_locks=7;'
test: all check-TESTS engine_tests sizes
./sizes
View
22 configuration.json
@@ -257,17 +257,6 @@
"default": "max",
"type": "size_t"
},
- "min_data_age": {
- "default": "0",
- "descr": "Minimum data stability time before persist",
- "type": "size_t",
- "validator": {
- "range": {
- "max": 86400,
- "min": 0
- }
- }
- },
"mutation_mem_threshold": {
"default": "95",
"type": "size_t"
@@ -287,17 +276,6 @@
"default": "",
"type": "std::string"
},
- "queue_age_cap": {
- "default": "900",
- "descr": "Maximum queue time before forcing persist",
- "type": "size_t",
- "validator": {
- "range": {
- "max": 86400,
- "min": 0
- }
- }
- },
"tap_ack_grace_period": {
"default": "300",
"type": "size_t"
View
2  docs/engine-params.org
@@ -38,8 +38,6 @@ memcached like this:
| mem_high_wat | int | Automatically evict when exceeding |
| | | this size. |
| mem_low_wat | int | Low water mark to aim for when evicting. |
-| min_data_age | int | Minimum data stability time before |
-| | | persist. |
| queue_age_cap | int | Maximum queue time before forcing persist. |
| couch_response_timeout | int | The maximum time to wait for couch to |
| | | respond to a persistence request before |
View
21 docs/stats.org
@@ -29,9 +29,7 @@ For introductory information on stats within membase, start with the
| ep_storage_age | Seconds since most recently |
| | stored object was initially queued |
| ep_storage_age_highwat | ep_storage_age high water mark |
-| ep_min_data_age | Minimum data age setting |
| ep_startup_time | System-generated engine startup time |
-| ep_queue_age_cap | Queue age cap setting |
| ep_max_txn_size | Max number of updates per transaction |
| ep_data_age | Seconds since most recently |
| | stored object was modified |
@@ -895,25 +893,6 @@ multiple times before hitting persistence, it starts to be clearer.
=ep_storage_age= is how long the object has been waiting to be
persisted.
-** Too Young
-
-=ep_too_young= is incremented every time an object is encountered
-whose =data age= is more recent than is allowable for the persistence
-layer.
-
-For example, if an object that was queued five minutes ago is picked
-off the =todo= queue and found to have been updated fifteen seconds
-ago, it will not be stored, =ep_too_young= will be incremented, and
-the key will go back on the input queue.
-
-** Too Old
-
-=ep_too_old= is incremented every time an object is encountered whose
-=queue age= exceeds the =ep_queue_age_cap= setting.
-
-=ep_queue_age_cap= generally exists as a safety net to prevent the
-=ep_min_data_age= setting from preventing persistence altogether.
-
** Warming Up
Opening the data store is broken into three distinct phases:
View
1  management/cbepctl
@@ -150,7 +150,6 @@ Available params for "set":
transaction.
mem_high_wat - High water mark.
mem_low_wat - Low water mark.
- min_data_age - Minimum data age before flushing data.
mutation_mem_threshold - Memory threshold (%) on the current bucket quota
for accepting a new mutation.
timing_log - path to log detailed timing stats.
View
35 src/ep.cc
@@ -43,9 +43,7 @@ class StatsValueChangeListener : public ValueChangedListener {
}
virtual void sizeValueChanged(const std::string &key, size_t value) {
- if (key.compare("min_data_age") == 0) {
- stats.min_data_age.set(value);
- } else if (key.compare("max_size") == 0) {
+ if (key.compare("max_size") == 0) {
stats.setMaxDataSize(value);
size_t low_wat = static_cast<size_t>(static_cast<double>(value) * 0.6);
size_t high_wat = static_cast<size_t>(static_cast<double>(value) * 0.75);
@@ -55,8 +53,6 @@ class StatsValueChangeListener : public ValueChangedListener {
stats.mem_low_wat.set(value);
} else if (key.compare("mem_high_wat") == 0) {
stats.mem_high_wat.set(value);
- } else if (key.compare("queue_age_cap") == 0) {
- stats.queue_age_cap.set(value);
} else if (key.compare("tap_throttle_threshold") == 0) {
stats.tapThrottleThreshold.set(static_cast<double>(value) / 100.0);
} else if (key.compare("warmup_min_memory_threshold") == 0) {
@@ -300,10 +296,6 @@ EventuallyPersistentStore::EventuallyPersistentStore(EventuallyPersistentEngine
config.addValueChangedListener("max_txn_size",
new EPStoreValueChangeListener(*this));
- stats.min_data_age.set(config.getMinDataAge());
- config.addValueChangedListener("min_data_age",
- new StatsValueChangeListener(stats));
-
stats.setMaxDataSize(config.getMaxSize());
config.addValueChangedListener("max_size",
new StatsValueChangeListener(stats));
@@ -316,10 +308,6 @@ EventuallyPersistentStore::EventuallyPersistentStore(EventuallyPersistentEngine
config.addValueChangedListener("mem_high_wat",
new StatsValueChangeListener(stats));
- stats.queue_age_cap.set(config.getQueueAgeCap());
- config.addValueChangedListener("queue_age_cap",
- new StatsValueChangeListener(stats));
-
stats.tapThrottleThreshold.set(static_cast<double>(config.getTapThrottleThreshold())
/ 100.0);
config.addValueChangedListener("tap_throttle_threshold",
@@ -2065,27 +2053,10 @@ EventuallyPersistentStore::flushOneDelOrSet(const queued_item &qi,
if (isDirty) {
dirtied = v->getDataAge();
- // Calculate stats if this had a positive time.
- rel_time_t now = ep_current_time();
- int dataAge = now - dirtied;
- int dirtyAge = now - queued;
- bool eligible = true;
-
- if (v->isPendingId()) {
- eligible = false;
- } else if (dirtyAge > stats.queue_age_cap.get()) {
- ++stats.tooOld;
- } else if (dataAge < stats.min_data_age.get()) {
- eligible = false;
- // Skip this one. It's too young.
- ++stats.tooYoung;
- }
-
- if (eligible) {
+ if (!v->isPendingId()) {
+ int dirtyAge = ep_current_time() - queued;
stats.dirtyAgeHisto.add(dirtyAge * 1000000);
- stats.dataAgeHisto.add(dataAge * 1000000);
stats.dirtyAge.set(dirtyAge);
- stats.dataAge.set(dataAge);
stats.dirtyAgeHighWat.set(std::max(stats.dirtyAge.get(),
stats.dirtyAgeHighWat.get()));
stats.dataAgeHighWat.set(std::max(stats.dataAge.get(),
View
6 src/ep_engine.cc
@@ -325,11 +325,7 @@ extern "C" {
// Handle the actual mutation.
try {
int v = atoi(valz);
- if (strcmp(keyz, "min_data_age") == 0) {
- e->getConfiguration().setMinDataAge(v);
- } else if (strcmp(keyz, "queue_age_cap") == 0) {
- e->getConfiguration().setQueueAgeCap(v);
- } else if (strcmp(keyz, "max_txn_size") == 0) {
+ if (strcmp(keyz, "max_txn_size") == 0) {
e->getConfiguration().setMaxTxnSize(v);
} else if (strcmp(keyz, "bg_fetch_delay") == 0) {
e->getConfiguration().setBgFetchDelay(v);
View
1  src/flusher.cc
@@ -168,7 +168,6 @@ bool Flusher::step(Dispatcher &d, TaskId &tid) {
<< std::endl;
LOG(EXTENSION_LOG_DEBUG, "%s", ss.str().c_str());
}
- store->stats.min_data_age = 0;
completeFlush();
LOG(EXTENSION_LOG_DEBUG, "Flusher stopped");
transition_state(stopped);
View
4 src/stats.hh
@@ -124,10 +124,6 @@ public:
Atomic<size_t> vbucketDeletionFail;
//! Beyond this point are config items
- //! Minimum data age before a record can be persisted
- Atomic<int> min_data_age;
- //! Maximum data age before a record is forced to be persisted
- Atomic<int> queue_age_cap;
//! Pager low water mark.
Atomic<size_t> mem_low_wat;
//! Pager high water mark
Please sign in to comment.
Something went wrong with that request. Please try again.