Optimizing Redis for Locality and Capacity
Kevin C., Yoongu K. Lavanya S. 15-799 Project Presentation 12/4/2013
1
Optimizing Redis for Locality and Capacity Kevin C., Yoongu K. - - PowerPoint PPT Presentation
Optimizing Redis for Locality and Capacity Kevin C., Yoongu K. Lavanya S. 15-799 Project Presentation 12/4/2013 1 Goals of Our Project Leverage DRAM and dataset characteristics to improve performance of in-memory database Locality :
1
2
3
Bus
4
Bus
Banks can be accessed in parallel
5
6
Virtual Page Number Offset Physical Page Number Offset
DRAM System Bank
Unexposed to the system: Determined by the HW (memory controller)
7
Virtual Address Physical Address
8
Input: addr1 & addr2
Courtesy: Backbone kernel module is obtained from Hyoseung Kim under Prof. Rajkumar
9
Physical Page Number Offset Physical Address Offset Bank Row Row
12 13 15 16 18 Byte offset within a row (8KB) XOR bit [15:13] with bit [18:16] to select a bank
10
P0 Bank 0 P1 Bank 1 P7 Bank 7
Rows
P9 P8 …
0x0000 0x2000 0xFFFF 0x4000
P0 P1
8KB Physical Address Space
Offset Bank Row Row
12 13 15 16 18 Byte offset within a row (8KB) XOR bit [15:13] with bit [18:16] to select a bank
11
Request Type Approximate Latency (CPU cycles) Cache hit 30 Row hit in the same bank 170 Row hit in a different bank 220 Row miss 270
60% increase
12
Base Base + 8KB
Row X Bank Y
Base + (9 * 8KB)
Row X+1 Bank Y … Test 1: Striding within a row
Test 2: Zigzag b/w 2 rows in the same bank
13
14
15
0.05 0.1 0.15 0.2 0.25 0.3 0.35
Fraction of Cycles Number of Random Queries
Set Cycle Fraction Get Cycle Fraction
16
0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 2 4 64 128 8192 16384 32768 65536
Fraction Of Cycles Payload Size Set Fraction
17
Row X Bank Y Row X+1 Bank Y …
18
1. XML dump of current revisions for all English articles
pages-articles.xml.bz2
2. Article hit-count log (one hour)
11/pagecounts-20131105-000001.gz
19
– Spam and/or invalid user queries – ASCII vs. UTF-8 vs. ISO/IEC 8859-1 – URI escape characters, HTML escape characters – Running out of memory
20