SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
Partition Defragmenter

                            Yoram Benchetrit
                 yoram.benchetrit@fr.ibm.com


                  Mercredi 3 Octobre 2012
                   User Group Informix France
Agenda

A bit of partition background
The problem with fragmented data
How does the feature work
Functionality & considerations
Defragmenter in OAT
Example



                      User Group Informix France
A bit of partition background
What is an extent ?
 – Collection of physically contiguous pages on disk
 – Extent can hold data page, index page, bitmap
   page etc…
What is a partition ?
 – Logical collection of all the extents allocated for a
   given table or index.
 – Space for partition is allocated in units of extents
   and is not necessarily contiguous.
Each partition are unique within the system
 – oncheck –pt <partnum>       User Group Informix France
A bit of partition background

Partition logical to physical extent relationship




                             User Group Informix France
A bit of partition background
 Before Defragmenting
  Chunk 14

                                   Extents for table A




                                   Extents for
                                   other tables


                                   Free pages


                        User Group Informix France
A bit of partition background
 After Defragmenting
   Chunk 14




                                 Extents for table A




                       User Group Informix France
A bit of partition background

 Previous Solutions
  – Table unload and reload
 Oncheck –me
  – Off-line table reorganization
  – Non-recoverable
  – Unsupported




                               User Group Informix France
                                                     7
A bit of partition background

How many extents exist ?
 – Run oncheck –pe.
 – Run oncheck –pt.
 – SQL
   database sysmaster;
   select unique te_partnum, count(*)
   from systabextents
   group by 1
   having count(*) > NN
   order by 1 desc;
   • Where NN is a value.
                                        User Group Informix France
The problem with fragmented data

What’s the problem with many extents?
 – Full partition page.
    • Prohibits new inserts.
       – Might not be at maximum number of rows.
    • Need to either delete older entries, if possible.
       – or
    • Requires a manual table recreation.

       – (FYI: Actually, this can no longer exist in 11.70)



                                        User Group Informix France
The problem with fragmented data

  Many extents degrades performance.
   – Need to skip over non-contiguous disk areas.
   – Slower retrieval of data.
   – Mapping logical page numbers to physical
     addresses is slower.
   – Chunk allocations are slower with long free
     list pages
   – Archive extent-sorting phase is slower

                              User Group Informix France
The problem with fragmented data

  What’s the problem with many extents?
   – Many tables with many extents feels
     overbearing.
     • Outputs from oncheck –pe & -pt.




                                 User Group Informix France
How does the feature work

Run new SQL API functions.
 – sysadmin database.
 – execute function [admin|task] ("<defragment",
   "<database>:[<owner>.]<table>[#index]")
   • or
 – execute function [admin|task] ("<defragment
   partnum", "<partnum> [, <partnum>, ... ]”);



                             User Group Informix France
How does the feature work

– What goes on behind the scenes.
  • Check validity.
  • Create new extent.
     • Might need just one adding
  • Start a loop and process all old extents.
     – Read old extent.
     – Move all old extent pages to the new extent.
     – Delete old extent.
  • Loop end.
                               User Group Informix France
How does the feature work

Log the work using five new log types.
 – Start defragmentation.
 – End defragmentation.
 – Add new defragmentation extent.
 – Remove old defragmentation extent.
 – Move page.
Will result in a surge in logical log usage.


                            User Group Informix France
How does the feature work

Monitoring progress.
 – onstat -g defragment.
   •   Searching for extents.
   •   Merging extents.
   •   Defrag_completed.
   •   Defrag_failed.




                                User Group Informix France
How does the feature work

Recoverable if server shuts down or
crash
 – Defragmenter cleaner thread will remove extra
   extents after fast recovery
    • Rolls back current unit of work (UOW) if needed.
       – 08:52:06 Defragmenter cleaner thread now running
       – 08:52:06 Defragmenter cleaner thread cleaned:1 partitions
 – Will the object be consistent ?
    • Yes.
 – Choose to run again to complete the job.
                                     User Group Informix France
Functionality

Can defragment table online
No locks placed on object
Only allowed one defragmenter running per
dbspace
Replication is supported (HDR, MACH11, ER)
Run via the SQL API interface.



                        User Group Informix France
