Commit 5bc582e8 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #6419, merge to main

git-svn-id: file:///svn/toku/tokudb@55112 c7de825b-a66e-492c-adef-691d508d4ae1
parent e2cc8596
...@@ -3540,13 +3540,25 @@ void evictor::init(long _size_limit, pair_list* _pl, KIBBUTZ _kibbutz, uint32_t ...@@ -3540,13 +3540,25 @@ void evictor::init(long _size_limit, pair_list* _pl, KIBBUTZ _kibbutz, uint32_t
TOKU_VALGRIND_HG_DISABLE_CHECKING(&m_ev_thread_is_running, sizeof m_ev_thread_is_running); TOKU_VALGRIND_HG_DISABLE_CHECKING(&m_ev_thread_is_running, sizeof m_ev_thread_is_running);
TOKU_VALGRIND_HG_DISABLE_CHECKING(&m_size_evicting, sizeof m_size_evicting); TOKU_VALGRIND_HG_DISABLE_CHECKING(&m_size_evicting, sizeof m_size_evicting);
// set max difference to around 500MB
int64_t max_diff = (1 << 29);
m_low_size_watermark = _size_limit; m_low_size_watermark = _size_limit;
// these values are selected kind of arbitrarily right now as // these values are selected kind of arbitrarily right now as
// being a percentage more than low_size_watermark, which is provided // being a percentage more than low_size_watermark, which is provided
// by the caller. // by the caller.
m_low_size_hysteresis = (11 * _size_limit)/10; //10% more m_low_size_hysteresis = (11 * _size_limit)/10; //10% more
if ((m_low_size_hysteresis - m_low_size_watermark) > max_diff) {
m_low_size_hysteresis = m_low_size_watermark + max_diff;
}
m_high_size_hysteresis = (5 * _size_limit)/4; // 20% more m_high_size_hysteresis = (5 * _size_limit)/4; // 20% more
if ((m_high_size_hysteresis - m_low_size_hysteresis) > max_diff) {
m_high_size_hysteresis = m_low_size_hysteresis + max_diff;
}
m_high_size_watermark = (3 * _size_limit)/2; // 50% more m_high_size_watermark = (3 * _size_limit)/2; // 50% more
if ((m_high_size_watermark - m_high_size_hysteresis) > max_diff) {
m_high_size_watermark = m_high_size_hysteresis + max_diff;
}
m_size_reserved = unreservable_memory(_size_limit); m_size_reserved = unreservable_memory(_size_limit);
m_size_current = 0; m_size_current = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment