SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
“
Redis is
more than just
a key-value store,
it’s a lifestyle.
            –– Mathias Meyer
Fundamental data structures
for a fundamental API
    a data structure server


      lists                     sets

    sorted                     hash
     sets                     tables
user1234567890
field0:   abc…
field1:   def…
field2:   ghi…
field3:   jkl…
field4:   mno…
field5:   pqr…
field6:   stu…
field7:   vwx…
field8:   yzä…
field9:   öüß…
user1234567890
field0: abc…



                                            hash
field1: def…
field2: ghi…
field3: jkl…
                        RedisClient.java
                                           tables
field4: mno…
field5: pqr…
field6: stu…
field7: vwx…
field8: yzä…
field9: öüß…




      insert                               HMSET
       read                                HMGET
     update                                HMSET
     delete                                 DEL
Fundamental data structures
for a fundamental API
    a data structure server


      lists                     sets

    sorted                     hash
     sets                     tables
factory settings            hand-tuned
            0.5M initial size




   2.54MB                   1.62MB




             hash-max-zipmap-value 2048
The Harry Potter Approach
WWVD
What Would Voldemort Do




101 @Override
102 public int scan(…) {
104 logger.warn(
⁞     "Voldemort does not support Scan semantics");
105 return OK;
106 }
                db/voldemort/src/com/yahoo/ycsb/db/VoldemortClient.java
sorted
 sets
user1   user2   user3   user5   user8

 1       2       3        5      8…
user1   user2   user3   user5   user8

        not that easy
record name can be anything
  thus: position = hash(name)
user1   user2   user3   user5   user8

        not that easy
sorted
         sets
50% performance hit
workload A
    throughput




                 target
workload E
    throughput




                 target
workload F
    throughput




                 target
“
I think the… problem is…
believing that
there can be
“one true datastore”.
Different technologies
excel at different things.
                    –– Weixi Yen
“
I think the… problem is…
believing that
there can be
“one true datastore”.
Different technologies
excel at different things.
                    –– Weixi Yen
Memory storage is #1

                                                           Redis key space




http://spotfireblog.tibco.com/wp-content/uploads/in-memory-analytics.jpg
network bandwidth contention
memory
200 ops/sec
 single-threaded
user1234567890
field0: abc…
field1: def…
field2: ghi…
field3: jkl…
field4: mno…
field5: pqr…
field6: stu…
                        = 1 KB
field7: vwx…
field8: yzä…
field9: öüß…
user1234567890
field0: abc…
field1: def…
field2: ghi…
field3: jkl…
field4: mno…
field5: pqr…
field6: stu…
                        = 1 KB
factory page size := 32 bytes
field7: vwx…
field8: yzä…
field9: öüß…
user1234567890
field0: abc…
field1: def…
field2: ghi…
field3: jkl…
field4: mno…
field5: pqr…
field6: stu…
                        = 1 KB
factory page size := 32 bytes
field7: vwx…
field8: yzä…
field9: öüß…
values must be swapped in their entirety,
        even for complex types
user1234567890
field0: abc…
field1: def…
field2: ghi…
field3: jkl…
field4: mno…
field5: pqr…
field6: stu…
                        = 1 KB
factory page size := 32 bytes
field7: vwx…
field8: yzä…
field9: öüß…
values must be swapped in their entirety,
        even for complex types

    = 32 pages 
user1234567890
field0: abc…
field1: def…
field2: ghi…
field3: jkl…
field4: mno…
field5: pqr…
field6: stu…
                        = 1 KB
factory page size := 32 bytes
field7: vwx…
field8: yzä…
field9: öüß…
values must be swapped in their entirety,
        even for complex types

    = 32 pages 
              vm-page-size et al
user1234567890
field0: abc…
field1: def…
field2: ghi…
field3: jkl…
field4: mno…
field5: pqr…
field6: stu…
                        = 1 KB
field7: vwx…
field8: yzä…

    50% performance hit
field9: öüß…




    = 32 pages 
32-bit      64-bit



4 GB         8 TB


          large pointers
redis-cli INFO
Memory storage is #1
               meh, persistence

                                                          memory
                                                          overhead




http://www.flickr.com/photos/generationbass/4827013488/
Memory storage is #1
               meh, persistence

         load phase fails randomly                        memory
                                                          overhead




http://www.flickr.com/photos/generationbass/4827013488/
there are no silver bullets

Contenu connexe

Tendances

Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
Duy Do Phan
 
