Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5bc582e8
Commit
5bc582e8
authored
Apr 05, 2013
by
Zardosht Kasheff
Committed by
Yoni Fogel
Apr 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refs #6419, merge to main
git-svn-id:
file:///svn/toku/tokudb@55112
c7de825b-a66e-492c-adef-691d508d4ae1
parent
e2cc8596
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
ft/cachetable.cc
ft/cachetable.cc
+12
-0
No files found.
ft/cachetable.cc
View file @
5bc582e8
...
...
@@ -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_size_evicting
,
sizeof
m_size_evicting
);
// set max difference to around 500MB
int64_t
max_diff
=
(
1
<<
29
);
m_low_size_watermark
=
_size_limit
;
// these values are selected kind of arbitrarily right now as
// being a percentage more than low_size_watermark, which is provided
// by the caller.
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
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
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_current
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment