SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Memory Management – A Balancing Act



Shaheryar Iqbal


Best viewed in Microsoft PowerPoint
Agenda

Node Memory

                                            Between OS and FSG Cache
   Memory Partitioning                                          FSG Cache Percent

                                              Free Memory
       OS Managed Memory


                                     FSG Cache.
 PDE Managed Memory
                                                        Free memory availability
                Monitoring memory
                                                             Memory allocation failures

                                                                         Paging/Swapping.
        Adjusting FSG Cache
                                                             Cache Effectiveness Rate
                         DBS Cache Threshold


                                    Hash Join - HtMemAlloc

                                                      Redistribution Buffer
                                2 > 1 November 2012
Node Memory

                            4GB maximum is a limitation
Memory on hand              of the current 32 bit OS.


                                         64 bit Windows and LINUX
                                         systems are shipping with
                                         6GB (54XX) or 8GB (5500H/C).

                     # rallsh –sv memsize –k
                 How much mem on each Node

                                     Node Memory is partitioned into
                                           •OS Managed Memory and
                                                  •FSG Cache.




                       3 > 1 November 2012
Memory Partitioning between OS and FSG Cache


Free Memory
  O.S. Overhead 100 MB                              FSG (File Segment Cache)
 13 Vprocs @ 40 MB each
                                         Remaining space 3476 MB available for FSG
 1 PDE
 2 PE
 10 AMPs

  13 Vprocs @ 40 MB
               = 520 MB                                               `

Total Free Memory
                                40 MB      40 MB 40 MB        40 MB       40 MB 40 MB         40 MB
  = 100 + 520
  = 620 MB                      PE-1       PE-2 AMP-1         AMP-2       AMP-3 AMP-4   …..   AMP-10
                                Vproc      Vproc Vproc        Vproc       Vproc Vproc          Vproc
FSG Cache
Total Memory        4096   MB
               –     100   MB                          PDE (BaseVproc) – 40 MB
               –     520   MB
FSG Cache           3476   MB                         Operating System – 100 MB

                                                  Ex. 4096 MB – 4 GB Memory
                                        4 > 1 November 2012
What’s FSG CACHE PERCENT


FSG Cache       An xctl DBS Control Performance field
 Percent                          Reduces the amount of memory
                                      to be used for FSG Cache.
                                          The remaining memory is given
                                                  back to UNIX




                    5 > 1 November 2012
FSG Cache Percent (Contd)

Free Memory
• O.S. 100 MB
        FSG Cache                                      FSG (File Segment Cache)
• 13 Vprocs @ 40 MB
         = 4096
        – ( (10+2+1) * 40MB
                  = 520 MB)            80% of remaining space – 2780 MB available for FSG
• 20% of–remaining space
           100 MB
        = 3746 MB
  returned = 696 MB example of
         Let’s take an
         Adjusted FSG Size = 80
          FSG Cache Percent
Total Free i.e. the 3476 MB
            Memory
         = 80% x 20 % space will
  = 100 + 520 + 696 back to OS.
         = be returned
           2780 MB
  = 1316 MB                        20% of remaining space – 696 MB returned back to O.S/Free Mem
                                                                         `
       Added to UNIX
       = 20% x 3746 MB
FSG Cache
       = 696 MB                    40 MB      40 MB 40 MB        40 MB       40 MB 40 MB         40 MB
Total Memory      4096    MB
                –   696   MB       PE-1       PE-2 AMP-1         AMP-2       AMP-3 AMP-4   …..   AMP-10
                –  100    MB       Vproc      Vproc Vproc        Vproc       Vproc Vproc          Vproc
                –  520    MB
FSG Cache       = 2780    MB
                                                          PDE (BaseVproc) – 40 MB

                                                         Operating System – 100 MB

                                                     Ex. 4096 MB – 4 GB Memory
                                           6 > 1 November 2012
What’s in Free Memory

                             Memory managed by the O.S.
Free Memory
                                                     TERADATA VPROCS


                                                           ADMINISTRATIVE PROGRAMS:
      AMP worker tasks,
      PE tasks –
      Dictionary cache
      Request-to-Steps
      cache,
      Vprocs Communication




                                       kernel resources,
                                       program text and data,
                                       Redistribution Buffers,
                                       Aggregation Buffers,
                                       Hash Join Join Buffers,
                                       other applications.



                               7 > 1 November 2012
What’s in FSGcache

                                                                           FSG Cache
       Memory managed by the PDE.

                                          FSG Cache is used by:

                                                         FSG Cache is used for:
        •AMPs
   •Backup Activity
    Used to access
  database segments.




                                                        Permanent Data blocks
                                                        Full Cylinder read slots
                                               (CI) for Permanent Data blocks
                                                       Spool CIs & Data blocks
                                                  Transient Journal data (TJs)
                                                Permanent Journal data (PJs)
                                                         Sync Scan data blocks
                                                    Buddy Backup data blocks
                                                        Hash Join Spool Buffers
                                8 > 1 November 2012
Physical memory on a Teradata node

   Memory managed by                         Memory managed by
         O.S.                                      PDE




                       9 > 1 November 2012
Memory Monitoring

 Memory                                           WHY
 Monitoring
                                                                 WHAT

                                                                          HOW




      Memory Depletions:
       Common cause of
    Performance degradation



                       MONITOR:
                 Free memory availability,                     Examine Resusage Data:
                Memory allocation failures,                  With the same level of scrutiny
                                                              as CPU and I/O utilization.
                     Paging/Swapping.
                 Cache Effectiveness Rate



                                      10 > 1 November 2012
Memory Availability

                                                     The low happened
                                                              dips show
                                         Check ifDepletionswhen memory
                                                  hash join is frequency of
                                                    Given the enabled;
                                                 instances
                                               during differentahours of
                                                    this depletion, it could
                                           can potentially usecompletely
                                                   was low or high
                                         amount of day,memory. of the
                                                the OS all days First
                                                        be corrected by
                                                          depleted.
                                                week with noFSGcache
                                                    adjusting particular
                                          turn off hash join, see how to
                                                         pattern.value
                                                          lower
                                             much memory can be
                                                   recovered.




                  11 > 1 November 2012
Memory Allocations Failures

Two cases when Mem
Alloc Failures occurs.                          How many and how
                                                Case1:
                                                Free Mem memory
                                                frequently not
                                                available. failures
                                                allocations
                                                occur
                                                Which nodes or
                                                Case2:
                                                group of nodes are
                                                Free Mem Available.
                                                showing this pattern




                         12 > 1 November 2012
Memory Allocations Failures (Case1)

                                                         Mem Alloc Fails occurs
                                                         when FREE MEM
                                                         reaches to zero.


     FREE MEM
    zero at 14:10


              Memory Allocation
              Failures at 14:10




                                  13 > 1 November 2012
Memory Allocations Failures (Case 2)

                                                     Check peaks in redistributed
                                                     blocks and correlate to
         Memory allocation failures                  timeframes when large
         occurring but MIN FREE MEM
                Common cause of                      numbers of mem alloc failures
         MEM has not reached Concurrent row
                ALLOC fails is at 0                  occurred.
         during redistributions.
                 log interval.
                                 FREE MEM never
                  Mem Alloc Fails reaches at zero.
                                  at
         Redistribution Peak
                         22:10
              at 23:30

                  Mem Alloc Fails at
                       23:30
                                              Then memory allocation
                                              failures are coming from
                                              some subset of memory
                                              being used in the OS.
                      Redistribution Peak
                           at 22:10




                             14 > 1 November 2012
Cache Effectiveness Rate

Cache Effectiveness                                               Cache utilization is a
       Rate                                                       temporal cache hit rate
                                                                    A 70% (time-based)
                                                                    is Check Cache Hit ratio
                                                Logical Reads – Physical Reads 70%
                                                                  process. same
                                                                        not the
                                                                    of data, running level of
                                                         Logical Reads
                                                                       with the same all day
                                                                       scrutiny as CPU and
                                                                    long. It is also spatial.
    Cache Hit Ratio less than                                          I/O utilization.
      40% for a particular
           workload




                                15 > 1 November 2012
Cache FSG Percent Tuning

   Tuning memory generally                                      All memory used inside
   involves adjusting the                                       FSGcache governed by a
   FSG cache percent.                                           thresh hold (e.g., datablock
                                                                caching) will also be
                                                                affected



                                Adjusting Cache
                                  FSG Percent




  This is why it is important                               Before tuning memory, it is
  to measure cache                                          important to see trends over
  effectiveness rates before                                time e.g. take 30 days
  and after making a                                        sample
  change.

                                     16 > 1 November 2012
Summary of Steps in Cache FSG Percent tuning

                                                                Look for Low mem
1: Free Memory                                                  conditions, total
                                                                depletion
                                                                      High number of I/Os,
        2: Occurrence of                                              high memory allocation
        paging/swap I/Os                                              failure
             3: Check for use                                     If OS memory is low/depleted
           of memory intensive                                    often, turn off hash join first
                 features                                         as it does not require a
                                                                         Target effectiveness
                                                                  restart.
                                                                         rates should be above
     4: Check cache hits                                                50% (higher the better)

                      5: Check current                             Default is 80%
                      FSGcache setting
                                                                     OnIfcoexistent withrate went
                                                                          effectiveness
                                                                     frequent aftermem
                                                                        down low reducing
            6: Lower FSGcache
                                                                     conditions,it maycache size
                                                                        fsgcache, the be
            in 5-10% increments
                                                                     necessaryincreased byto
                                                                        can be to go down
                                  7: Recheck dbs
                                                                     65% at 4GB.
                                                                        tuning DBSCACHETHR
                                     cache hits
                                                                        upward in dbscontrol.
                                                8: Repeat steps
Sudden onset of                                  5-7 as needed
memory
depletion.                               17 > 1 November 2012
DBSCacheThr - Understanding DBS Cache

                                                            FSG cache is the portion
 DBS Cache                                                  of main memory
                                                            assumed available for
                                                            table data.
   DBSCacheThr                                  Case 1: SubTable/Table fits entirely of the
                                                                defines a percentage
                                                             DBScontrol tunable
                                                                FSG cache and helps control
                                                             parameter.
                                                                when data blocks are
                                                                 Only permanent and
                                                                cached.
                                                Case 2: SubTable/Table DBs can be
                                                                 spool cannot fit
                                                                 affected by this
                                                                 parameter.



             When a subtable fits                                 The table is not eligible
             entirely in this                                     for synchronized full-file
             percentage of memory,                                scan (sync scan).
             its data blocks are
             cached and aged out of fit
                 When the table cannot
             memory normally.
                 in this percentage of                               If involved in full-file
               memory, its data blocks                               scan, the table is also
               are discarded from                                    eligible for sync scan.
               memory as soon as
               possible.
                                         18 > 1 November 2012
DBSCacheThr - Understanding DBS Cache


 DBS Cache
                                                             Data in cache memory is
                                                             aged based on residency and
                                                             usage.
   DBSCacheThr                                                 purpose

                                                  We want to hold all frequently
                                                  accessed reference tables in memory.
                                                    Range and Default Values




    DBSCacheThr caching
    technique can prevent a
    large sequentially read or                                       encourages smaller (e.g.
    written table from pushing   Since the large table ’ s data      reference) tables to stay in
    other data out of the        blocks probably won ’ t be          memory longer.
    cache                        accessed again until they have
                                                           •Default value is 10 percent.
                                 aged out of memory, •caching
                                                        Range of values is 0 - 100 percent.
                                 them does little good and may
   if the size of FSGcache       cause other, more heavily-
   changes, the size of DBS      accessed blocks to age out
   cache will change with it.    prematurely.
                                      19 > 1 November 2012
HTMemAlloc -Understanding Hash Join


               What is it                                                               Hash Join

               Hash Join vs Merge Join
                            Hash Join vs Product Join
                                                                     Alternative join scheme
                                            Memory Useage           that performs better than
                                                                      some cases of merge
            Do not turn this feature on if Hash join eliminates the and product join.
                                              sorting, and possible join
                                                                          HJ builds an in-memory
                                            redistribution or copying,
                                                                           Hash Table using the
                                               of the larger table.
The memory used when                         MJ require both left and      smaller of the two join
 hash join is enabled is                    right tables to be sorted             relations.
 from the available OS
                                                                         Saves comparing every
        memory
                                                                        row in the right table with
                                                                           every row in the left
                                                                                   table.
                                                                            Right table rows are
   The ResUsage data for           Available free memory
                                                                        compared to a single hash
  the target system shows         appears to be adequate
                                                                         code in the indexed array.
   a trend of low memory            but page swaps are
     conditions already                   frequent
          present
                                          20 > 1 November 2012
