SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Practical ,Transparent Operating System Support For

 SUPERPAGES

Authors:
Juan Navarro, Sitaram Iyer, Peter Drusche, Alan Cox

Presented by:
Nadeeshani Hewage
Basics & Terminology
•   TLB?
     o Caches virtual-to-physical address mappings from the page tables
     o Faster access
•   TLB Coverage?
     o Amount of memory accessible through cached mappings, without TLB
       misses
•   Superpage
     o Memory page for larger size than a Base-page (ordinary memory page)
     o Multiple sizes
     o Single entry in TLB per superpage
•   Memory objects
     o Occupy some contiguous space in virtual memory
     o Eg: memory mapped files, code, data
•   TLB coverage decreasing with growing memory size over years
•   Motivation to increase TLB coverage without enlargening TLB size.
Constraints for Superpages
•   Page size should be supported by processor.

•   Contiguous

•   Starting address in physical & virtual address space must be a multiple of its
    size.

•   Single TLB entry for a superpage. Meaning single set of protection
    attributes and single dirty bit for a superpage.
Considerations
•   Allocation
     o Allocating physical frames for the memory object.
     o If there exists a plan to create a superpage by the OS, to satisfy the
        contiguity requirement,
           Relocation based allocation
              •  Create contiguity
              •  Physically copying allocated page frames when it is decided
                 that superpages are likely to be beneficial
                    o Software managed TLB + TLB miss handler
                    o Counter per superpage incremented at TLB miss
           Reservation based allocation
              •  Preserve contiguity
              •  Make allocation decisions at page fault time
              •  Decide preferred size of allocation on an algorithm
                    o Eg: Talluri & Hill proposed
•   Fragmentation Control
     o Release contiguous chunks of inactive memory from previous
       allocations
     o Preempt an existing partially used reservation

•   Promotion
     o Set of base pages from a potential super page satisfying constraints
       promoted to a Superpage.

•   Demotion
     o Reduce size of a superpage
           A smaller super page
           Base pages
•   Eviction
     o At a demand of memory preassure, inactive superpage is evicted from
        physical memory.
Design & Implementation
Preferred Superpage Size Policy
  o Decision made early at process execution
  o Looks only at attributes of memory object
  o Decided size
      Too large: decision overridden by preempting init reservation
      Too small: cannot be reverted
  o Policy: Pick the maximum superpage size that can be used for an object
Reservation based Allocation
•   Already spoken
Preempting Reservations
•   Free physical memory scarce/ excessively fragmented

•   Preempt reserved but unused frames

•   Choice between
     o Refusing allocation; reserving smaller extent than desired for new
       allocation
     o Preempting existing reservation which has enough unallocated frames

•   Policy: Whenever possible preempt & give space for alloaction
Incremental Promotions, Demotions
•   Promotions
     o Multiple superpage sizes exist
     o Superpage gets created when any size supported gets fully populated
       within a reservation
     o Increment smaller superpage to next larger size superpage

•   Demotions
     o A base page of a superpage targetted to be evicted by page daemon,
       causes a demotion

     o Demote to next smaller superpage size
Paging Out Dirty Superpages
•   OS keeps only single dirty bit for the whole superpage.

•   Problem: only one base page modified; cost of writing full superpage to disk
    (high cost on I/O)

•   Practice: Demote clean superpages whenever process attempts to write to
    them. Repromote later.
Reservation Lists
•   Keep track of reserved page extent that are not fully populated

•   One list per each page size supported.

•   Kept sorted by the time of their most recent page frame allocation

•   Policy: Preempt the extent whose most recent allocation, occurred least
    recently among all reservations in the list (head)
Population Map
•   Keep track of allocated base pages within each memory object
•   Queried on every page fault, should support efficient lookups.
•   Radix tree
     o Each level corresponds to a page size
     o Root: max superpage size supported
     o Non-leaf:
          # of supperpage sized virtual regions at next lower level with a
            population of at least one (somepop)
          # of supperpage sized virtual regions at next lower level fully
            populated (fullpop)
•   Used for various decisions
Wired Page clustering
•   Pages used for internal datastructures for the OS (implementation on
    FreeBSD) are wired
    (not evicted)

•   At system boot time, clustered together in physical memory.

•   Gradually as kernel allocates memory they get scattered, causes
    fragmentation

•   To avoid fragmentation, identify pages which are to be wired (internal use),
    cluster them in pools of contiguous physical memory
Evaluation
Platform & Workload
•   Platform
     o FreeBSD 4.3 kernel as a loadable module
     o Alpha 21264 processor at 500 MHz
     o four page sizes: 8KB base pages, 64KB, 512KB and 4MB superpages
     o 512MB RAM
     o 64KB data and 64KB instruction L1 caches, virtually indexed and 2-way
        associative
     o fully associative TLB with 128 entries for data and 128 for instructions
•   Workload
     o FFTW: The Fastest Fourier Transform in the West with a 200x200x200
        matrix as input
     o Matrix: A non-blocked matrix transposition of a1000x1000 matrix
     o Web: The thttpd web server servicing 50000 requests selected from an
        access log of the CS departmental web server at Rice University. The
        working set size of this trace is 238MB, while its data set is 3.6GB.
Best case benefits
•   When free memory is plentiful
    & non fragmented
     o Speedup
       (mean elapsed runtime of 3
       runs after an initial warmup)
     o TLB misses reduction
       percentage
Evaluation ctd.
•   Fragment system by running web server & feeding it with requests
•   FFTW run on fragmented system 4 times in sequence.
•   Goal : To see how quickly the system recovers just enough contiguous
    memory to build superpages
•   2 contiguity restoration techniques
     o Cache scheme
          Treat all cache pages as available, coalesces them into allocator
          0 superpages
     o Daemon scheme
          Contiguity aware page replacement + wired page clustering
          Get 20/60, 35/60, 38/60, 40/60 superpages
•   Even if the superpages implementation is there
    it requires a promising fragmentation control
    mechanism to acquire promising results.
•   With superpages and effective fragmentation control, evaluations have
    given promising results.
Thank You!

Más contenido relacionado

La actualidad más candente

Zookeeper 활용 nifi clustering
Zookeeper 활용 nifi clusteringZookeeper 활용 nifi clustering
Zookeeper 활용 nifi clusteringNoahKIM36
 
Operating Systems: Virtual Memory
Operating Systems: Virtual MemoryOperating Systems: Virtual Memory
Operating Systems: Virtual MemoryDamian T. Gordon
 
Scaling Apache Spark at Facebook
Scaling Apache Spark at FacebookScaling Apache Spark at Facebook
Scaling Apache Spark at FacebookDatabricks
 
計算力学シミュレーションに GPU は役立つのか?
計算力学シミュレーションに GPU は役立つのか?計算力学シミュレーションに GPU は役立つのか?
計算力学シミュレーションに GPU は役立つのか?Shinnosuke Furuya
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Cloudera, Inc.
 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceZeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceDatabricks
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...ScyllaDB
 
How to Automate Performance Tuning for Apache Spark
How to Automate Performance Tuning for Apache SparkHow to Automate Performance Tuning for Apache Spark
How to Automate Performance Tuning for Apache SparkDatabricks
 
Spark Performance Tuning .pdf
Spark Performance Tuning .pdfSpark Performance Tuning .pdf
Spark Performance Tuning .pdfAmit Raj
 
Fine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark JobsFine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark JobsDatabricks
 
Distributed SQL Databases Deconstructed
Distributed SQL Databases DeconstructedDistributed SQL Databases Deconstructed
Distributed SQL Databases DeconstructedYugabyte
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDatabricks
 
Page reclaim
Page reclaimPage reclaim
Page reclaimsiburu
 
Apache geode
Apache geodeApache geode
Apache geodeYogesh BG
 
Extending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use casesExtending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use casesFlink Forward
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon
 

La actualidad más candente (20)

Zookeeper 활용 nifi clustering
Zookeeper 활용 nifi clusteringZookeeper 활용 nifi clustering
Zookeeper 활용 nifi clustering
 
Operating Systems: Virtual Memory
Operating Systems: Virtual MemoryOperating Systems: Virtual Memory
Operating Systems: Virtual Memory
 
Scaling Apache Spark at Facebook
Scaling Apache Spark at FacebookScaling Apache Spark at Facebook
Scaling Apache Spark at Facebook
 
計算力学シミュレーションに GPU は役立つのか?
計算力学シミュレーションに GPU は役立つのか?計算力学シミュレーションに GPU は役立つのか?
計算力学シミュレーションに GPU は役立つのか?
 
Spark on YARN
Spark on YARNSpark on YARN
Spark on YARN
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive


 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceZeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
 
Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
 
How to Automate Performance Tuning for Apache Spark
How to Automate Performance Tuning for Apache SparkHow to Automate Performance Tuning for Apache Spark
How to Automate Performance Tuning for Apache Spark
 
Spark Performance Tuning .pdf
Spark Performance Tuning .pdfSpark Performance Tuning .pdf
Spark Performance Tuning .pdf
 
