SlideShare a Scribd company logo
1 of 20
Performance considerations



                                         V.Saranya
                                           AP/CSE
  Sri Vidya College of Engineering and Technology,
                                     Virudhunagar
Performance considerations
• A key design objective of a computer system is
  to achieve the best possible performance at the
  lowest possible cost.
   – Price/performance ratio is a common
     measure of success.
• Performance of a processor depends on:
   – How fast machine instructions can be
     brought into the processor for execution.
   – How fast the instructions can be executed.
Interleaving
 Divides the memory system into a number of
  memory modules. Each module has its own
  address buffer register (ABR) and data buffer
  register (DBR).
 Arranges addressing so that successive words
  in the address space are placed in different
  modules.
 When requests for memory access involve
  consecutive addresses, the access will be to
  different modules.
 Since parallel access to these modules is
  possible, the average rate of fetching words
  from the Main Memory can be increased.
Methods of address layouts
                     k bits         mbits
                     Module    Address in module MM address




           ABR DBR            ABR DBR        ABR DBR

            Module             Module         Module
              0                  i             n- 1



 Consecutive words are placed in a module.
 High-order k bits of a memory address determine
  the module.
 Low-order m bits of a memory address determine
  the word within a module.
 When a block of words is transferred from main
  memory to cache, only one module is busy at a
  time.
m bits               k bits

                  Address in module       Module         MM address




  ABR       DBR          ABR        DBR            ABR     DBR

   Module                     Module                Module
                                                     k
        0                       i                   2 - 1




•Consecutive words are located in
consecutive modules.
•Consecutive addresses can be located in
consecutive modules.
•While transferring a block of data, several
memory modules can be kept busy at the
same time.
Hit Rate and Miss Penalty
 • Hit rate.
 • Miss penalty.
 • Hit rate can be improved by increasing block size,
   while keeping cache size constant
 • Block sizes that are neither very small nor very
   large give best results.
 • Miss penalty can be reduced if load-through
   approach is used when loading new blocks into
   cache.
Caches on the processor chip
• In high performance processors 2 levels
  of caches are normally used.
• Avg access time in a system with 2 levels
  of caches is
  T ave = h1c1+(1-h1)h2c2+(1-h1)(1-h2)M
Other Performance Enhancements
                     Write buffer
 Write-through:
• Each write operation involves writing to the main
  memory.
• If the processor has to wait for the write
  operation to be complete, it slows down the
  processor.
• Processor does not depend on the results of the
  write operation.
• Write buffer can be included for temporary
  storage of write requests.
• Processor places each write request into the buffer
  and continues execution.
• If a subsequent Read request references data
  which is still in the write buffer, then this data is
  referenced in the write buffer.
Write-back

• Block is written back to the main
  memory when it is replaced.
• If the processor waits for this write to
  complete, before reading the new
  block, it is slowed down.
• Fast write buffer can hold the block
  to be written, and the new block can
  be read first.
Other Performance Enhancements
Prefetching
• New data are brought into the processor when
  they are first needed.
• Processor has to wait before the data transfer is
  complete.
• Prefetch the data into the cache before they are
  actually needed, or a before a Read miss occurs.
• Prefetching can be accomplished through
  software by including a special instruction in the
  machine language of the processor.
   Inclusion of prefetch instructions increases the
    length of the programs.
• Prefetching can also be accomplished using
  hardware:
   Circuitry that attempts to discover patterns in
    memory references and then prefetches according
    to this pattern.
Other Performance Enhancements
  Lockup-Free Cache
  • Prefetching scheme does not work if it stops
    other accesses to the cache until the prefetch is
    completed.
  • A cache of this type is said to be “locked” while it
    services a miss.
  • Cache structure which supports multiple
    outstanding misses is called a lockup free cache.
  • Since only one miss can be serviced at a time, a
    lockup free cache must include circuits that keep
    track of all the outstanding misses.
  • Special registers may hold the necessary
    information about these misses.
Varnish is a HTTP
                                                           accelerator (or reverse
                                                           proxy) capable of serving
                                                           100,000    requests     a
                                                           second. Somewhat faster
                                                           than Drupal, even with
                                                           page-caching on!

Cache-hit
    User requests a URL
    Varnish checks it's cache
    Varnish retrieves the data from the cache
    Varnish delivers the data to the user.
Cache-miss
    User requests a URL
    Varnish checks it's cache - but the data isn't cached
    Varnish requests the URL from the backend
    Drupal processes the request and delivers a response to Varnish
    Varnish caches the response
    Varnish forwards the response to the user
Write through
    cache
Write through
Write Back
cache
Temporal Locality
            Temporal locality is a property of
            a single client over time; the
            same client requests the same
            response repeatedly over a
            period of time. This kind of
            locality is best served by per-
            client caches, which are already
            incorporated        into     most
            commercial clients (browsers, file
            system clients, etc.).
