Faster Slab Reassignment in memcached
Daniel Byrne
djbyrne@mtu.edu
Nilufer Onder
nilufer@mtu.edu
Zhenlin Wang
zlwang@mtu.edu
Department of Computer Science Michigan Technological University
MEMSYS 2019
1/29 Byrne, Onder, Wang; MEMSYS 2019
Faster Slab Reassignment in memcached Daniel Byrne Nilufer Onder - - PowerPoint PPT Presentation
Faster Slab Reassignment in memcached Daniel Byrne Nilufer Onder Zhenlin Wang djbyrne@mtu.edu nilufer@mtu.edu zlwang@mtu.edu Department of Computer Science Michigan Technological University MEMSYS 2019 1/29 Byrne, Onder, Wang; MEMSYS 2019
1/29 Byrne, Onder, Wang; MEMSYS 2019
2/29 Byrne, Onder, Wang; MEMSYS 2019
DB RecSys AdSrv
web image msg 100 µs 10,000 µs
3/29 Byrne, Onder, Wang; MEMSYS 2019
4/29 Byrne, Onder, Wang; MEMSYS 2019
4/29 Byrne, Onder, Wang; MEMSYS 2019
5/29 Byrne, Onder, Wang; MEMSYS 2019
6/29 Byrne, Onder, Wang; MEMSYS 2019
Class 1
Slab 1 Slab 2 Slab N
...
Class N
Slab 1 Slab 2 Slab N
... …
LRU HEAD LRU TAIL
7/29 Byrne, Onder, Wang; MEMSYS 2019
◮ Working set sizes can change over time ◮ An application may change its item size distribution
◮ LAMA, ATC ’15 ◮ mPart, ISMM ’18
8/29 Byrne, Onder, Wang; MEMSYS 2019
9/29 Byrne, Onder, Wang; MEMSYS 2019
class1 class2
25 50 75 100 100 200 300 400 100 200 300 400
GET Requests (Millions) Slabs Speed
default
phase 1 phase 2
10/29 Byrne, Onder, Wang; MEMSYS 2019
0.2 0.3 0.4 25 50 75 100 GET Requests (Millions) Miss Ratio Slab Speed
default
11/29 Byrne, Onder, Wang; MEMSYS 2019
Class 1
Slab 1 Slab 2
Class 2
Slab 1 Slab 2 Slab 1 - Class 1
Slab reassignment thread
12/29 Byrne, Onder, Wang; MEMSYS 2019
Class 1
Slab 1 Slab 2
Class 2
Slab 1 Slab 2 Slab 1 - Class 1
Slab reassignment thread
12/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
13/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 3 - Class 2
13/29 Byrne, Onder, Wang; MEMSYS 2019
◮ Slab reassign thread detected that the item was in use and
Slab 1 - Class 1
New item gets allocated to slot
14/29 Byrne, Onder, Wang; MEMSYS 2019
◮ Slab reassign thread detected that the item was in use and
Slab 1 - Class 1
Have to free and unlink again!
14/29 Byrne, Onder, Wang; MEMSYS 2019
15/29 Byrne, Onder, Wang; MEMSYS 2019
16/29 Byrne, Onder, Wang; MEMSYS 2019
◮ Removes was busy waiting on recently freed items ◮ Stops items from being allocated to recently freed slots 17/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
18/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
18/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 1 - Class 1
18/29 Byrne, Onder, Wang; MEMSYS 2019
Slab 3 - Class 2
18/29 Byrne, Onder, Wang; MEMSYS 2019
19/29 Byrne, Onder, Wang; MEMSYS 2019
◮ Two-Phase ◮ Time-Varying
20/29 Byrne, Onder, Wang; MEMSYS 2019
class1 class2
25 50 75 100 100 200 300 400 100 200 300 400
GET Requests (Millions) Slabs Speed
default fast
phase 1 phase 2
21/29 Byrne, Onder, Wang; MEMSYS 2019
0.2 0.3 0.4 25 50 75 100 GET Requests (Millions) Miss Ratio Slab Speed
default fast
22/29 Byrne, Onder, Wang; MEMSYS 2019
23/29 Byrne, Onder, Wang; MEMSYS 2019
24/29 Byrne, Onder, Wang; MEMSYS 2019
25/29 Byrne, Onder, Wang; MEMSYS 2019
0.2 0.3 0.4 0.5 1000 2000 3000 4000 GET Requests (Millions) Miss Ratio Slab Speed
default fast
26/29 Byrne, Onder, Wang; MEMSYS 2019
27/29 Byrne, Onder, Wang; MEMSYS 2019
28/29 Byrne, Onder, Wang; MEMSYS 2019
29/29 Byrne, Onder, Wang; MEMSYS 2019