Fine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark JobsFine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark Jobs
 
Distributed SQL Databases Deconstructed
Distributed SQL Databases DeconstructedDistributed SQL Databases Deconstructed
Distributed SQL Databases Deconstructed
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache Spark
 
The Google Bigtable
The Google BigtableThe Google Bigtable
The Google Bigtable
 
Upgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DM
Upgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DMUpgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DM
Upgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DM
 
Page reclaim
Page reclaimPage reclaim
Page reclaim
 
Apache geode
Apache geodeApache geode
Apache geode
 
Extending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use casesExtending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use cases
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ Salesforce
 

Similar a Practical ,Transparent Operating System Support For Superpages

Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsJava one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsSpeedment, Inc.
 
HBase Sizing Guide
HBase Sizing GuideHBase Sizing Guide
HBase Sizing Guidelarsgeorge
 
The life and times
The life and timesThe life and times
The life and timesAbeer Naskar
 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory managementGokul Vasan
 
Dissecting Scalable Database Architectures
Dissecting Scalable Database ArchitecturesDissecting Scalable Database Architectures
Dissecting Scalable Database Architectureshypertable
 
Unit-4 swapping.pptx
Unit-4 swapping.pptxUnit-4 swapping.pptx
Unit-4 swapping.pptxItechAnand1
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesHazelcast
 
Driver development – memory management
Driver development – memory managementDriver development – memory management
Driver development – memory managementVandana Salve
 
Training Webinar: Enterprise application performance with distributed caching
Training Webinar: Enterprise application performance with distributed cachingTraining Webinar: Enterprise application performance with distributed caching
Training Webinar: Enterprise application performance with distributed cachingOutSystems
 
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxLecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxAmanuelmergia
 
08 virtual memory
08 virtual memory08 virtual memory
08 virtual memoryKamal Singh
 

Similar a Practical ,Transparent Operating System Support For Superpages (20)

Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsJava one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
 
virtual_memory (3).pptx
virtual_memory (3).pptxvirtual_memory (3).pptx
virtual_memory (3).pptx
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
Chapter08
Chapter08Chapter08
Chapter08
 
HBase Sizing Guide
HBase Sizing GuideHBase Sizing Guide
HBase Sizing Guide
 
Virtual Memory.pdf
Virtual Memory.pdfVirtual Memory.pdf
Virtual Memory.pdf
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
The life and times
The life and timesThe life and times
The life and times
 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory management
 
Dissecting Scalable Database Architectures
Dissecting Scalable Database ArchitecturesDissecting Scalable Database Architectures
Dissecting Scalable Database Architectures
 
Segmentation and paging
Segmentation and paging Segmentation and paging
Segmentation and paging
 
Unit-4 swapping.pptx
Unit-4 swapping.pptxUnit-4 swapping.pptx
Unit-4 swapping.pptx
 
Memory Management.pdf
Memory Management.pdfMemory Management.pdf
Memory Management.pdf
 
Demand paging
Demand pagingDemand paging
Demand paging
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & Techniques
 
Driver development – memory management
Driver development – memory managementDriver development – memory management
Driver development – memory management
 
Training Webinar: Enterprise application performance with distributed caching
Training Webinar: Enterprise application performance with distributed cachingTraining Webinar: Enterprise application performance with distributed caching
Training Webinar: Enterprise application performance with distributed caching
 
UNIT IV.pptx
UNIT IV.pptxUNIT IV.pptx
UNIT IV.pptx
 
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxLecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptx
 
08 virtual memory
08 virtual memory08 virtual memory
08 virtual memory
 

Último

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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 Takeoffsammart93
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 