Hash Join Parameters


      HTMemAllocBase = 10 MB

          HTMemAlloc = 2% (Default)                         The default of 2% is chosen
                                                                 based on having 50
                                                               concurrent hash joins
                                                            taking up a maximum 100%
                                                              of the HTMemAllocBase
        Take an example; a system                    10 MB of memory comes
                                                                        size.
        can have at max 25 concurrent                from UNIX FreekB * 50 = 10 MB
                                                                200 Memory
        users (e.g Throttling Applied)

     2% applied to
                 Set HTMemAlloc = 4%
   HTMemAllocBase                   Result when applied yields
                 4% of 10MB = 400 KB
                                     a Hash Buffer size of 200
                 400Kb * 25 Users = 10 MB      KB.
                                      2% of 10MB = 200KBPartition size
                                               New Hash
                                                     = 400KB (old 200KB)
                                               More opportunity for queries of
                                               having HJ instead of MJ or PJ.
                                                  Result :Faster executions
                                   21 > 1 November 2012
Redistribution Buffer – Memory Requirement


 Memory Requirement                         For Node Level Row Redistribution

                                                    Each AMP uses separate redistribution
                                                          buffer for each node in the system

                                       Default Redistribution buffer size
                                            = 32KB per target Node

                      Total Memory for 1 Sending AMP
                  = 32KB * number of Nodes in system




                                   22 > 1 November 2012
Redistribution Buffer - Examples

   Redistribution                                Configuration - 8 Nodes, 8 AMPs per node
  Buffer Example 1
                                                                Single Node requirement - single user
                                                                     = 32KB * 8
                                                                     = 256 KB / Redistribution
                 Multi-user - 20 concurrent users
                         = 20 * 256 KB
                         = 5 MB (not a special problem)



   Redistribution                               Configuration - 200 Nodes, 8 AMPs per node
  Buffer Example 2
                                                                Single Node requirement - single user
                                                                     = 32KB * 200
                                                                     = 6400 KB (6 MB)
                     Multi-user - 20 users
                          = 20 * 6400 KB
                          = 128 MB
                     (far exceeding 80-100 MB per AMP)

                                         23 > 1 November 2012
Redistribution Buffer - Recommendations

   Symptoms:                                       Excessive Paging/Swapping




 RECOMMENDATIONS                                         For Large Configurations:

                                                Set Node Level Redistribution buffer size
                                                   smaller , e.g. 16 KB (Default is 32 KB)
               Set FSG Cache Percent to less than 80%




                                  24 > 1 November 2012
Feed back

Shaheryar-

This is an excellent presentation.




                                     25 > 1 November 2012
Questions




The only bad question
   is the question
     never asked
                        26 > 1 November 2012

Weitere ähnliche Inhalte

Was ist angesagt?

Propaganda - Propaganda & Ramalan Jepang di Indonesia
Propaganda - Propaganda & Ramalan Jepang di IndonesiaPropaganda - Propaganda & Ramalan Jepang di Indonesia
Propaganda - Propaganda & Ramalan Jepang di IndonesiaDavid Adi Nugroho
 
Kedatangan bangsa Eropa ke Indonesia.pptx
Kedatangan bangsa Eropa ke Indonesia.pptxKedatangan bangsa Eropa ke Indonesia.pptx
Kedatangan bangsa Eropa ke Indonesia.pptxtugasips91
 
Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)
Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)
Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)Risdiana Hidayat
 
INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)
INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)
INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)Armadira Enno
 
Ppt konflik dan pergolakan yang berkait dengan ideologi
Ppt  konflik dan pergolakan yang berkait dengan ideologiPpt  konflik dan pergolakan yang berkait dengan ideologi
Ppt konflik dan pergolakan yang berkait dengan ideologiUniversity Of Tarbiyah
 
Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...
Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...
Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...bagask_25
 
SEJARAH LAHIRNYA PANCASILA.ppt
SEJARAH LAHIRNYA PANCASILA.pptSEJARAH LAHIRNYA PANCASILA.ppt
SEJARAH LAHIRNYA PANCASILA.pptFauziSulthon3
 
Rangkuman Geografi : Interaksi Spasial Desa dan Kota
Rangkuman Geografi : Interaksi Spasial Desa dan KotaRangkuman Geografi : Interaksi Spasial Desa dan Kota
Rangkuman Geografi : Interaksi Spasial Desa dan KotaNesha Mutiara
 
Myanmar uas
Myanmar uasMyanmar uas
Myanmar uasserlyna
 
PPT Aksi 1 & 2.pptx
PPT Aksi 1 & 2.pptxPPT Aksi 1 & 2.pptx
PPT Aksi 1 & 2.pptxsmkn1kobar
 
MEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptx
MEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptxMEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptx
MEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptxferzaafriansyah42
 
Perjuangan mempertahankan kemerdekaan indonesia
Perjuangan mempertahankan kemerdekaan indonesiaPerjuangan mempertahankan kemerdekaan indonesia
Perjuangan mempertahankan kemerdekaan indonesiaMeliana Siboro
 
Ppt pkn bab 1 sumpah pemuda
Ppt pkn bab 1 sumpah pemudaPpt pkn bab 1 sumpah pemuda
Ppt pkn bab 1 sumpah pemudaluluulkhasanah
 
PRESENTASI MENUJU KEMERDEKAAN RI
PRESENTASI MENUJU KEMERDEKAAN RIPRESENTASI MENUJU KEMERDEKAAN RI
PRESENTASI MENUJU KEMERDEKAAN RIputrisagut
 
Pola-Keruangan Desa dan Kota, Oke, New.ppt
Pola-Keruangan Desa dan Kota, Oke, New.pptPola-Keruangan Desa dan Kota, Oke, New.ppt
Pola-Keruangan Desa dan Kota, Oke, New.pptMukarobinspdMukarobi
 

Was ist angesagt? (20)

Propaganda - Propaganda & Ramalan Jepang di Indonesia
Propaganda - Propaganda & Ramalan Jepang di IndonesiaPropaganda - Propaganda & Ramalan Jepang di Indonesia
Propaganda - Propaganda & Ramalan Jepang di Indonesia
 
Kedatangan bangsa Eropa ke Indonesia.pptx
Kedatangan bangsa Eropa ke Indonesia.pptxKedatangan bangsa Eropa ke Indonesia.pptx
Kedatangan bangsa Eropa ke Indonesia.pptx
 
Pertemuan 3
Pertemuan 3Pertemuan 3
Pertemuan 3
 
Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)
Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)
Potensi Sumber Daya Alam dan Kemaritiman Indonesia (3)
 
INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)
INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)
INDISCHE PARTIJ (Sejarah Pergerakan Indonesia 1900-1945)
 
Ppt konflik dan pergolakan yang berkait dengan ideologi
Ppt  konflik dan pergolakan yang berkait dengan ideologiPpt  konflik dan pergolakan yang berkait dengan ideologi
Ppt konflik dan pergolakan yang berkait dengan ideologi
 
Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...
Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...
Karya Tulis Pemanfaatan Tempat Bersejarah untuk Lokasi Pariwisata sebagai Pen...
 
SEJARAH LAHIRNYA PANCASILA.ppt
SEJARAH LAHIRNYA PANCASILA.pptSEJARAH LAHIRNYA PANCASILA.ppt
SEJARAH LAHIRNYA PANCASILA.ppt
 
Rangkuman Geografi : Interaksi Spasial Desa dan Kota
Rangkuman Geografi : Interaksi Spasial Desa dan KotaRangkuman Geografi : Interaksi Spasial Desa dan Kota
Rangkuman Geografi : Interaksi Spasial Desa dan Kota
 
Myanmar uas
Myanmar uasMyanmar uas
Myanmar uas
 
PPT Aksi 1 & 2.pptx
PPT Aksi 1 & 2.pptxPPT Aksi 1 & 2.pptx
PPT Aksi 1 & 2.pptx
 
Peristiwa proklamasi 2
Peristiwa proklamasi 2Peristiwa proklamasi 2
Peristiwa proklamasi 2
 
MEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptx
MEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptxMEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptx
MEDIA PPT kerjasama dalam berbagai bidang kehidupan di masyarakat Hendri.pptx
 
Perjuangan mempertahankan kemerdekaan indonesia
Perjuangan mempertahankan kemerdekaan indonesiaPerjuangan mempertahankan kemerdekaan indonesia
Perjuangan mempertahankan kemerdekaan indonesia
 
Gerakan kebangsaan di indonesia
Gerakan kebangsaan di indonesiaGerakan kebangsaan di indonesia
Gerakan kebangsaan di indonesia
 
Ppt pkn bab 1 sumpah pemuda
Ppt pkn bab 1 sumpah pemudaPpt pkn bab 1 sumpah pemuda
Ppt pkn bab 1 sumpah pemuda
 
Pengertian Kualitas Penduduk
Pengertian Kualitas PendudukPengertian Kualitas Penduduk
Pengertian Kualitas Penduduk
 
PRESENTASI MENUJU KEMERDEKAAN RI
PRESENTASI MENUJU KEMERDEKAAN RIPRESENTASI MENUJU KEMERDEKAAN RI
PRESENTASI MENUJU KEMERDEKAAN RI
 
Ppt sejarah minat xi
Ppt sejarah minat xiPpt sejarah minat xi
Ppt sejarah minat xi
 
Pola-Keruangan Desa dan Kota, Oke, New.ppt
Pola-Keruangan Desa dan Kota, Oke, New.pptPola-Keruangan Desa dan Kota, Oke, New.ppt
Pola-Keruangan Desa dan Kota, Oke, New.ppt
 

Andere mochten auch

ABC of Teradata System Performance Analysis
ABC of Teradata System Performance AnalysisABC of Teradata System Performance Analysis
ABC of Teradata System Performance AnalysisShaheryar Iqbal
 
Understanding System Performance
Understanding System PerformanceUnderstanding System Performance
Understanding System PerformanceTeradata
 
Teradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional ModelsTeradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional Modelspepeborja
 
Teradata - Presentation at Hortonworks Booth - Strata 2014
Teradata - Presentation at Hortonworks Booth - Strata 2014Teradata - Presentation at Hortonworks Booth - Strata 2014
Teradata - Presentation at Hortonworks Booth - Strata 2014Hortonworks
 
Teradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureTeradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureMohammad Tahoon
 
Introduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksIntroduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksBigClasses Com
 
Teradata Big Data London Seminar
Teradata Big Data London SeminarTeradata Big Data London Seminar
Teradata Big Data London SeminarHortonworks
 
Teradata Overview
Teradata OverviewTeradata Overview
Teradata OverviewTeradata
 
Teradata 13.10
Teradata 13.10Teradata 13.10
Teradata 13.10Teradata
 
NYC Open Data Meetup-- Thoughtworks chief data scientist talk
NYC Open Data Meetup-- Thoughtworks chief data scientist talkNYC Open Data Meetup-- Thoughtworks chief data scientist talk
NYC Open Data Meetup-- Thoughtworks chief data scientist talkVivian S. Zhang
 
The Intelligent Thing -- Using In-Memory for Big Data and Beyond
The Intelligent Thing -- Using In-Memory for Big Data and BeyondThe Intelligent Thing -- Using In-Memory for Big Data and Beyond
The Intelligent Thing -- Using In-Memory for Big Data and BeyondInside Analysis
 
Building your data warehouse with Redshift
Building your data warehouse with RedshiftBuilding your data warehouse with Redshift
Building your data warehouse with RedshiftAmazon Web Services
 
100424 teradata cloud computing 3rd party influencers2c
100424 teradata cloud computing 3rd party influencers2c100424 teradata cloud computing 3rd party influencers2c
100424 teradata cloud computing 3rd party influencers2cguest8ebe0a8
 
Teradata Architecture
Teradata Architecture Teradata Architecture
Teradata Architecture BigClasses Com
 
Teradata introduction
Teradata introductionTeradata introduction
Teradata introductionRameejmd
 
Hadoop and the Data Warehouse: When to Use Which
Hadoop and the Data Warehouse: When to Use Which Hadoop and the Data Warehouse: When to Use Which
Hadoop and the Data Warehouse: When to Use Which DataWorks Summit
 
Partners 2013 LinkedIn Use Cases for Teradata Connectors for Hadoop
Partners 2013 LinkedIn Use Cases for Teradata Connectors for HadoopPartners 2013 LinkedIn Use Cases for Teradata Connectors for Hadoop
Partners 2013 LinkedIn Use Cases for Teradata Connectors for HadoopEric Sun
 

