diff options
author | dormando <dormando@rydia.net> | 2016-12-30 11:41:43 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2016-12-30 17:26:16 -0800 |
commit | bb174641e09feaafe80d86514375a552a5b47780 (patch) | |
tree | b2c93378eae840db7b0d4b86d1b3163f565355de | |
parent | 1223b837527b7cbb110499aeb2f4dea25b58b236 (diff) | |
download | memcached-bb174641e09feaafe80d86514375a552a5b47780.tar.gz |
tune crawler logger, fix crawler watermark
should be looking for 1% of potential reclaims, not 1% of all the items it
saw. Otherwise could be wedged into doing nothing.
-rw-r--r-- | items.c | 7 | ||||
-rw-r--r-- | logger.c | 2 |
2 files changed, 4 insertions, 5 deletions
@@ -1075,7 +1075,7 @@ static void lru_maintainer_crawler_check(struct crawler_expired_data *cdata, log /* Need to think we can free at least 1% of the items before * crawling. */ /* FIXME: Configurable? */ - uint64_t low_watermark = (s->seen / 100) + 1; + uint64_t low_watermark = (possible_reclaims / 100) + 1; rel_time_t since_run = current_time - s->end_time; /* Don't bother if the payoff is too low. */ for (x = 0; x < 60; x++) { @@ -1100,10 +1100,9 @@ static void lru_maintainer_crawler_check(struct crawler_expired_data *cdata, log next_crawls[i] = current_time + next_crawl_wait[i] + 5; LOGGER_LOG(l, LOG_SYSEVENTS, LOGGER_CRAWLER_STATUS, NULL, i, (unsigned long long)low_watermark, - (unsigned long long)possible_reclaims, + (unsigned long long)available_reclaims, (unsigned int)since_run, - next_crawls[i], - current_time, + next_crawls[i] - current_time, s->end_time - s->start_time, s->seen, s->reclaimed); @@ -50,7 +50,7 @@ static const entry_details default_entries[] = { [LOGGER_ITEM_GET] = {LOGGER_ITEM_GET_ENTRY, 512, LOG_FETCHERS, NULL}, [LOGGER_ITEM_STORE] = {LOGGER_ITEM_STORE_ENTRY, 512, LOG_MUTATIONS, NULL}, [LOGGER_CRAWLER_STATUS] = {LOGGER_TEXT_ENTRY, 512, LOG_SYSEVENTS, - "lru_crawler=%d low_mark=%llu possible_reclaims=%llu since_run=%u next_run=%d now=%d time_elapsed=%u examined=%llu reclaimed=%llu" + "lru_crawler=%d low_mark=%llu next_reclaims=%llu since_run=%u next_run=%d elapsed=%u examined=%llu reclaimed=%llu" } }; |