Practical ,Transparent Operating System Support For Superpages

  • 1. Practical ,Transparent Operating System Support For SUPERPAGES Authors: Juan Navarro, Sitaram Iyer, Peter Drusche, Alan Cox Presented by: Nadeeshani Hewage
  • 2. Basics & Terminology • TLB? o Caches virtual-to-physical address mappings from the page tables o Faster access • TLB Coverage? o Amount of memory accessible through cached mappings, without TLB misses • Superpage o Memory page for larger size than a Base-page (ordinary memory page) o Multiple sizes o Single entry in TLB per superpage • Memory objects o Occupy some contiguous space in virtual memory o Eg: memory mapped files, code, data • TLB coverage decreasing with growing memory size over years • Motivation to increase TLB coverage without enlargening TLB size.
  • 3. Constraints for Superpages • Page size should be supported by processor. • Contiguous • Starting address in physical & virtual address space must be a multiple of its size. • Single TLB entry for a superpage. Meaning single set of protection attributes and single dirty bit for a superpage.
  • 4. Considerations • Allocation o Allocating physical frames for the memory object. o If there exists a plan to create a superpage by the OS, to satisfy the contiguity requirement,  Relocation based allocation • Create contiguity • Physically copying allocated page frames when it is decided that superpages are likely to be beneficial o Software managed TLB + TLB miss handler o Counter per superpage incremented at TLB miss  Reservation based allocation • Preserve contiguity • Make allocation decisions at page fault time • Decide preferred size of allocation on an algorithm o Eg: Talluri & Hill proposed
  • 5. Fragmentation Control o Release contiguous chunks of inactive memory from previous allocations o Preempt an existing partially used reservation • Promotion o Set of base pages from a potential super page satisfying constraints promoted to a Superpage. • Demotion o Reduce size of a superpage  A smaller super page  Base pages • Eviction o At a demand of memory preassure, inactive superpage is evicted from physical memory.
  • 7. Preferred Superpage Size Policy o Decision made early at process execution o Looks only at attributes of memory object o Decided size  Too large: decision overridden by preempting init reservation  Too small: cannot be reverted o Policy: Pick the maximum superpage size that can be used for an object
  • 9. Preempting Reservations • Free physical memory scarce/ excessively fragmented • Preempt reserved but unused frames • Choice between o Refusing allocation; reserving smaller extent than desired for new allocation o Preempting existing reservation which has enough unallocated frames • Policy: Whenever possible preempt & give space for alloaction
  • 10. Incremental Promotions, Demotions • Promotions o Multiple superpage sizes exist o Superpage gets created when any size supported gets fully populated within a reservation o Increment smaller superpage to next larger size superpage • Demotions o A base page of a superpage targetted to be evicted by page daemon, causes a demotion o Demote to next smaller superpage size
  • 11. Paging Out Dirty Superpages • OS keeps only single dirty bit for the whole superpage. • Problem: only one base page modified; cost of writing full superpage to disk (high cost on I/O) • Practice: Demote clean superpages whenever process attempts to write to them. Repromote later.
  • 12. Reservation Lists • Keep track of reserved page extent that are not fully populated • One list per each page size supported. • Kept sorted by the time of their most recent page frame allocation • Policy: Preempt the extent whose most recent allocation, occurred least recently among all reservations in the list (head)
  • 13. Population Map • Keep track of allocated base pages within each memory object • Queried on every page fault, should support efficient lookups. • Radix tree o Each level corresponds to a page size o Root: max superpage size supported o Non-leaf:  # of supperpage sized virtual regions at next lower level with a population of at least one (somepop)  # of supperpage sized virtual regions at next lower level fully populated (fullpop) • Used for various decisions
  • 14.
  • 15. Wired Page clustering • Pages used for internal datastructures for the OS (implementation on FreeBSD) are wired (not evicted) • At system boot time, clustered together in physical memory. • Gradually as kernel allocates memory they get scattered, causes fragmentation • To avoid fragmentation, identify pages which are to be wired (internal use), cluster them in pools of contiguous physical memory
  • 17. Platform & Workload • Platform o FreeBSD 4.3 kernel as a loadable module o Alpha 21264 processor at 500 MHz o four page sizes: 8KB base pages, 64KB, 512KB and 4MB superpages o 512MB RAM o 64KB data and 64KB instruction L1 caches, virtually indexed and 2-way associative o fully associative TLB with 128 entries for data and 128 for instructions • Workload o FFTW: The Fastest Fourier Transform in the West with a 200x200x200 matrix as input o Matrix: A non-blocked matrix transposition of a1000x1000 matrix o Web: The thttpd web server servicing 50000 requests selected from an access log of the CS departmental web server at Rice University. The working set size of this trace is 238MB, while its data set is 3.6GB.
  • 18. Best case benefits • When free memory is plentiful & non fragmented o Speedup (mean elapsed runtime of 3 runs after an initial warmup) o TLB misses reduction percentage
  • 19. Evaluation ctd. • Fragment system by running web server & feeding it with requests • FFTW run on fragmented system 4 times in sequence. • Goal : To see how quickly the system recovers just enough contiguous memory to build superpages • 2 contiguity restoration techniques o Cache scheme  Treat all cache pages as available, coalesces them into allocator  0 superpages o Daemon scheme  Contiguity aware page replacement + wired page clustering  Get 20/60, 35/60, 38/60, 40/60 superpages
  • 20. Even if the superpages implementation is there it requires a promising fragmentation control mechanism to acquire promising results.
  • 21. With superpages and effective fragmentation control, evaluations have given promising results.