Spatial Locality

     Spatial locality is a property of a
     group of clients over time; one
     client requests what another has
     requested earlier. This kind of
     locality is best served by shared
     caches, known as proxy caches in
     web systems. They require that
     the cache be placed central and
     near to the set of clients, and far
     from the server.
Cache hit and cache miss

More Related Content

What's hot

Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt Arpita Naik
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemAnamika Singh
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386yash sawarkar
 
Direct Memory Access(DMA)
Direct Memory Access(DMA)Direct Memory Access(DMA)
Direct Memory Access(DMA)Page Maker
 
Storage management in operating system
Storage management in operating systemStorage management in operating system
Storage management in operating systemDeepikaT13
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unitAnuj Modi
 
Multiprocessor Architecture (Advanced computer architecture)
Multiprocessor Architecture  (Advanced computer architecture)Multiprocessor Architecture  (Advanced computer architecture)
Multiprocessor Architecture (Advanced computer architecture)vani261
 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryAnuj Modi
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systemsvampugani
 
Dma transfer
Dma transferDma transfer
Dma transfergmnithya
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
 
Memory management
Memory managementMemory management
Memory managementcpjcollege
 

What's hot (20)

Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Memory management
Memory managementMemory management
Memory management
 
Cache coherence ppt
Cache coherence pptCache coherence ppt
Cache coherence ppt
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
 
Pci,usb,scsi bus
Pci,usb,scsi busPci,usb,scsi bus
Pci,usb,scsi bus
 
Direct Memory Access(DMA)
Direct Memory Access(DMA)Direct Memory Access(DMA)
Direct Memory Access(DMA)
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Storage management in operating system
Storage management in operating systemStorage management in operating system
Storage management in operating system
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unit
 
Multiprocessor Architecture (Advanced computer architecture)
Multiprocessor Architecture  (Advanced computer architecture)Multiprocessor Architecture  (Advanced computer architecture)
Multiprocessor Architecture (Advanced computer architecture)
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Cache coherence
Cache coherenceCache coherence
Cache coherence
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
Dma transfer
Dma transferDma transfer
Dma transfer
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Memory management
Memory managementMemory management
Memory management
 
Token bus
Token busToken bus
Token bus
 

Viewers also liked (8)

Cache memory presentation
Cache memory presentationCache memory presentation
Cache memory presentation
 
Csc1401 lecture05 - cache memory
Csc1401   lecture05 - cache memoryCsc1401   lecture05 - cache memory
Csc1401 lecture05 - cache memory
 
Functional units
Functional unitsFunctional units
Functional units
 
Caches microP
Caches microPCaches microP
Caches microP
 
pipelining
pipeliningpipelining
pipelining
 
Unit 4 memory system
Unit 4   memory systemUnit 4   memory system
Unit 4 memory system
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
cache memory
cache memorycache memory
cache memory
 

Similar to Cache performance considerations

Parallel Computing
Parallel ComputingParallel Computing
Parallel ComputingMohsin Bhat
 
Elements of cache design
Elements of cache designElements of cache design
Elements of cache designRohail Butt
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.Taras Matyashovsky
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processingPage Maker
 
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxAmanuelmergia
 
Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Dharma Shukla
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutionspmanvi
 
Parallel Computing - Lec 3
Parallel Computing - Lec 3Parallel Computing - Lec 3
Parallel Computing - Lec 3Shah Zaib
 