Unix cmd on_free_bsd
Unix cmd on_free_bsdUnix cmd on_free_bsd
Unix cmd on_free_bsd
小均 張
 
Character_device_driver_bbb
Character_device_driver_bbbCharacter_device_driver_bbb
Character_device_driver_bbb
Rashila Rr
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb Cluster
Chris Henry
 

Tendances (18)

Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
 
Nvvp streams-2
Nvvp streams-2Nvvp streams-2
Nvvp streams-2
 
Why Zsh is Cooler than Your Shell
Why Zsh is Cooler than Your ShellWhy Zsh is Cooler than Your Shell
Why Zsh is Cooler than Your Shell
 
Cli2 Bibalex
Cli2 BibalexCli2 Bibalex
Cli2 Bibalex
 
XS Boston 2008 Debugging Xen
XS Boston 2008 Debugging XenXS Boston 2008 Debugging Xen
XS Boston 2008 Debugging Xen
 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
 
Zsh shell-for-humans
Zsh shell-for-humansZsh shell-for-humans
Zsh shell-for-humans
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
 
Unix cmd on_free_bsd
Unix cmd on_free_bsdUnix cmd on_free_bsd
Unix cmd on_free_bsd
 
Character_device_driver_bbb
Character_device_driver_bbbCharacter_device_driver_bbb
Character_device_driver_bbb
 
仮想化環境におけるバイナリー・ポータビリティの考察 (WebAssemblyの場合)
仮想化環境におけるバイナリー・ポータビリティの考察 (WebAssemblyの場合)仮想化環境におけるバイナリー・ポータビリティの考察 (WebAssemblyの場合)
仮想化環境におけるバイナリー・ポータビリティの考察 (WebAssemblyの場合)
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
My First F-Stack
My First F-StackMy First F-Stack
My First F-Stack
 
Python & FUSE
Python & FUSEPython & FUSE
Python & FUSE
 
Test
TestTest
Test
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb Cluster
 
Why zsh is Cooler than Your Shell
Why zsh is Cooler than Your ShellWhy zsh is Cooler than Your Shell
Why zsh is Cooler than Your Shell
 

Similaire à Redis on AWS

Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
锐 张
 
Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
Logicaltrust pl
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
Yury Chemerkin
 
Low Level Exploits
Low Level ExploitsLow Level Exploits
Low Level Exploits
hughpearse
 

Similaire à Redis on AWS (20)

Driver Debugging Basics
Driver Debugging BasicsDriver Debugging Basics
Driver Debugging Basics
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Perl Memory Use 201207 (OUTDATED, see 201209 )
Perl Memory Use 201207 (OUTDATED, see 201209 )Perl Memory Use 201207 (OUTDATED, see 201209 )
Perl Memory Use 201207 (OUTDATED, see 201209 )
 
Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
 
Failure Of DEP And ASLR
Failure Of DEP And ASLRFailure Of DEP And ASLR
Failure Of DEP And ASLR
 
Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209
 
Redis — memcached on steroids
Redis — memcached on steroidsRedis — memcached on steroids
Redis — memcached on steroids
 
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
 
Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
 
[h2hc] Generic exploitation of invalid memory writes
[h2hc] Generic exploitation of invalid memory writes[h2hc] Generic exploitation of invalid memory writes
[h2hc] Generic exploitation of invalid memory writes
 
Don't dump thread dumps
Don't dump thread dumpsDon't dump thread dumps
Don't dump thread dumps
 
XESLite - Handling Event Logs in ProM
XESLite - Handling Event Logs in ProMXESLite - Handling Event Logs in ProM
XESLite - Handling Event Logs in ProM
 
Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)
 
What every data programmer needs to know about disks
What every data programmer needs to know about disksWhat every data programmer needs to know about disks
What every data programmer needs to know about disks
 
Shooting the troubles: Crashes, Slowdowns, CPU Spikes
Shooting the troubles: Crashes, Slowdowns, CPU SpikesShooting the troubles: Crashes, Slowdowns, CPU Spikes
Shooting the troubles: Crashes, Slowdowns, CPU Spikes
 
Machine learning on source code
Machine learning on source codeMachine learning on source code
Machine learning on source code
 
200 Open Source Projects Later: Source Code Static Analysis Experience
200 Open Source Projects Later: Source Code Static Analysis Experience200 Open Source Projects Later: Source Code Static Analysis Experience
200 Open Source Projects Later: Source Code Static Analysis Experience
 
Docker
DockerDocker
Docker
 
Low Level Exploits
Low Level ExploitsLow Level Exploits
Low Level Exploits
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Redis on AWS