Andere mochten auch (20)

ABC of Teradata System Performance Analysis
ABC of Teradata System Performance AnalysisABC of Teradata System Performance Analysis
ABC of Teradata System Performance Analysis
 
Understanding System Performance
Understanding System PerformanceUnderstanding System Performance
Understanding System Performance
 
Teradata sql-tuning-top-10
Teradata sql-tuning-top-10Teradata sql-tuning-top-10
Teradata sql-tuning-top-10
 
Teradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional ModelsTeradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional Models
 
Teradata Intelligent Memory
Teradata Intelligent MemoryTeradata Intelligent Memory
Teradata Intelligent Memory
 
Teradata - Presentation at Hortonworks Booth - Strata 2014
Teradata - Presentation at Hortonworks Booth - Strata 2014Teradata - Presentation at Hortonworks Booth - Strata 2014
Teradata - Presentation at Hortonworks Booth - Strata 2014
 
Teradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureTeradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system Architecture
 
Introduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksIntroduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata Works
 
Teradata Big Data London Seminar
Teradata Big Data London SeminarTeradata Big Data London Seminar
Teradata Big Data London Seminar
 
Teradata Overview
Teradata OverviewTeradata Overview
Teradata Overview
 
Teradata 13.10
Teradata 13.10Teradata 13.10
Teradata 13.10
 
Teradata
TeradataTeradata
Teradata
 
NYC Open Data Meetup-- Thoughtworks chief data scientist talk
NYC Open Data Meetup-- Thoughtworks chief data scientist talkNYC Open Data Meetup-- Thoughtworks chief data scientist talk
NYC Open Data Meetup-- Thoughtworks chief data scientist talk
 
The Intelligent Thing -- Using In-Memory for Big Data and Beyond
The Intelligent Thing -- Using In-Memory for Big Data and BeyondThe Intelligent Thing -- Using In-Memory for Big Data and Beyond
The Intelligent Thing -- Using In-Memory for Big Data and Beyond
 
Building your data warehouse with Redshift
Building your data warehouse with RedshiftBuilding your data warehouse with Redshift
Building your data warehouse with Redshift
 
100424 teradata cloud computing 3rd party influencers2c
100424 teradata cloud computing 3rd party influencers2c100424 teradata cloud computing 3rd party influencers2c
100424 teradata cloud computing 3rd party influencers2c
 
Teradata Architecture
Teradata Architecture Teradata Architecture
Teradata Architecture
 
Teradata introduction
Teradata introductionTeradata introduction
Teradata introduction
 
Hadoop and the Data Warehouse: When to Use Which
Hadoop and the Data Warehouse: When to Use Which Hadoop and the Data Warehouse: When to Use Which
Hadoop and the Data Warehouse: When to Use Which
 
Partners 2013 LinkedIn Use Cases for Teradata Connectors for Hadoop
Partners 2013 LinkedIn Use Cases for Teradata Connectors for HadoopPartners 2013 LinkedIn Use Cases for Teradata Connectors for Hadoop
Partners 2013 LinkedIn Use Cases for Teradata Connectors for Hadoop
 

Ähnlich wie Memory Management – A Balancing Act

SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databasesAngelo Rajadurai
 
Database performance tuning for SSD based storage
Database  performance tuning for SSD based storageDatabase  performance tuning for SSD based storage
Database performance tuning for SSD based storageAngelo Rajadurai
 
IBM Solid State in eX5 servers
IBM Solid State in eX5 serversIBM Solid State in eX5 servers
IBM Solid State in eX5 serversTony Pearson
 
Accelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheAccelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheDavid Grier
 
Accelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket CacheAccelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket CacheNicolas Poggi
 
Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data DeduplicationRedWireServices
 
IBM System x3850 X5 Technical Presenation abbrv.
IBM System x3850 X5 Technical Presenation abbrv.IBM System x3850 X5 Technical Presenation abbrv.
IBM System x3850 X5 Technical Presenation abbrv.meye0611
 
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...npinto
 
Perf Vsphere Storage Protocols
Perf Vsphere Storage ProtocolsPerf Vsphere Storage Protocols
Perf Vsphere Storage ProtocolsYanghua Zhang
 
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...Ben Stopford
 
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...peknap
 
SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3UniFabric
 
Hana Memory Scale out using the hecatonchire Project
Hana Memory Scale out using the hecatonchire ProjectHana Memory Scale out using the hecatonchire Project
Hana Memory Scale out using the hecatonchire ProjectBenoit Hudzia
 
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...JAXLondon2014
 
SSDs, IMDGs and All the Rest - Jax London
SSDs, IMDGs and All the Rest - Jax LondonSSDs, IMDGs and All the Rest - Jax London
SSDs, IMDGs and All the Rest - Jax LondonUri Cohen
 
Flash Usage Models for the Oracle Database
Flash Usage Models for the Oracle DatabaseFlash Usage Models for the Oracle Database
Flash Usage Models for the Oracle DatabaseIMEX Research
 

Ähnlich wie Memory Management – A Balancing Act (20)

SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databases
 
Database performance tuning for SSD based storage
Database  performance tuning for SSD based storageDatabase  performance tuning for SSD based storage
Database performance tuning for SSD based storage
 
IBM Solid State in eX5 servers
IBM Solid State in eX5 serversIBM Solid State in eX5 servers
IBM Solid State in eX5 servers
 
CLFS 2010
CLFS 2010CLFS 2010
CLFS 2010
 
Accelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheAccelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cache
 
Accelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket CacheAccelerating HBase with NVMe and Bucket Cache
Accelerating HBase with NVMe and Bucket Cache
 
Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data Deduplication
 
IBM System x3850 X5 Technical Presenation abbrv.
IBM System x3850 X5 Technical Presenation abbrv.IBM System x3850 X5 Technical Presenation abbrv.
IBM System x3850 X5 Technical Presenation abbrv.
 
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
 
Linux%20 memory%20management
Linux%20 memory%20managementLinux%20 memory%20management
Linux%20 memory%20management
 
Perf Vsphere Storage Protocols
Perf Vsphere Storage ProtocolsPerf Vsphere Storage Protocols
Perf Vsphere Storage Protocols
 
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
 
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
 
SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3
 
Hana Memory Scale out using the hecatonchire Project
Hana Memory Scale out using the hecatonchire ProjectHana Memory Scale out using the hecatonchire Project
Hana Memory Scale out using the hecatonchire Project
 