Considerations

Functionality not allowed
 – Functional indexes.
 – VTI & VII objects.
 – Temporary tables.
 – Sort tables.
 – Optical blobs.
 – System catalog tables



                            User Group Informix France
Considerations
Cannot stop once job submitted
Cannot run simultaneously when table being
 – Altered
 – Truncated
 – Drop
 – Compress, Repack, Shrink
Not the same as compress/repack/shrink
Enterprise Replication.
 – Table needs to be in CDR alter mode.
   • Mode unset automatically at end of job
                                User Group Informix France
Considerations
Operation is logging-intensive
 – Each page move is logically logged (DFMVPG)
   • 70-80 bytes per page moved
Small units of work to avoid long transaction.
 – It may send other transactions over the threshold
New extents created at end of dbspace.
Schedule during low activity.
Perform after a backup.

                             User Group Informix France
Defragmenter in OAT



On the OAT menu, expand
Space Administration > Space Optimization




                                            User Group Informix France
                                                                  21
Defragmenter in OAT

             On the Actions menu,
             click Optimize Space.




Select the
 tables.




                                     User Group Informix France
                                                           22
Defragmenter in OAT

Select Defragment extents and click OK.




                                      User Group Informix France
                                                            23
Defragmenter in OAT

Automatic Storage Optimization
 – Can automate defragmenting using OAT.
 – Enabled via scheduler task “auto_crsd”
   • This can also do compressing, repacking, shrinking.
   • ‘crsd’ stand for compress, repack, shrink, defragment
 – This can also be enabled via SQL




                                User Group Informix France
Defragmenter in OAT
‘auto_crsd’ task details
 – In OAT -> Task Scheduler -> Task Details
     • UPDATE ph_task SET tk_enable = 'T‘ WHERE tk_name = 'auto_crsd';




                                      User Group Informix France
Defragmenter in OAT

‘auto_crsd’ task parameters.




 – UPDATE ph_threshold SET value = 'F WHERE name = 'AUTODEFRAG_ENABLED';
 – UPDATE ph_threshold SET value = ‘100‘ WHERE name = 'AUTODEFRAG_EXTENTS';


                                          User Group Informix France
Example

SQL to create three fragmented tables
 – create table tab1 (a serial, b int, c int);
 – create table tab2 (a serial, b int, c int);
 – create table tab3 (a serial, b int, c int);
 – create procedure ins (a int, b int) define c int;
     • for c = a to b
     • insert into tab1 values (0, 88, 99);
     • insert into tab2 values (0, 88, 99);
     • insert into tab3 values (0, 88, 99);
     • end for;
 – end procedure;
 – execute procedure ins (1, 1000000);

                                            User Group Informix France
Example

oncheck –pe before defragment.




                        User Group Informix France
Example

oncheck –pt before defragment.
– FYI : in 11.70 No longer limited to one partn page.




                              User Group Informix France
Example

SQL API function.
 – execute function task ("defragment", "oltr:tab1");
   (expression) OK




                              User Group Informix France
Example

oncheck –pe after defragment.




                        User Group Informix France
Example

oncheck –pt after defragment.




                         User Group Informix France
Example

onlog output




               User Group Informix France
Summary

Informix Defragmenter Capabilities

 – Partition Extents Defragmentation
 – New System Admin SQL API
 – OAT GUI Interface
 – Automatic Defragmentation
 – Can be completed with compress/repack/shrink
   for optimal storage optimization

                           User Group Informix France
Questions ?




              User Group Informix France
Merci

              Yoram Benchetrit
   yoram.benchetrit@fr.ibm.com


    Mercredi 3 Octobre 2012
        User Group Informix France

Contenu connexe

Tendances

Slides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And GagneSlides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And Gagnesarankumar4445
 
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013Intel Software Brasil
 
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)XBAM Tutorial (June 08)
XBAM Tutorial (June 08)guest40e2dd
 
A First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM ChangesA First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM ChangesWillie Favero
 
ALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMIBM
 
Galvin-operating System(Ch5)
Galvin-operating System(Ch5)Galvin-operating System(Ch5)
Galvin-operating System(Ch5)dsuyal1
 