[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching SolutionsITviec
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Limitations of memory system performance
Limitations of memory system performanceLimitations of memory system performance
Limitations of memory system performanceSyed Zaid Irshad
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Bob Pusateri
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategiesDr. Loganathan R
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache KuduAndriy Zabavskyy
 
Cache coherence
Cache coherenceCache coherence
Cache coherenceEmployee
 

Similar to Cache performance considerations (20)

Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Parallel Computing
Parallel ComputingParallel Computing
Parallel Computing
 
Elements of cache design
Elements of cache designElements of cache design
Elements of cache design
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
 
Caching
CachingCaching
Caching
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processing
 
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
 
Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019
 
22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutions
 
Parallel Computing - Lec 3
Parallel Computing - Lec 3Parallel Computing - Lec 3
Parallel Computing - Lec 3
 
[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Limitations of memory system performance
Limitations of memory system performanceLimitations of memory system performance
Limitations of memory system performance
 
Cache Coherence.pptx
Cache Coherence.pptxCache Coherence.pptx
Cache Coherence.pptx
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache Kudu
 
Cache coherence
Cache coherenceCache coherence
Cache coherence
 

More from Slideshare

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Slideshare
 
Report generation
Report generationReport generation
Report generationSlideshare
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational modelSlideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data miningSlideshare
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingSlideshare
 
What is in you
What is in youWhat is in you
What is in youSlideshare
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)Slideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning Slideshare
 

More from Slideshare (20)

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Report generation
Report generationReport generation
Report generation
 
Trigger
TriggerTrigger
Trigger
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
OLAP
OLAPOLAP
OLAP
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
What is in you
What is in youWhat is in you
What is in you
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Logic agent
Logic agentLogic agent
Logic agent
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Neural networks
Neural networksNeural networks
Neural networks
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Neural networks
Neural networksNeural networks
Neural networks
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 

Recently uploaded

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 

Recently uploaded (20)

LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 

Cache performance considerations

  • 1. Performance considerations V.Saranya AP/CSE Sri Vidya College of Engineering and Technology, Virudhunagar
  • 2. Performance considerations • A key design objective of a computer system is to achieve the best possible performance at the lowest possible cost. – Price/performance ratio is a common measure of success. • Performance of a processor depends on: – How fast machine instructions can be brought into the processor for execution. – How fast the instructions can be executed.
  • 3. Interleaving  Divides the memory system into a number of memory modules. Each module has its own address buffer register (ABR) and data buffer register (DBR).  Arranges addressing so that successive words in the address space are placed in different modules.  When requests for memory access involve consecutive addresses, the access will be to different modules.  Since parallel access to these modules is possible, the average rate of fetching words from the Main Memory can be increased.
  • 4. Methods of address layouts k bits mbits Module Address in module MM address ABR DBR ABR DBR ABR DBR Module Module Module 0 i n- 1  Consecutive words are placed in a module.  High-order k bits of a memory address determine the module.  Low-order m bits of a memory address determine the word within a module.  When a block of words is transferred from main memory to cache, only one module is busy at a time.
  • 5. m bits k bits Address in module Module MM address ABR DBR ABR DBR ABR DBR Module Module Module k 0 i 2 - 1 •Consecutive words are located in consecutive modules. •Consecutive addresses can be located in consecutive modules. •While transferring a block of data, several memory modules can be kept busy at the same time.
  • 6. Hit Rate and Miss Penalty • Hit rate. • Miss penalty. • Hit rate can be improved by increasing block size, while keeping cache size constant • Block sizes that are neither very small nor very large give best results. • Miss penalty can be reduced if load-through approach is used when loading new blocks into cache.
  • 7. Caches on the processor chip • In high performance processors 2 levels of caches are normally used. • Avg access time in a system with 2 levels of caches is T ave = h1c1+(1-h1)h2c2+(1-h1)(1-h2)M
  • 8. Other Performance Enhancements Write buffer  Write-through: • Each write operation involves writing to the main memory. • If the processor has to wait for the write operation to be complete, it slows down the processor. • Processor does not depend on the results of the write operation. • Write buffer can be included for temporary storage of write requests. • Processor places each write request into the buffer and continues execution. • If a subsequent Read request references data which is still in the write buffer, then this data is referenced in the write buffer.
  • 9. Write-back • Block is written back to the main memory when it is replaced. • If the processor waits for this write to complete, before reading the new block, it is slowed down. • Fast write buffer can hold the block to be written, and the new block can be read first.
  • 10. Other Performance Enhancements Prefetching • New data are brought into the processor when they are first needed. • Processor has to wait before the data transfer is complete. • Prefetch the data into the cache before they are actually needed, or a before a Read miss occurs. • Prefetching can be accomplished through software by including a special instruction in the machine language of the processor.  Inclusion of prefetch instructions increases the length of the programs. • Prefetching can also be accomplished using hardware:  Circuitry that attempts to discover patterns in memory references and then prefetches according to this pattern.
  • 11. Other Performance Enhancements Lockup-Free Cache • Prefetching scheme does not work if it stops other accesses to the cache until the prefetch is completed. • A cache of this type is said to be “locked” while it services a miss. • Cache structure which supports multiple outstanding misses is called a lockup free cache. • Since only one miss can be serviced at a time, a lockup free cache must include circuits that keep track of all the outstanding misses. • Special registers may hold the necessary information about these misses.
  • 12.
  • 13. Varnish is a HTTP accelerator (or reverse proxy) capable of serving 100,000 requests a second. Somewhat faster than Drupal, even with page-caching on! Cache-hit User requests a URL Varnish checks it's cache Varnish retrieves the data from the cache Varnish delivers the data to the user. Cache-miss User requests a URL Varnish checks it's cache - but the data isn't cached Varnish requests the URL from the backend Drupal processes the request and delivers a response to Varnish Varnish caches the response Varnish forwards the response to the user
  • 14. Write through cache
  • 17. cache
  • 18. Temporal Locality Temporal locality is a property of a single client over time; the same client requests the same response repeatedly over a period of time. This kind of locality is best served by per- client caches, which are already incorporated into most commercial clients (browsers, file system clients, etc.).
  • 19. Spatial Locality Spatial locality is a property of a group of clients over time; one client requests what another has requested earlier. This kind of locality is best served by shared caches, known as proxy caches in web systems. They require that the cache be placed central and near to the set of clients, and far from the server.
  • 20. Cache hit and cache miss