Storage
StorageStorage
Storage
 
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
 
SSDs, IMDGs and All the Rest - Jax London
SSDs, IMDGs and All the Rest - Jax LondonSSDs, IMDGs and All the Rest - Jax London
SSDs, IMDGs and All the Rest - Jax London
 
Cache memory presentation
Cache memory presentationCache memory presentation
Cache memory presentation
 
Flash Usage Models for the Oracle Database
Flash Usage Models for the Oracle DatabaseFlash Usage Models for the Oracle Database
Flash Usage Models for the Oracle Database
 

Memory Management – A Balancing Act

  • 1. Memory Management – A Balancing Act Shaheryar Iqbal Best viewed in Microsoft PowerPoint
  • 2. Agenda Node Memory Between OS and FSG Cache Memory Partitioning FSG Cache Percent Free Memory OS Managed Memory FSG Cache. PDE Managed Memory Free memory availability Monitoring memory Memory allocation failures Paging/Swapping. Adjusting FSG Cache Cache Effectiveness Rate DBS Cache Threshold Hash Join - HtMemAlloc Redistribution Buffer 2 > 1 November 2012
  • 3. Node Memory 4GB maximum is a limitation Memory on hand of the current 32 bit OS. 64 bit Windows and LINUX systems are shipping with 6GB (54XX) or 8GB (5500H/C). # rallsh –sv memsize –k How much mem on each Node Node Memory is partitioned into •OS Managed Memory and •FSG Cache. 3 > 1 November 2012
  • 4. Memory Partitioning between OS and FSG Cache Free Memory O.S. Overhead 100 MB FSG (File Segment Cache) 13 Vprocs @ 40 MB each Remaining space 3476 MB available for FSG 1 PDE 2 PE 10 AMPs 13 Vprocs @ 40 MB = 520 MB ` Total Free Memory 40 MB 40 MB 40 MB 40 MB 40 MB 40 MB 40 MB = 100 + 520 = 620 MB PE-1 PE-2 AMP-1 AMP-2 AMP-3 AMP-4 ….. AMP-10 Vproc Vproc Vproc Vproc Vproc Vproc Vproc FSG Cache Total Memory 4096 MB – 100 MB PDE (BaseVproc) – 40 MB – 520 MB FSG Cache 3476 MB Operating System – 100 MB Ex. 4096 MB – 4 GB Memory 4 > 1 November 2012
  • 5. What’s FSG CACHE PERCENT FSG Cache An xctl DBS Control Performance field Percent Reduces the amount of memory to be used for FSG Cache. The remaining memory is given back to UNIX 5 > 1 November 2012
  • 6. FSG Cache Percent (Contd) Free Memory • O.S. 100 MB FSG Cache FSG (File Segment Cache) • 13 Vprocs @ 40 MB = 4096 – ( (10+2+1) * 40MB = 520 MB) 80% of remaining space – 2780 MB available for FSG • 20% of–remaining space 100 MB = 3746 MB returned = 696 MB example of Let’s take an Adjusted FSG Size = 80 FSG Cache Percent Total Free i.e. the 3476 MB Memory = 80% x 20 % space will = 100 + 520 + 696 back to OS. = be returned 2780 MB = 1316 MB 20% of remaining space – 696 MB returned back to O.S/Free Mem ` Added to UNIX = 20% x 3746 MB FSG Cache = 696 MB 40 MB 40 MB 40 MB 40 MB 40 MB 40 MB 40 MB Total Memory 4096 MB – 696 MB PE-1 PE-2 AMP-1 AMP-2 AMP-3 AMP-4 ….. AMP-10 – 100 MB Vproc Vproc Vproc Vproc Vproc Vproc Vproc – 520 MB FSG Cache = 2780 MB PDE (BaseVproc) – 40 MB Operating System – 100 MB Ex. 4096 MB – 4 GB Memory 6 > 1 November 2012
  • 7. What’s in Free Memory Memory managed by the O.S. Free Memory TERADATA VPROCS ADMINISTRATIVE PROGRAMS: AMP worker tasks, PE tasks – Dictionary cache Request-to-Steps cache, Vprocs Communication kernel resources, program text and data, Redistribution Buffers, Aggregation Buffers, Hash Join Join Buffers, other applications. 7 > 1 November 2012
  • 8. What’s in FSGcache FSG Cache Memory managed by the PDE. FSG Cache is used by: FSG Cache is used for: •AMPs •Backup Activity Used to access database segments. Permanent Data blocks Full Cylinder read slots (CI) for Permanent Data blocks Spool CIs & Data blocks Transient Journal data (TJs) Permanent Journal data (PJs) Sync Scan data blocks Buddy Backup data blocks Hash Join Spool Buffers 8 > 1 November 2012
  • 9. Physical memory on a Teradata node Memory managed by Memory managed by O.S. PDE 9 > 1 November 2012
  • 10. Memory Monitoring Memory WHY Monitoring WHAT HOW Memory Depletions: Common cause of Performance degradation MONITOR: Free memory availability, Examine Resusage Data: Memory allocation failures, With the same level of scrutiny as CPU and I/O utilization. Paging/Swapping. Cache Effectiveness Rate 10 > 1 November 2012
  • 11. Memory Availability The low happened dips show Check ifDepletionswhen memory hash join is frequency of Given the enabled; instances during differentahours of this depletion, it could can potentially usecompletely was low or high amount of day,memory. of the the OS all days First be corrected by depleted. week with noFSGcache adjusting particular turn off hash join, see how to pattern.value lower much memory can be recovered. 11 > 1 November 2012
  • 12. Memory Allocations Failures Two cases when Mem Alloc Failures occurs. How many and how Case1: Free Mem memory frequently not available. failures allocations occur Which nodes or Case2: group of nodes are Free Mem Available. showing this pattern 12 > 1 November 2012
  • 13. Memory Allocations Failures (Case1) Mem Alloc Fails occurs when FREE MEM reaches to zero. FREE MEM zero at 14:10 Memory Allocation Failures at 14:10 13 > 1 November 2012
  • 14. Memory Allocations Failures (Case 2) Check peaks in redistributed blocks and correlate to Memory allocation failures timeframes when large occurring but MIN FREE MEM Common cause of numbers of mem alloc failures MEM has not reached Concurrent row ALLOC fails is at 0 occurred. during redistributions. log interval. FREE MEM never Mem Alloc Fails reaches at zero. at Redistribution Peak 22:10 at 23:30 Mem Alloc Fails at 23:30 Then memory allocation failures are coming from some subset of memory being used in the OS. Redistribution Peak at 22:10 14 > 1 November 2012
  • 15. Cache Effectiveness Rate Cache Effectiveness Cache utilization is a Rate temporal cache hit rate A 70% (time-based) is Check Cache Hit ratio Logical Reads – Physical Reads 70% process. same not the of data, running level of Logical Reads with the same all day scrutiny as CPU and long. It is also spatial. Cache Hit Ratio less than I/O utilization. 40% for a particular workload 15 > 1 November 2012
  • 16. Cache FSG Percent Tuning Tuning memory generally All memory used inside involves adjusting the FSGcache governed by a FSG cache percent. thresh hold (e.g., datablock caching) will also be affected Adjusting Cache FSG Percent This is why it is important Before tuning memory, it is to measure cache important to see trends over effectiveness rates before time e.g. take 30 days and after making a sample change. 16 > 1 November 2012
  • 17. Summary of Steps in Cache FSG Percent tuning Look for Low mem 1: Free Memory conditions, total depletion High number of I/Os, 2: Occurrence of high memory allocation paging/swap I/Os failure 3: Check for use If OS memory is low/depleted of memory intensive often, turn off hash join first features as it does not require a Target effectiveness restart. rates should be above 4: Check cache hits 50% (higher the better) 5: Check current Default is 80% FSGcache setting OnIfcoexistent withrate went effectiveness frequent aftermem down low reducing 6: Lower FSGcache conditions,it maycache size fsgcache, the be in 5-10% increments necessaryincreased byto can be to go down 7: Recheck dbs 65% at 4GB. tuning DBSCACHETHR cache hits upward in dbscontrol. 8: Repeat steps Sudden onset of 5-7 as needed memory depletion. 17 > 1 November 2012
  • 18. DBSCacheThr - Understanding DBS Cache FSG cache is the portion DBS Cache of main memory assumed available for table data. DBSCacheThr Case 1: SubTable/Table fits entirely of the defines a percentage DBScontrol tunable FSG cache and helps control parameter. when data blocks are Only permanent and cached. Case 2: SubTable/Table DBs can be spool cannot fit affected by this parameter. When a subtable fits The table is not eligible entirely in this for synchronized full-file percentage of memory, scan (sync scan). its data blocks are cached and aged out of fit When the table cannot memory normally. in this percentage of If involved in full-file memory, its data blocks scan, the table is also are discarded from eligible for sync scan. memory as soon as possible. 18 > 1 November 2012
  • 19. DBSCacheThr - Understanding DBS Cache DBS Cache Data in cache memory is aged based on residency and usage. DBSCacheThr purpose We want to hold all frequently accessed reference tables in memory. Range and Default Values DBSCacheThr caching technique can prevent a large sequentially read or encourages smaller (e.g. written table from pushing Since the large table ’ s data reference) tables to stay in other data out of the blocks probably won ’ t be memory longer. cache accessed again until they have •Default value is 10 percent. aged out of memory, •caching Range of values is 0 - 100 percent. them does little good and may if the size of FSGcache cause other, more heavily- changes, the size of DBS accessed blocks to age out cache will change with it. prematurely. 19 > 1 November 2012
  • 20. HTMemAlloc -Understanding Hash Join What is it Hash Join Hash Join vs Merge Join Hash Join vs Product Join Alternative join scheme Memory Useage that performs better than some cases of merge Do not turn this feature on if Hash join eliminates the and product join. sorting, and possible join HJ builds an in-memory redistribution or copying, Hash Table using the of the larger table. The memory used when MJ require both left and smaller of the two join hash join is enabled is right tables to be sorted relations. from the available OS Saves comparing every memory row in the right table with every row in the left table. Right table rows are The ResUsage data for Available free memory compared to a single hash the target system shows appears to be adequate code in the indexed array. a trend of low memory but page swaps are conditions already frequent present 20 > 1 November 2012
  • 21. Hash Join Parameters HTMemAllocBase = 10 MB HTMemAlloc = 2% (Default) The default of 2% is chosen based on having 50 concurrent hash joins taking up a maximum 100% of the HTMemAllocBase Take an example; a system 10 MB of memory comes size. can have at max 25 concurrent from UNIX FreekB * 50 = 10 MB 200 Memory users (e.g Throttling Applied) 2% applied to Set HTMemAlloc = 4% HTMemAllocBase Result when applied yields 4% of 10MB = 400 KB a Hash Buffer size of 200 400Kb * 25 Users = 10 MB KB. 2% of 10MB = 200KBPartition size New Hash = 400KB (old 200KB) More opportunity for queries of having HJ instead of MJ or PJ. Result :Faster executions 21 > 1 November 2012
  • 22. Redistribution Buffer – Memory Requirement Memory Requirement For Node Level Row Redistribution Each AMP uses separate redistribution buffer for each node in the system Default Redistribution buffer size = 32KB per target Node Total Memory for 1 Sending AMP = 32KB * number of Nodes in system 22 > 1 November 2012
  • 23. Redistribution Buffer - Examples Redistribution Configuration - 8 Nodes, 8 AMPs per node Buffer Example 1 Single Node requirement - single user = 32KB * 8 = 256 KB / Redistribution Multi-user - 20 concurrent users = 20 * 256 KB = 5 MB (not a special problem) Redistribution Configuration - 200 Nodes, 8 AMPs per node Buffer Example 2 Single Node requirement - single user = 32KB * 200 = 6400 KB (6 MB) Multi-user - 20 users = 20 * 6400 KB = 128 MB (far exceeding 80-100 MB per AMP) 23 > 1 November 2012
  • 24. Redistribution Buffer - Recommendations Symptoms: Excessive Paging/Swapping RECOMMENDATIONS For Large Configurations: Set Node Level Redistribution buffer size smaller , e.g. 16 KB (Default is 32 KB) Set FSG Cache Percent to less than 80% 24 > 1 November 2012
  • 25. Feed back Shaheryar- This is an excellent presentation. 25 > 1 November 2012
  • 26. Questions The only bad question is the question never asked 26 > 1 November 2012

Hinweis der Redaktion

  1. 1 November 2012 Copyright © Teradata Corporation
  2. 1 November 2012 Copyright © Teradata Corporation
  3. 1 November 2012 Copyright © Teradata Corporation The remaining memory is given back to UNIX to manage tasks and internal buffers for redistribution, duplication, hash join, etc.
  4. 1 November 2012 Copyright © Teradata Corporation Memory managed by the O.S. is referred to as “free memory” (UNIX MP-RAS). Teradata vprocs AMP worker tasks Parsing Engine tasks including Dictionary cache and Request-to-Steps cache Messages - communication between vprocs Administrative and/or user programs such as: kernel resources and administrative program text and data Redistribution Buffers Aggregation Buffers Hash Join Join Buffers other applications (ex., FastLoad) message buffers (ex., TCP/IP)
  5. 1 November 2012 Copyright © Teradata Corporation The amount of memory allocated to FSGcache is for file system-related operations, and does not include any other Teradata operations that are using memory outside of FSGcache. Memory managed by PDE is called FSG cache. FSG cache is primarily used by the AMPs to access memory resident database segments. When Teradata needs to read a database block, it checks FSG Cache first. FSG Cache is used by: AMPs Backup Activity FSG Cache is used for: Permanent Data blocks Full Cylinder read slots Cylinder Indices (CI) for Permanent Data blocks Spool Data blocks and CIs for spool Transient Journal data (TJs) Permanent Journal data (PJs) Sync Scan data blocks Buddy Backup data blocks Hash Join Spool Buffers
  6. 1 November 2012 Copyright © Teradata Corporation Memory depletion and the negative performance impacts that accompany this condition are a common cause of performance degradation. In performing both performance trouble shooting as well as in the process of capacity planning, look at free memory availability, paging/swapping and memory allocation failures. examine resusage data regularly for memory availability, paging/swapping and memory allocation failures (MP-RAS) with the same level of scrutiny as CPU and I/O utilization.
  7. 1 November 2012 Copyright © Teradata Corporation The low dips show instances when memory was low or completely depleted. The depletions happened during different hours of the day (not just daytime or nighttime), and all days of the week (not just weekdays or weekends) with no particular pattern. Given the frequency of this depletion, we could then look at correcting it by adjusting FSGcache to a lower setting, since all nodes are already at the maximum of 4GB. However, we first check to see if hash join is enabled in dbscontrol: any concurrent steps eligible for hash join can potentially use a high amount of OS memory. In this case, we would first turn off hash join (a dynamic change, does not require a restart) and monitor memory to see how much memory can be recovered.
  8. 1 November 2012 Copyright © Teradata Corporation Measuring Memory Availability Besides the amount of free memory available, it is also important to know: How many and how frequently paging and swapping I/Os occur Paging and swapping are necessary when minumim memory available drops below 40 MB, to avoid panicking or hanging the node. How many and how frequently memory allocations failures occur High memory allocation failures can occur even when memory is fully depleted in the case of low/no BNS pages in the page pool, or high numbers of concurrent requests for row redistribution buffers Which nodes or group of nodes are showing this pattern If a single node, what’s different about the configuration (e.g., more Parsing Engines configured on this node, non-Teradata processes running on it, more AMPs on these nodes, less physical memory on these nodes, etc., etc. If there are a high number (many thousands or more) of memory alloc failures but MIN FREE MEM has not reached 0 during the logging period, then the memory allocation failures are coming from some subset of memory being used in the OS or in the kernel itself
  9. 1 November 2012 Copyright © Teradata Corporation However, the most common cause of sudden OS memory depletion can be seen on large systems during row redistribution. The amount of OS memory needed for row redistribution is 32K * the number of nodes per AMP. The pattern of utilization associated with row redistribution can be seen as Point to Points and duplications can be seen as Broadcasts in resusage
  10. 1 November 2012 Copyright © Teradata Corporation As tuning memory allocation generally involves adjusting the FSGcache percent, all memory used inside FSGcache governed by a thresh hold (e.g., datablock caching) will also be affected. This is why it is important to measure cache effectiveness rates before and after making a change. Before tuning memory, it is important to see trends over time. Using the Higa macro ResPMA to take a 30-day sample, the following Free Mem chart shows the amount of memory that was available between node groups.
  11. 1 November 2012 Copyright © Teradata Corporation When enabled, the DBSCacheThr parameter only affects sequential processing such as full-file scans or creations of spool or sort work tables.
  12. 1 November 2012 Copyright © Teradata Corporation When the DBS Cache Threshold value is high, larger tables become candidates for caching. Larger tables may have the same probability of being accessed but, because we only cache individual data blocks the likelihood of caching a large table in it’s entirety is low. As a consequence the probability of a cache hit is reduced as the size of the table eligible for caching increases. The larger table data blocks will be cached in memory and eventually aged out, often with a very low probability of being accessed again while in memory. As a consequence, we would want to set the DBS Cache Threshold to support a file size equal to the smallest, most frequently used tables. The default size of 10% is of the FSGcache memory, which is also a percentage of total memory taken after the system boots up.
  13. 1 November 2012 Copyright © Teradata Corporation Hash Join, is an alternative join scheme that performs better than some cases of merge join and product join. Hash Join builds an in-memory Hash Table using the smaller of the two join relations. Hash Join instead of a Merge Join Saves the sorting of the left and right tables into row hash order. Merge Joins require both left and right tables to be sorted Hash Join instead of an Equality Product Join Saves comparing every row in the right table with every row in the left table. Right table rows are compared to a single hash code in the indexed array. The memory used when hash join is enabled is from the available OS memory. Do not turn this feature on if: The ResUsage data for the target system shows a trend of low memory conditions already present. Available free memory appears to be adequate but page swaps are frequent.
  14. 1 November 2012 Copyright © Teradata Corporation HTMemAllocBase = 10 MB 10 MB of memory comes from UNIX Free Memory. Internal Tunable parameter. Generally not recommended for change except for very large memory systems. HTMemAlloc = 2% (Default) 2% applied to HTMemAllocBase. Result when applied yields a Hash Buffer size of 200 KB. The default of 2% is chosen based on having 50 concurrent hash joins taking up a maximum 100% of the HTMemAllocBase size. SkewAllowance = 75% (Default) 75% is applied to the Hash Buffer size as an allowance for skewing of the left spool table used for the Hash Join. Remaining size after applying the SkewAllowance (25% of Hash Buffer size) is the Hash Partition size (25% of 200 KB = 50 KB).