Tendances (11)

2 os structure
2 os structure2 os structure
2 os structure
 
Slides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And GagneSlides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And Gagne
 
Chapter 3: Processes
Chapter 3: ProcessesChapter 3: Processes
Chapter 3: Processes
 
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013
 
4 db recovery
4 db recovery4 db recovery
4 db recovery
 
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
 
A First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM ChangesA First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM Changes
 
3 processes
3 processes3 processes
3 processes
 
ALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARM
 
Operating System
Operating SystemOperating System
Operating System
 
Galvin-operating System(Ch5)
Galvin-operating System(Ch5)Galvin-operating System(Ch5)
Galvin-operating System(Ch5)
 

En vedette

Ugif 09 2013 open source - session tech
Ugif 09 2013   open source - session techUgif 09 2013   open source - session tech
Ugif 09 2013 open source - session techUGIF
 
Ugif 09 2013 new environment and dynamic setting in ids 12.10
Ugif 09 2013   new environment and dynamic setting in ids 12.10Ugif 09 2013   new environment and dynamic setting in ids 12.10
Ugif 09 2013 new environment and dynamic setting in ids 12.10UGIF
 
Ugif 09 2013 psm
Ugif 09 2013   psmUgif 09 2013   psm
Ugif 09 2013 psmUGIF
 
Ugif 09 2013 friug 201309 axional web studio
Ugif 09 2013 friug 201309   axional web studioUgif 09 2013 friug 201309   axional web studio
Ugif 09 2013 friug 201309 axional web studioUGIF
 
Ugif 09 2013 open source
Ugif 09 2013   open sourceUgif 09 2013   open source
Ugif 09 2013 open sourceUGIF
 
UGIF 12 2010 - France - rediscover informix support
UGIF 12 2010 - France - rediscover informix supportUGIF 12 2010 - France - rediscover informix support
UGIF 12 2010 - France - rediscover informix supportUGIF
 
Ugif 09 2013
Ugif 09 2013Ugif 09 2013
Ugif 09 2013UGIF
 
UGIF 09 2013 Fy13 q3, corporate presentation the inflection point in the ap...
UGIF 09 2013 Fy13 q3, corporate presentation   the inflection point in the ap...UGIF 09 2013 Fy13 q3, corporate presentation   the inflection point in the ap...
UGIF 09 2013 Fy13 q3, corporate presentation the inflection point in the ap...UGIF
 

En vedette (8)

Ugif 09 2013 open source - session tech
Ugif 09 2013   open source - session techUgif 09 2013   open source - session tech
Ugif 09 2013 open source - session tech
 
Ugif 09 2013 new environment and dynamic setting in ids 12.10
Ugif 09 2013   new environment and dynamic setting in ids 12.10Ugif 09 2013   new environment and dynamic setting in ids 12.10
Ugif 09 2013 new environment and dynamic setting in ids 12.10
 
Ugif 09 2013 psm
Ugif 09 2013   psmUgif 09 2013   psm
Ugif 09 2013 psm
 
Ugif 09 2013 friug 201309 axional web studio
Ugif 09 2013 friug 201309   axional web studioUgif 09 2013 friug 201309   axional web studio
Ugif 09 2013 friug 201309 axional web studio
 
Ugif 09 2013 open source
Ugif 09 2013   open sourceUgif 09 2013   open source
Ugif 09 2013 open source
 
UGIF 12 2010 - France - rediscover informix support
UGIF 12 2010 - France - rediscover informix supportUGIF 12 2010 - France - rediscover informix support
UGIF 12 2010 - France - rediscover informix support
 
Ugif 09 2013
Ugif 09 2013Ugif 09 2013
Ugif 09 2013
 
UGIF 09 2013 Fy13 q3, corporate presentation the inflection point in the ap...
UGIF 09 2013 Fy13 q3, corporate presentation   the inflection point in the ap...UGIF 09 2013 Fy13 q3, corporate presentation   the inflection point in the ap...
UGIF 09 2013 Fy13 q3, corporate presentation the inflection point in the ap...
 

Similaire à Ugif 10 2012 ppt0000001

UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70UGIF
 
Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7
Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7
Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7Nicolas Desachy
 
Ugif 10 2012 ppt0000002
Ugif 10 2012 ppt0000002Ugif 10 2012 ppt0000002
Ugif 10 2012 ppt0000002UGIF
 
Objects? No thanks!
Objects? No thanks!Objects? No thanks!
Objects? No thanks!corehard_by
 
6 profiling tools
6 profiling tools6 profiling tools
6 profiling toolsvideos
 
3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...Timothy McCormick
 
Simplifying Disaster Recovery with Delta Lake
Simplifying Disaster Recovery with Delta LakeSimplifying Disaster Recovery with Delta Lake
Simplifying Disaster Recovery with Delta LakeDatabricks
 
Ugif 04 2011 déployer informix
Ugif 04 2011   déployer informixUgif 04 2011   déployer informix
Ugif 04 2011 déployer informixUGIF
 
IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning Vladislav Tatarincev
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)Gustavo Rene Antunez
 
The Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux KernelThe Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux KernelYasunori Goto
 
Microsoft kafka load imbalance
Microsoft   kafka load imbalanceMicrosoft   kafka load imbalance
Microsoft kafka load imbalanceNitin Kumar
 
AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!
AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!
AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!Christoph Adler
 
Tajo_Meetup_20141120
Tajo_Meetup_20141120Tajo_Meetup_20141120
Tajo_Meetup_20141120Hyoungjun Kim
 
101 apend. troubleshooting tools v2
101 apend. troubleshooting tools v2101 apend. troubleshooting tools v2
101 apend. troubleshooting tools v2Acácio Oliveira
 
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...Christoph Adler
 
Tune up Yarn and Hive
Tune up Yarn and HiveTune up Yarn and Hive
Tune up Yarn and Hiverxu
 
4.9 apend troubleshooting tools v2
4.9 apend troubleshooting tools v24.9 apend troubleshooting tools v2
4.9 apend troubleshooting tools v2Acácio Oliveira
 

Similaire à Ugif 10 2012 ppt0000001 (20)

UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70
 
Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7
Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7
Informix User Group France - 30/11/2010 - Fonctionalités IDS 11.7
 
Ugif 10 2012 ppt0000002
Ugif 10 2012 ppt0000002Ugif 10 2012 ppt0000002
Ugif 10 2012 ppt0000002
 
Objects? No thanks!
Objects? No thanks!Objects? No thanks!
Objects? No thanks!
 
6 profiling tools
6 profiling tools6 profiling tools
6 profiling tools
 
3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...
 
Simplifying Disaster Recovery with Delta Lake
Simplifying Disaster Recovery with Delta LakeSimplifying Disaster Recovery with Delta Lake
Simplifying Disaster Recovery with Delta Lake
 
Ugif 04 2011 déployer informix
Ugif 04 2011   déployer informixUgif 04 2011   déployer informix
Ugif 04 2011 déployer informix
 
IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)
 
The Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux KernelThe Forefront of the Development for NVDIMM on Linux Kernel
The Forefront of the Development for NVDIMM on Linux Kernel
 
Microsoft kafka load imbalance
Microsoft   kafka load imbalanceMicrosoft   kafka load imbalance
Microsoft kafka load imbalance
 
AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!
AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!
AdminCamp2019 - Notes V10 Upgrades - Alles was man wissen muss!
 
Tajo_Meetup_20141120
Tajo_Meetup_20141120Tajo_Meetup_20141120
Tajo_Meetup_20141120
 
101 apend. troubleshooting tools v2
101 apend. troubleshooting tools v2101 apend. troubleshooting tools v2
101 apend. troubleshooting tools v2
 
Autosar Basics hand book_v1
Autosar Basics  hand book_v1Autosar Basics  hand book_v1
Autosar Basics hand book_v1
 
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
RNUG - SUPERCHARGED HCL Notes V11 Upgrades: Turning the WORST Notes deploymen...
 
Tune up Yarn and Hive
Tune up Yarn and HiveTune up Yarn and Hive
Tune up Yarn and Hive
 
Troubleshooting UniData
Troubleshooting UniDataTroubleshooting UniData
Troubleshooting UniData
 
4.9 apend troubleshooting tools v2
4.9 apend troubleshooting tools v24.9 apend troubleshooting tools v2
4.9 apend troubleshooting tools v2
 

Plus de UGIF

Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012
Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012
Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012UGIF
 
Ugif 10 2012 beauty ofifmxdiskstructs ugif
Ugif 10 2012 beauty ofifmxdiskstructs ugifUgif 10 2012 beauty ofifmxdiskstructs ugif
Ugif 10 2012 beauty ofifmxdiskstructs ugifUGIF
 
Ugif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutesUgif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutesUGIF
 
Ugif 10 2012 genero ugif october 3, 2012 ibm france, français
Ugif 10 2012 genero   ugif october 3, 2012  ibm france, français Ugif 10 2012 genero   ugif october 3, 2012  ibm france, français
Ugif 10 2012 genero ugif october 3, 2012 ibm france, français UGIF
 
Ugif 10 2012 iiug paris-business-update
Ugif 10 2012 iiug paris-business-updateUgif 10 2012 iiug paris-business-update
Ugif 10 2012 iiug paris-business-updateUGIF
 
Ugif 12 2011-smart meters-11102011
Ugif 12 2011-smart meters-11102011Ugif 12 2011-smart meters-11102011
Ugif 12 2011-smart meters-11102011UGIF
 
Ugif 12 2011-informix iwa
Ugif 12 2011-informix iwaUgif 12 2011-informix iwa
Ugif 12 2011-informix iwaUGIF
 
Ugif 12 2011-ibm cap-seine
Ugif 12 2011-ibm cap-seineUgif 12 2011-ibm cap-seine
Ugif 12 2011-ibm cap-seineUGIF
 
Ugif 12 2011-france ug12142011-tech_ts
Ugif 12 2011-france ug12142011-tech_tsUgif 12 2011-france ug12142011-tech_ts
Ugif 12 2011-france ug12142011-tech_tsUGIF
 
Ugif 12 2011-four js primer presentation - new graphic charter - short versio...
Ugif 12 2011-four js primer presentation - new graphic charter - short versio...Ugif 12 2011-four js primer presentation - new graphic charter - short versio...
Ugif 12 2011-four js primer presentation - new graphic charter - short versio...UGIF
 
Ugif 12 2011-discover informix keynote 2012
Ugif 12 2011-discover informix keynote 2012Ugif 12 2011-discover informix keynote 2012
Ugif 12 2011-discover informix keynote 2012UGIF
 
Ugif 04 2011 storage prov-pot_march_2011
Ugif 04 2011   storage prov-pot_march_2011Ugif 04 2011   storage prov-pot_march_2011
Ugif 04 2011 storage prov-pot_march_2011UGIF
 
Ugif 04 2011 informix notonlypointofsales-fr-001
Ugif 04 2011   informix notonlypointofsales-fr-001Ugif 04 2011   informix notonlypointofsales-fr-001
Ugif 04 2011 informix notonlypointofsales-fr-001UGIF
 
Ugif 04 2011 informix fug-paris
Ugif 04 2011   informix fug-parisUgif 04 2011   informix fug-paris
Ugif 04 2011 informix fug-parisUGIF
 
Ugif 04 2011 ibm informix genero offering v12
Ugif 04 2011   ibm informix genero offering v12Ugif 04 2011   ibm informix genero offering v12
Ugif 04 2011 ibm informix genero offering v12UGIF
 
Ugif 04 2011 france ug04042011-jroy_ts
Ugif 04 2011   france ug04042011-jroy_tsUgif 04 2011   france ug04042011-jroy_ts
Ugif 04 2011 france ug04042011-jroy_tsUGIF
 
Ugif 04 2011 france ug04042011-jroy_part1
Ugif 04 2011   france ug04042011-jroy_part1Ugif 04 2011   france ug04042011-jroy_part1
Ugif 04 2011 france ug04042011-jroy_part1UGIF
 
Ugif 04 2011 france iiug 4 april - paris informix at ibm update ss
Ugif 04 2011   france iiug 4 april - paris  informix at ibm update ssUgif 04 2011   france iiug 4 april - paris  informix at ibm update ss
Ugif 04 2011 france iiug 4 april - paris informix at ibm update ssUGIF
 
Ugif 04 2011 consulti x mediawiki - ugif
Ugif 04 2011   consulti x mediawiki - ugifUgif 04 2011   consulti x mediawiki - ugif
Ugif 04 2011 consulti x mediawiki - ugifUGIF
 
UGIF 12 2010 - october 2010 pricing and packaging-external
UGIF 12 2010 - october 2010 pricing and packaging-externalUGIF 12 2010 - october 2010 pricing and packaging-external
UGIF 12 2010 - october 2010 pricing and packaging-externalUGIF
 

Plus de UGIF (20)

Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012
Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012
Ugif 10 2012 informix pssc-benchmark -l.revel_oct2012
 
Ugif 10 2012 beauty ofifmxdiskstructs ugif
Ugif 10 2012 beauty ofifmxdiskstructs ugifUgif 10 2012 beauty ofifmxdiskstructs ugif
Ugif 10 2012 beauty ofifmxdiskstructs ugif
 
Ugif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutesUgif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutes
 
Ugif 10 2012 genero ugif october 3, 2012 ibm france, français
Ugif 10 2012 genero   ugif october 3, 2012  ibm france, français Ugif 10 2012 genero   ugif october 3, 2012  ibm france, français
Ugif 10 2012 genero ugif october 3, 2012 ibm france, français
 
Ugif 10 2012 iiug paris-business-update
Ugif 10 2012 iiug paris-business-updateUgif 10 2012 iiug paris-business-update
Ugif 10 2012 iiug paris-business-update
 
Ugif 12 2011-smart meters-11102011
Ugif 12 2011-smart meters-11102011Ugif 12 2011-smart meters-11102011
Ugif 12 2011-smart meters-11102011
 
Ugif 12 2011-informix iwa
Ugif 12 2011-informix iwaUgif 12 2011-informix iwa
Ugif 12 2011-informix iwa
 
Ugif 12 2011-ibm cap-seine
Ugif 12 2011-ibm cap-seineUgif 12 2011-ibm cap-seine
Ugif 12 2011-ibm cap-seine
 
Ugif 12 2011-france ug12142011-tech_ts
Ugif 12 2011-france ug12142011-tech_tsUgif 12 2011-france ug12142011-tech_ts
Ugif 12 2011-france ug12142011-tech_ts
 
Ugif 12 2011-four js primer presentation - new graphic charter - short versio...
Ugif 12 2011-four js primer presentation - new graphic charter - short versio...Ugif 12 2011-four js primer presentation - new graphic charter - short versio...
Ugif 12 2011-four js primer presentation - new graphic charter - short versio...
 
Ugif 12 2011-discover informix keynote 2012
Ugif 12 2011-discover informix keynote 2012Ugif 12 2011-discover informix keynote 2012
Ugif 12 2011-discover informix keynote 2012
 
Ugif 04 2011 storage prov-pot_march_2011
Ugif 04 2011   storage prov-pot_march_2011Ugif 04 2011   storage prov-pot_march_2011
Ugif 04 2011 storage prov-pot_march_2011
 
Ugif 04 2011 informix notonlypointofsales-fr-001
Ugif 04 2011   informix notonlypointofsales-fr-001Ugif 04 2011   informix notonlypointofsales-fr-001
Ugif 04 2011 informix notonlypointofsales-fr-001
 
Ugif 04 2011 informix fug-paris
Ugif 04 2011   informix fug-parisUgif 04 2011   informix fug-paris
Ugif 04 2011 informix fug-paris
 
Ugif 04 2011 ibm informix genero offering v12
Ugif 04 2011   ibm informix genero offering v12Ugif 04 2011   ibm informix genero offering v12
Ugif 04 2011 ibm informix genero offering v12
 
Ugif 04 2011 france ug04042011-jroy_ts
Ugif 04 2011   france ug04042011-jroy_tsUgif 04 2011   france ug04042011-jroy_ts
Ugif 04 2011 france ug04042011-jroy_ts
 
Ugif 04 2011 france ug04042011-jroy_part1
Ugif 04 2011   france ug04042011-jroy_part1Ugif 04 2011   france ug04042011-jroy_part1
Ugif 04 2011 france ug04042011-jroy_part1
 
Ugif 04 2011 france iiug 4 april - paris informix at ibm update ss
Ugif 04 2011   france iiug 4 april - paris  informix at ibm update ssUgif 04 2011   france iiug 4 april - paris  informix at ibm update ss
Ugif 04 2011 france iiug 4 april - paris informix at ibm update ss
 
Ugif 04 2011 consulti x mediawiki - ugif
Ugif 04 2011   consulti x mediawiki - ugifUgif 04 2011   consulti x mediawiki - ugif
Ugif 04 2011 consulti x mediawiki - ugif
 
UGIF 12 2010 - october 2010 pricing and packaging-external
UGIF 12 2010 - october 2010 pricing and packaging-externalUGIF 12 2010 - october 2010 pricing and packaging-external
UGIF 12 2010 - october 2010 pricing and packaging-external
 

Ugif 10 2012 ppt0000001

  • 1. Partition Defragmenter Yoram Benchetrit yoram.benchetrit@fr.ibm.com Mercredi 3 Octobre 2012 User Group Informix France
  • 2. Agenda A bit of partition background The problem with fragmented data How does the feature work Functionality & considerations Defragmenter in OAT Example User Group Informix France
  • 3. A bit of partition background What is an extent ? – Collection of physically contiguous pages on disk – Extent can hold data page, index page, bitmap page etc… What is a partition ? – Logical collection of all the extents allocated for a given table or index. – Space for partition is allocated in units of extents and is not necessarily contiguous. Each partition are unique within the system – oncheck –pt <partnum> User Group Informix France
  • 4. A bit of partition background Partition logical to physical extent relationship User Group Informix France
  • 5. A bit of partition background Before Defragmenting Chunk 14 Extents for table A Extents for other tables Free pages User Group Informix France
  • 6. A bit of partition background After Defragmenting Chunk 14 Extents for table A User Group Informix France
  • 7. A bit of partition background Previous Solutions – Table unload and reload Oncheck –me – Off-line table reorganization – Non-recoverable – Unsupported User Group Informix France 7
  • 8. A bit of partition background How many extents exist ? – Run oncheck –pe. – Run oncheck –pt. – SQL database sysmaster; select unique te_partnum, count(*) from systabextents group by 1 having count(*) > NN order by 1 desc; • Where NN is a value. User Group Informix France
  • 9. The problem with fragmented data What’s the problem with many extents? – Full partition page. • Prohibits new inserts. – Might not be at maximum number of rows. • Need to either delete older entries, if possible. – or • Requires a manual table recreation. – (FYI: Actually, this can no longer exist in 11.70) User Group Informix France
  • 10. The problem with fragmented data Many extents degrades performance. – Need to skip over non-contiguous disk areas. – Slower retrieval of data. – Mapping logical page numbers to physical addresses is slower. – Chunk allocations are slower with long free list pages – Archive extent-sorting phase is slower User Group Informix France
  • 11. The problem with fragmented data What’s the problem with many extents? – Many tables with many extents feels overbearing. • Outputs from oncheck –pe & -pt. User Group Informix France
  • 12. How does the feature work Run new SQL API functions. – sysadmin database. – execute function [admin|task] ("<defragment", "<database>:[<owner>.]<table>[#index]") • or – execute function [admin|task] ("<defragment partnum", "<partnum> [, <partnum>, ... ]”); User Group Informix France
  • 13. How does the feature work – What goes on behind the scenes. • Check validity. • Create new extent. • Might need just one adding • Start a loop and process all old extents. – Read old extent. – Move all old extent pages to the new extent. – Delete old extent. • Loop end. User Group Informix France
  • 14. How does the feature work Log the work using five new log types. – Start defragmentation. – End defragmentation. – Add new defragmentation extent. – Remove old defragmentation extent. – Move page. Will result in a surge in logical log usage. User Group Informix France
  • 15. How does the feature work Monitoring progress. – onstat -g defragment. • Searching for extents. • Merging extents. • Defrag_completed. • Defrag_failed. User Group Informix France
  • 16. How does the feature work Recoverable if server shuts down or crash – Defragmenter cleaner thread will remove extra extents after fast recovery • Rolls back current unit of work (UOW) if needed. – 08:52:06 Defragmenter cleaner thread now running – 08:52:06 Defragmenter cleaner thread cleaned:1 partitions – Will the object be consistent ? • Yes. – Choose to run again to complete the job. User Group Informix France
  • 17. Functionality Can defragment table online No locks placed on object Only allowed one defragmenter running per dbspace Replication is supported (HDR, MACH11, ER) Run via the SQL API interface. User Group Informix France
  • 18. Considerations Functionality not allowed – Functional indexes. – VTI & VII objects. – Temporary tables. – Sort tables. – Optical blobs. – System catalog tables User Group Informix France
  • 19. Considerations Cannot stop once job submitted Cannot run simultaneously when table being – Altered – Truncated – Drop – Compress, Repack, Shrink Not the same as compress/repack/shrink Enterprise Replication. – Table needs to be in CDR alter mode. • Mode unset automatically at end of job User Group Informix France
  • 20. Considerations Operation is logging-intensive – Each page move is logically logged (DFMVPG) • 70-80 bytes per page moved Small units of work to avoid long transaction. – It may send other transactions over the threshold New extents created at end of dbspace. Schedule during low activity. Perform after a backup. User Group Informix France
  • 21. Defragmenter in OAT On the OAT menu, expand Space Administration > Space Optimization User Group Informix France 21
  • 22. Defragmenter in OAT On the Actions menu, click Optimize Space. Select the tables. User Group Informix France 22
  • 23. Defragmenter in OAT Select Defragment extents and click OK. User Group Informix France 23
  • 24. Defragmenter in OAT Automatic Storage Optimization – Can automate defragmenting using OAT. – Enabled via scheduler task “auto_crsd” • This can also do compressing, repacking, shrinking. • ‘crsd’ stand for compress, repack, shrink, defragment – This can also be enabled via SQL User Group Informix France
  • 25. Defragmenter in OAT ‘auto_crsd’ task details – In OAT -> Task Scheduler -> Task Details • UPDATE ph_task SET tk_enable = 'T‘ WHERE tk_name = 'auto_crsd'; User Group Informix France
  • 26. Defragmenter in OAT ‘auto_crsd’ task parameters. – UPDATE ph_threshold SET value = 'F WHERE name = 'AUTODEFRAG_ENABLED'; – UPDATE ph_threshold SET value = ‘100‘ WHERE name = 'AUTODEFRAG_EXTENTS'; User Group Informix France
  • 27. Example SQL to create three fragmented tables – create table tab1 (a serial, b int, c int); – create table tab2 (a serial, b int, c int); – create table tab3 (a serial, b int, c int); – create procedure ins (a int, b int) define c int; • for c = a to b • insert into tab1 values (0, 88, 99); • insert into tab2 values (0, 88, 99); • insert into tab3 values (0, 88, 99); • end for; – end procedure; – execute procedure ins (1, 1000000); User Group Informix France
  • 28. Example oncheck –pe before defragment. User Group Informix France
  • 29. Example oncheck –pt before defragment. – FYI : in 11.70 No longer limited to one partn page. User Group Informix France
  • 30. Example SQL API function. – execute function task ("defragment", "oltr:tab1"); (expression) OK User Group Informix France
  • 31. Example oncheck –pe after defragment. User Group Informix France
  • 32. Example oncheck –pt after defragment. User Group Informix France
  • 33. Example onlog output User Group Informix France
  • 34. Summary Informix Defragmenter Capabilities – Partition Extents Defragmentation – New System Admin SQL API – OAT GUI Interface – Automatic Defragmentation – Can be completed with compress/repack/shrink for optimal storage optimization User Group Informix France
  • 35. Questions ? User Group Informix France
  • 36. Merci Yoram Benchetrit yoram.benchetrit@fr.ibm.com Mercredi 3 Octobre 2012 User Group Informix France