babelfish fusing address translations for containers
play

BabelFish: Fusing Address Translations for Containers Dimitrios - PowerPoint PPT Presentation

BabelFish: Fusing Address Translations for Containers Dimitrios Skarlatos, Umur Darbaz, Bhargava Gopireddy, Nam Sung Kim, and Josep Torrellas University of Illinois at Urbana-Champaign skarlat2@illinois.edu ISCA 2020 Conventional Cloud


  1. BabelFish: Fusing Address Translations for Containers Dimitrios Skarlatos, Umur Darbaz, Bhargava Gopireddy, Nam Sung Kim, and Josep Torrellas University of Illinois at Urbana-Champaign skarlat2@illinois.edu ISCA 2020

  2. Conventional Cloud Computing App App Lib Lib Virtual Machines Guest OS Guest OS Hypervisor Hardware 2

  3. New Era in Cloud Computing App App App 1. Lightweight Containers Lib Lib Lib 2. Faster bringup Container Engine Operating System 3. Higher consolidation OS automatically Hardware shares resources! 3

  4. Containers in the Cloud Pod Application Binary Library High number of containers Replicated Containers Container Engine Operating System Very frequent context switches Scalability Hardware Serverless & Fault Tolerance Function-as-a-Service (FaaS) • Cold start effects Load Balancing • Very short runtime Shared Data Pages 4

  5. Problem: Replicated VA à PA Translations Pod Application Binary Library High number of containers Replicated Containers Container Engine 1. TLB thrashing Operating System Very frequent context switches Scalability 2. Redundant page table work Hardware Serverless & Fault Tolerance Function-as-a-Service (FaaS) • Cold start effects Load Balancing • Very short runtime Shared Data Pages 5

  6. Solution: Share VA à PA Translations Pod Application Binary Library High number of containers Replicated Containers Container Engine 1. Minimize TLB thrashing Operating System Very frequent context switches Scalability 2. Eliminate redundant page table work Hardware Serverless & Fault Tolerance Function-as-a-Service (FaaS) • Cold start effects Load Balancing • Very short runtime Shared Data Pages 6

  7. Contribution: BabelFish HW and OS support to share translations across containers 1. Introduce Container Context IDentifiers (CCID) 2. Extend TLB design 3. Share page tables Performance improvement Data-serving: 11%-18% Compute: 11% Function-as-a-Service: 10-55% Container bring-up: 8% “The Babel fish is small, yellow, leech-like, and probably the oddest thing in the Universe. The practical upshot of all this is that if you stick a Babel fish in your ear you can instantly understand anything said to you in any form of language.” The Hitchhiker's Guide to the Galaxy – Douglas Adams 7

  8. Problem: TLB Bloat Main Memory Container A PA 4 Page Tables A VA 1 PA 4 L1 L2 L3 Core Cache Cache Cache TLB 8

  9. Problem: TLB Bloat Main Memory Container A PA 4 Page Tables A VA 1 PA 4 VA1 PA4 L1 L2 L3 Core Cache Cache Cache Issue LD VA 1 TLB TLB Miss à “Page Walk” = Fetch entry from page table 9

  10. Problem: TLB Bloat Main Memory Container A PA 4 Page Tables A VA 1 PA 4 L1 L2 L3 Core Cache Cache Cache TLB VA1 PA4 PCID Existing Process Context IDentifiers (PCID) 10

  11. Problem: TLB Bloat Main Memory Container B PA 4 Page Tables B VA 1 PA 4 VA1 PA4 L1 L2 L3 Core Cache Cache Cache Issue LD VA 1 TLB VA1 PA4 PCID PCID VA1 PA4 What if we could identify shared entries? TLB Miss à “Page Walk” = Fetch entry from page table 11

  12. Problem: TLB Bloat Main Memory Container B PA 4 Page Tables B VA 1 PA 4 L1 L2 L3 Core Cache Cache Cache TLB PA4 VA1 VA1 PA4 What if we could identify shared entries? 12

  13. Solution: BabelFish TLB Main Memory Container Context Identifier (CCID) Container A Container B PA 4 Page Tables B VA 1 PA 4 L1 L2 L3 Core Cache Cache Cache TLB PA4 CCID VA1 VA1 PA4 Unlimited sharing of translations among any number of containers! 13

  14. Solution: BabelFish TLB Main Memory Container Context Identifier (CCID) Container A Container B Container C PA 4 Page Tables B VA 1 PA 4 L1 L2 L3 Core Cache Cache Cache TLB PrivateCopy (PC) PA4 CCID PC VA1 VA1 PA4 VA à PA shared for some containers & private for others 14

  15. Solution: BabelFish TLB Main Memory Container Context Identifier (CCID) Container A Container B Container C PA 4 Page Tables B VA 1 PA 4 L1 L2 L3 Core Cache Cache Cache TLB PrivateCopy (PC) PA4 CCID PC VA1 VA1 PA4 VA à PA shared for some containers VA1 PA6 CCID PC & private for others 15

  16. Problem: Page Table Entry Bloat Main Memory Container A PA 4 Page Tables A VA 1 PA 4 VA 1 PA 4 VA 1 PA 4 VA1 PA4 L1 L2 L3 Core Cache Cache Cache TLB VA1 PA4 PCID 16

  17. Problem: Page Table Entry Bloat Main Memory Container B PA 4 Page Tables A VA 1 PA 4 VA 1 PA 4 VA 1 PA 4 L1 L2 L3 Core Cache Cache Cache VA 1 PA 4 VA 1 PA 4 Page Tables B TLB VA 1 PA 4 VA1 PA4 VA1 PA4 PCID VA1 PA4 PCID 17

  18. Problem: Lazy Page Table Management Main Memory Container A PA 4 Present bit Page Tables A VA 1 PA 4 P L1 L2 L3 Core Cache Cache Cache Page Tables B TLB VA 1 PA 4 P 18

  19. Problem: Lazy Page Table Management Main Memory Container A Present bit currently cleared PA 4 Page Tables A VA 1 PA 4 P L1 L2 L3 Core Cache Cache Cache Page Tables B TLB VA 1 PA 4 P 19

  20. Problem: Lazy Page Table Management Main Memory Container A Page Tables A VA 1 PA 4 P P VA1 PA4 L1 L2 L3 Core Cache Cache Cache Issue LD VA 1 Page Tables B TLB VA 1 PA 4 P PA 4 Page Fault! Storage 20

  21. Problem: Lazy Page Table Management Main Memory Present bit set Container A PA 4 Present bit remains cleared Page Tables A P VA 1 PA 4 P L1 L2 L3 Core Cache Cache Cache Issue LD VA 1 Page Tables B TLB VA 1 PA 4 P Page Fault! Storage 21

  22. Problem: Lazy Page Table Management Main Memory Present bit set Container B PA 4 Page Tables A P VA 1 PA 4 P L1 L2 L3 Core Cache Cache Cache Issue LD VA 1 Page Tables B TLB VA 1 PA 4 P P P VA1 PA4 Page Fault! 22

  23. Conventional Page Tables Virtual Address 47 … 39 38 … 30 29 … 21 20 … 12 11 … 0 9-bits 9-bits 9-bits 9-bits 12-bits Container A + + CR3 0 pmd _t + pte_t To TLB + PGD PUD PMD PTE 23

  24. Conventional Page Tables Virtual Address 47 … 39 38 … 30 29 … 21 20 … 12 11 … 0 9-bits 9-bits 9-bits 9-bits 12-bits Container A + + CR3 0 pmd _t + pte_t To TLB + PGD Container B PUD PMD PTE + CR3 1 + + pmd_t To TLB pte_t + PGD PUD PMD PTE 24

  25. Conventional Page Tables Virtual Address 47 … 39 38 … 30 29 … 21 20 … 12 11 … 0 9-bits 9-bits 9-bits 9-bits 12-bits Container A + + CR3 0 pmd _t + pte_t To TLB + PGD Container B PUD PMD PTE + CR3 1 + + pmd_t To TLB pte_t + PGD PUD PMD PTE 25

  26. Solution: BabelFish Page Table Sharing Virtual Address 47 … 39 38 … 30 29 … 21 20 … 12 11 … 0 9-bits 9-bits 9-bits 9-bits 12-bits Container A + + CR3 0 pmd _t + pte_t To TLB PGD Container B PUD + PMD PTE + CR3 1 + + pmd_t PGD PUD PMD 26

  27. Example Container A: Runs on Core 0, requests VA à PA Container B: Runs on Core 1, requests VA à PA Container C: Runs on Core 0, requests VA à PA 28

  28. Example Page Walk Cache (PWC) Time Conventional Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 0 Miss Miss Miss Walk Walk Walk Walk Fault L2 Cache Miss, L3 Cache Miss, Main Memory Hit 29

  29. Example Time Conventional Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 0 Miss Miss Miss Walk Walk Walk Walk Fault Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 1 Miss Miss Miss Walk Walk Walk Walk Fault 30

  30. Example Time Conventional Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 0 Miss Miss Miss Walk Walk Walk Walk Fault Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 1 Miss Miss Miss Walk Walk Walk Walk Fault PGD PUD PMD PTE Page Issue LD V1 L1 TLB L2 TLB PWC Walk Walk Walk Walk Fault Core 0 Miss Miss Miss 31

  31. Example Time Conventional Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 0 Miss Miss Miss Walk Walk Walk Walk Fault Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 1 Miss Miss Miss Walk Walk Walk Walk Fault PGD PUD PMD PTE Page Issue LD V1 L1 TLB L2 TLB PWC Walk Walk Walk Walk Fault Core 0 Miss Miss Miss Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page BabelFish Core 0 Miss Miss Miss Walk Walk Walk Walk Fault 32

  32. Example Time Conventional Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 0 Miss Miss Miss Walk Walk Walk Walk Fault Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page Core 1 Miss Miss Miss Walk Walk Walk Walk Fault PGD PUD PMD PTE Page Issue LD V1 L1 TLB L2 TLB PWC Walk Walk Walk Walk Fault Core 0 Miss Miss Miss Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Page BabelFish Core 0 Miss Miss Miss Walk Walk Walk Walk Fault Issue LD V1 L1 TLB L2 TLB PWC PGD PUD PMD PTE Walk Walk Walk Core 1 Miss Miss Miss Walk L2 Cache Miss, L3 Cache Hit 33

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend