SlideShare a Scribd company logo
1 of 18
Download to read offline
 Consideration when optimizing ALTIBASE HDB Replication
♦ Compulsory for minimizing the replication gap and improving TPS
• Optimize Network
• Transaction Tuning
♦ Active-Active
• Partial failure and partial rollback
• Lock system in Replication
• Replication lock timeout
• Replication Dead-Lock
• Replication Sender Tuning
 UPDATE for PK is not available
♦ Treated as error when UPDATE is executed on PK as there
could be a replication conflict
 H/W
♦ Connected with H/W performance as it’s TCP/IP Network based replication
• Replication exclusive line that is over 1 Giga Bit bandwidth separated from
service line
• Exclusive LAN card is recommended as much as the number of replication
objects
• Twice the number replication related network H/W is required to prepare for
network failure(multiple IP)
• Optimize other network facilities
S/W
♦ Optimize the configuration of network parameters depending on OS
platform
Design Replication object
♦ Separating replication object is recommended if the order of transaction
among replication objects is not important
• Increase of performance can be expected as the replication sender thread is
created as much as the number of objects
• Separation of disk table and memory table is recommended
– Prevents the performance reduction of memory table reduced by the slow performance of
disk table
 Transaction tuning that exceeds network bandwidth
♦ Bulk DML operations are not recommended
 Separation using LIMIT query
 Execute same operation after configuring replication session control option
to “NONE” from both servers
 Use TRUNCATE rather than DELETE when deleting entire table regularly
 Minimize UPDATE operations
♦ Network bandwidth usage can be reduced just by minimizing the
unneeded UPDATE operations
• XLog for UPDATE operation has the biggest size as it comprises the
“BEFORE” and “AFTER” value
 Partial Fail
♦ Applying particular record of transaction is failed from remote server
♦ Entire transaction fails as particular record fails to reflect
 Cause
♦ Replication conflicts and exceeding replication lock timeout
UPDATE rep_tbl
SET c2 = ‘X’
WHERE c1 >= 301
AND c1 <= 400;
execution #001
execution #002receiver
Xlog
Remote Server
301
302
NEW
NEW
REP_TBL
execution #099
execution #100
399
400
OLD
NEW
fail
[ Situation where one transaction that modifies 100 records fails to reflect one data during replication]
 Different Processing with different replication types for partial
fail
 Partial Rollback
♦ Method that rollbacks the record that have failed during replication in
remote server
♦ Purpose is to prevent the failure of reflection of entire transaction due to
the failure of particular record
♦ Record where partial rollback is executed has the data inconsistency
between local and remote server
lazy eager
Local - Error is occurred when COMMIT is executed
Remote
Error log is recorded with the record and its
statement
Execute partial rollback for the record and its
operation
Error log is recorded about the record and its
statement
Outcome Particular record is only applied in local server
Transaction is not applied to both local and remote
server
 Lock System in replication
 It has the record unit lock system similar with single server
♦ Lock is acquired in two ways when DML is executed on the same
records
• When DML operation of replication acquired the lock first (1~3)
• When DML operation of master transaction acquired the lock first(4~6)
TXTX
Server 2Server 1
UPDATE (2)
UPDATE (45)
1
2
45
DATA
DATA
DATA
REP_TBL
1
2
45
DATA
DATA
DATA
REP_TBL
UPDATE (2)
3
4
UPDATE (45)
2
1
5
6
WAIT
WAIT
[ Flow of acquiring lock between replication servers depending on its lock acquire point]
 Situations for the lock types when long-lasting
♦ When DML operation of replication acquired the lock first
• The master transaction is waiting for the lock to be acquired but it is normal
flow in a DBMS level
♦ When DML operation of master acquired the lock first
• Replication is stopped as the receiver waits to acquire the lock
• Data inconsistency becomes more serious as replication gap increases
 How to handle
♦ Configure the waiting time limit for DML operation of replication
• Choose the policy that gives up the DML operation of particular record
when the waiting time is exceeded
 Replication lock timeout
♦ Maximum waiting time for a receiver to acquire a lock during
replication
♦ Purpose is to prevent the entire replication operations got affected by
lock
♦ Applied by the property from replication receiver
• REPLICATION_LOCK_TIMEOUT, 5 seconds by default
 Considerations
♦ Configure the appropriate replication lock timeout number depending
on the system
• If the number is too big, the replication might be stopped for a long time
• If the number is too small, the data inconsistency might become more
serious as the frequent lock timeout
♦ DML execution from replication server
• Caution is advised that some records might not be applied due to
replication lock timeout
 Replication Deadlock
♦ Infinite waiting as the DML transaction of master and a DML operation
of Replication are crossed each other
♦ Network deadlock that cannot be detected from DBMS
♦ It can be controlled by configuring the maximum waiting time of DML
transaction from the property
• UTRANS_TIMEOUT
♦ Best way is to implement the system that considers two DML
transactions compete
TXTX
Remote ServerLocal Server
UPDATE (2)
UPDATE (45)
1
2
45
DATA
DATA
DATA
REP_TBL
1
2
45
DATA
DATA
DATA
REP_TBL
UPDATE (2)
1
5
3
UPDATE (45)
6
2
4WAIT
WAIT
 Sender’s approaching order of redo
log
1. Replication redo log buffer
2. Redo log buffer
3. Redo logfile
 Tuning via property when sender’s
performance decreased
♦ Increment the size of replication redo log
buffer size
REPLICATION_LOG_BUFFER_SIZE
– Maximum 4G and 30M by default
– To not directly approach the redo log
buffer
Local Server
INSERT UPDATE DELETE
sender
redo log
buffer
redo
logfile #1
redo
logfile #n Xlog
service
service
service
replication
redo log
buffer
service thread Pool
service
123
 DBMS Monitoring methods
Methods Description
Internal Monitoring Monitors internal DBMS by inquiring the meta tables and performance views
External Monitoring Monitors external categories that are related to DBMS using OS commands in a OS level
Trace Log Monitoring Monitors various trace log messages created from DBMS
 Main internal monitoring categories for replication
♦ Replication Gap
♦ Sender
♦ Receiver
 Main external monitoring categories for replication
♦ Network
♦ Redo log file system
♦ ALTIBASE HDB startup status
♦ OS startup status
 Main trace log categories for replication
♦ Replication trace log file
 Additional categories for internal monitoring
♦ The following tables are essential as they are somehow effected each
other even though they are not directly related
• Executing BULK DML
– v$transaction, v$statement, v$session
 Meta table related to Replication
Meta table Description
SYS_REPLICATIONS_ Replication object information
SYS_REPL_HOSTS_ IP information about target replication of each replication object
SYS_REPL_ITEMS_ Table information about target replication for each replication object
SYS_REPL_OFFLINE_DIR_ Information about offline Replication option(5.3.3 higher)
SYS_REPL_OLD_COLUMNS_ Information about column of target Replication that sender is using
SYS_REPL_OLD_INDEX_COLUMNS_ Information about index column of target Replication that sender is using
SYS_REPL_OLD_INDICES_ Information about index of target Replication that sender is using
SYS_REPL_OLD_ITEMS_ Information about table of target Replication that sender is using
SYS_REPL_RECOVERY_INFOS_ Meta table of log information for Replication recovery
 Replication Performance view
♦ It can only be checked when sender and receiver are activated by
running replication
• Replication gap value from v$repgap can only be checked when sender is
activated
Performance View Description
v$repgap Replication gap information
v$repsender Sender information
v$repsender_transtbl Sender’s transaction table information
v$repreceiver Receiver Information
v$repreceiver_column Information about column of target replication of receiver
v$repreceiver_transtbl Information about transaction table of receiver
v$repsync Information about table that is currently executing table cloning
v$repoffline_status Information about status of offline replication(5.3.3 higher)
v$repexec Information about replication manager
v$replogbuffer Information about replication log buffer
 Local Server
iSQL> SELECT rep_name, rep_sn, rep_last_sn, rep_gap, read_file_no FROM v$repgap;
REP_NAME REP_SN REP_LAST_SN REP_GAP READ_FILE_NO
---------------------------------------------------------------------------
REP1 60602217 61617892 1015675 529
1 row selected.
iSQL> SELECT rep_name, xsn, status, repl_mode FROM v$repsender;
REP_NAME XSN STATUS REPL_MODE
-----------------------------------------------------------
REP1 60602217 1 LAZY
1 row selected.
iSQL> SELECT replication_name, xsn, is_started FROM SYSTEM_.SYS_REPLICATIONS_;
REPLICATION_NAME XSN IS_STARTED
--------------------------------------------
REP1 60600750 1
1 row selected.
iSQL> exit
$
$ ls $ALTIBASE_HOME/logs
loganchor0 logfile529 logfile532 logfile535 logfile538 logfile541 logfile544
loganchor1 logfile530 logfile533 logfile536 logfile539 logfile542 logfile545
loganchor2 logfile531 logfile534 logfile537 logfile540 logfile543
 Remote Server
iSQL> SELECT rep_name, apply_xsn FROM v$repreceiver;
REP_NAME APPLY_XSN
----------------------------
REP1 60600750

More Related Content

What's hot

Galvin-operating System(Ch9)
Galvin-operating System(Ch9)Galvin-operating System(Ch9)
Galvin-operating System(Ch9)
dsuyal1
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4
Pranav Prakash
 
DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6
Pranav Prakash
 

What's hot (20)

Tuning Slow Running SQLs in PostgreSQL
Tuning Slow Running SQLs in PostgreSQLTuning Slow Running SQLs in PostgreSQL
Tuning Slow Running SQLs in PostgreSQL
 
Collaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryCollaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mystery
 
Hadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep InsightHadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep Insight
 
Galvin-operating System(Ch9)
Galvin-operating System(Ch9)Galvin-operating System(Ch9)
Galvin-operating System(Ch9)
 
Stored procedures in Firebird
Stored procedures in FirebirdStored procedures in Firebird
Stored procedures in Firebird
 
Major features postgres 11
Major features postgres 11Major features postgres 11
Major features postgres 11
 
DB2 utilities
DB2 utilitiesDB2 utilities
DB2 utilities
 
Collaborate2
Collaborate2Collaborate2
Collaborate2
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4
 
Thriftypaxos
ThriftypaxosThriftypaxos
Thriftypaxos
 
SAP ASE Migration Lessons Learned
SAP ASE Migration Lessons LearnedSAP ASE Migration Lessons Learned
SAP ASE Migration Lessons Learned
 
Extracting twitter data using apache flume
Extracting twitter data using apache flumeExtracting twitter data using apache flume
Extracting twitter data using apache flume
 
ALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARM
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration Basics
 
IBM Tivoli Storage Manager V6 - PCTY 2011
IBM Tivoli Storage Manager V6 - PCTY 2011IBM Tivoli Storage Manager V6 - PCTY 2011
IBM Tivoli Storage Manager V6 - PCTY 2011
 
Anatomy of classic map reduce in hadoop
Anatomy of classic map reduce in hadoop Anatomy of classic map reduce in hadoop
Anatomy of classic map reduce in hadoop
 
Chapter19
Chapter19Chapter19
Chapter19
 
DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6
 
Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11
 
Oracle ebs db platform migration
Oracle ebs db platform migrationOracle ebs db platform migration
Oracle ebs db platform migration
 

Similar to [Altibase] 12 replication part5 (optimization and monitoring)

[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)
altistory
 

Similar to [Altibase] 12 replication part5 (optimization and monitoring) (20)

Demystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scDemystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live sc
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 
Training Slides: 104 - Basics - Working With Command Line Tools
Training Slides: 104 - Basics - Working With Command Line ToolsTraining Slides: 104 - Basics - Working With Command Line Tools
Training Slides: 104 - Basics - Working With Command Line Tools
 
Training Slides: 153 - Working with the CLI
Training Slides: 153 - Working with the CLITraining Slides: 153 - Working with the CLI
Training Slides: 153 - Working with the CLI
 
z/VM Performance Analysis
z/VM Performance Analysisz/VM Performance Analysis
z/VM Performance Analysis
 
Taking Full Advantage of Galera Multi Master Cluster
Taking Full Advantage of Galera Multi Master ClusterTaking Full Advantage of Galera Multi Master Cluster
Taking Full Advantage of Galera Multi Master Cluster
 
Properly Use Parallel DML for ETL
Properly Use Parallel DML for ETLProperly Use Parallel DML for ETL
Properly Use Parallel DML for ETL
 
GLOC 2014 NEOOUG - Oracle Database 12c New Features
GLOC 2014 NEOOUG - Oracle Database 12c New FeaturesGLOC 2014 NEOOUG - Oracle Database 12c New Features
GLOC 2014 NEOOUG - Oracle Database 12c New Features
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to Practice
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
 
Oracle RDBMS architecture
Oracle RDBMS architectureOracle RDBMS architecture
Oracle RDBMS architecture
 
Data guard logical_r3.1
Data guard logical_r3.1Data guard logical_r3.1
Data guard logical_r3.1
 
Real World Performance - Data Warehouses
Real World Performance - Data WarehousesReal World Performance - Data Warehouses
Real World Performance - Data Warehouses
 
Byte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptxByte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptx
 
[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)
 
Network performance overview
Network  performance overviewNetwork  performance overview
Network performance overview
 
Multi-Tenancy Kafka cluster for LINE services with 250 billion daily messages
Multi-Tenancy Kafka cluster for LINE services with 250 billion daily messagesMulti-Tenancy Kafka cluster for LINE services with 250 billion daily messages
Multi-Tenancy Kafka cluster for LINE services with 250 billion daily messages
 
Presentation oracle net services
Presentation    oracle net servicesPresentation    oracle net services
Presentation oracle net services
 
Slashn Talk OLTP in Supply Chain - Handling Super-scale and Change Propagatio...
Slashn Talk OLTP in Supply Chain - Handling Super-scale and Change Propagatio...Slashn Talk OLTP in Supply Chain - Handling Super-scale and Change Propagatio...
Slashn Talk OLTP in Supply Chain - Handling Super-scale and Change Propagatio...
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
 

More from altistory

[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)
altistory
 
[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)
altistory
 

More from altistory (20)

[Altibase] 4-5 summary of tablespace management
[Altibase] 4-5 summary of tablespace management[Altibase] 4-5 summary of tablespace management
[Altibase] 4-5 summary of tablespace management
 
[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)
 
[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)
 
[Altibase] 7 how the buffer is managed in altibase
[Altibase] 7 how the buffer is managed in altibase[Altibase] 7 how the buffer is managed in altibase
[Altibase] 7 how the buffer is managed in altibase
 
[Altibase] 6 what is the mvcc
[Altibase] 6 what is the mvcc[Altibase] 6 what is the mvcc
[Altibase] 6 what is the mvcc
 
[Altibase] 5 durability
[Altibase] 5 durability[Altibase] 5 durability
[Altibase] 5 durability
 
[Altibase] 4-4 disk tablespace
[Altibase] 4-4 disk tablespace[Altibase] 4-4 disk tablespace
[Altibase] 4-4 disk tablespace
 
[Altibase] 4-3 volatile tablespace
[Altibase] 4-3 volatile tablespace[Altibase] 4-3 volatile tablespace
[Altibase] 4-3 volatile tablespace
 
[Altibase] 4-2 memory tablespace
[Altibase] 4-2 memory tablespace[Altibase] 4-2 memory tablespace
[Altibase] 4-2 memory tablespace
 
[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept
 
[Altibase] 3-3 directory contents
[Altibase] 3-3 directory contents[Altibase] 3-3 directory contents
[Altibase] 3-3 directory contents
 
[Altibase] 3-1 architecture
[Altibase] 3-1 architecture[Altibase] 3-1 architecture
[Altibase] 3-1 architecture
 
[Altibase] 2-4 sql functions
[Altibase] 2-4 sql functions[Altibase] 2-4 sql functions
[Altibase] 2-4 sql functions
 
[Altibase] 2-3 general functions
[Altibase] 2-3 general functions[Altibase] 2-3 general functions
[Altibase] 2-3 general functions
 
[Altibase] 2-2 Altibase storage
[Altibase] 2-2 Altibase storage[Altibase] 2-2 Altibase storage
[Altibase] 2-2 Altibase storage
 
[Altibase] 2-1 features
[Altibase] 2-1 features[Altibase] 2-1 features
[Altibase] 2-1 features
 
[Altibase] 1-5 hybrid dbms
[Altibase] 1-5 hybrid dbms[Altibase] 1-5 hybrid dbms
[Altibase] 1-5 hybrid dbms
 
[Altibase] 1-4 data differentiation
[Altibase] 1-4 data differentiation[Altibase] 1-4 data differentiation
[Altibase] 1-4 data differentiation
 
[Altibase] 1-3 history of the hybrid dbms
[Altibase] 1-3 history of the hybrid dbms[Altibase] 1-3 history of the hybrid dbms
[Altibase] 1-3 history of the hybrid dbms
 
[Altibase] 1-2 disk dbms
[Altibase] 1-2 disk dbms[Altibase] 1-2 disk dbms
[Altibase] 1-2 disk dbms
 

Recently uploaded

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 

[Altibase] 12 replication part5 (optimization and monitoring)

  • 1.  Consideration when optimizing ALTIBASE HDB Replication ♦ Compulsory for minimizing the replication gap and improving TPS • Optimize Network • Transaction Tuning ♦ Active-Active • Partial failure and partial rollback • Lock system in Replication • Replication lock timeout • Replication Dead-Lock • Replication Sender Tuning
  • 2.  UPDATE for PK is not available ♦ Treated as error when UPDATE is executed on PK as there could be a replication conflict
  • 3.  H/W ♦ Connected with H/W performance as it’s TCP/IP Network based replication • Replication exclusive line that is over 1 Giga Bit bandwidth separated from service line • Exclusive LAN card is recommended as much as the number of replication objects • Twice the number replication related network H/W is required to prepare for network failure(multiple IP) • Optimize other network facilities S/W ♦ Optimize the configuration of network parameters depending on OS platform Design Replication object ♦ Separating replication object is recommended if the order of transaction among replication objects is not important • Increase of performance can be expected as the replication sender thread is created as much as the number of objects • Separation of disk table and memory table is recommended – Prevents the performance reduction of memory table reduced by the slow performance of disk table
  • 4.  Transaction tuning that exceeds network bandwidth ♦ Bulk DML operations are not recommended  Separation using LIMIT query  Execute same operation after configuring replication session control option to “NONE” from both servers  Use TRUNCATE rather than DELETE when deleting entire table regularly  Minimize UPDATE operations ♦ Network bandwidth usage can be reduced just by minimizing the unneeded UPDATE operations • XLog for UPDATE operation has the biggest size as it comprises the “BEFORE” and “AFTER” value
  • 5.  Partial Fail ♦ Applying particular record of transaction is failed from remote server ♦ Entire transaction fails as particular record fails to reflect  Cause ♦ Replication conflicts and exceeding replication lock timeout UPDATE rep_tbl SET c2 = ‘X’ WHERE c1 >= 301 AND c1 <= 400; execution #001 execution #002receiver Xlog Remote Server 301 302 NEW NEW REP_TBL execution #099 execution #100 399 400 OLD NEW fail [ Situation where one transaction that modifies 100 records fails to reflect one data during replication]
  • 6.  Different Processing with different replication types for partial fail  Partial Rollback ♦ Method that rollbacks the record that have failed during replication in remote server ♦ Purpose is to prevent the failure of reflection of entire transaction due to the failure of particular record ♦ Record where partial rollback is executed has the data inconsistency between local and remote server lazy eager Local - Error is occurred when COMMIT is executed Remote Error log is recorded with the record and its statement Execute partial rollback for the record and its operation Error log is recorded about the record and its statement Outcome Particular record is only applied in local server Transaction is not applied to both local and remote server
  • 7.  Lock System in replication  It has the record unit lock system similar with single server ♦ Lock is acquired in two ways when DML is executed on the same records • When DML operation of replication acquired the lock first (1~3) • When DML operation of master transaction acquired the lock first(4~6) TXTX Server 2Server 1 UPDATE (2) UPDATE (45) 1 2 45 DATA DATA DATA REP_TBL 1 2 45 DATA DATA DATA REP_TBL UPDATE (2) 3 4 UPDATE (45) 2 1 5 6 WAIT WAIT [ Flow of acquiring lock between replication servers depending on its lock acquire point]
  • 8.  Situations for the lock types when long-lasting ♦ When DML operation of replication acquired the lock first • The master transaction is waiting for the lock to be acquired but it is normal flow in a DBMS level ♦ When DML operation of master acquired the lock first • Replication is stopped as the receiver waits to acquire the lock • Data inconsistency becomes more serious as replication gap increases  How to handle ♦ Configure the waiting time limit for DML operation of replication • Choose the policy that gives up the DML operation of particular record when the waiting time is exceeded
  • 9.  Replication lock timeout ♦ Maximum waiting time for a receiver to acquire a lock during replication ♦ Purpose is to prevent the entire replication operations got affected by lock ♦ Applied by the property from replication receiver • REPLICATION_LOCK_TIMEOUT, 5 seconds by default  Considerations ♦ Configure the appropriate replication lock timeout number depending on the system • If the number is too big, the replication might be stopped for a long time • If the number is too small, the data inconsistency might become more serious as the frequent lock timeout ♦ DML execution from replication server • Caution is advised that some records might not be applied due to replication lock timeout
  • 10.  Replication Deadlock ♦ Infinite waiting as the DML transaction of master and a DML operation of Replication are crossed each other ♦ Network deadlock that cannot be detected from DBMS ♦ It can be controlled by configuring the maximum waiting time of DML transaction from the property • UTRANS_TIMEOUT ♦ Best way is to implement the system that considers two DML transactions compete TXTX Remote ServerLocal Server UPDATE (2) UPDATE (45) 1 2 45 DATA DATA DATA REP_TBL 1 2 45 DATA DATA DATA REP_TBL UPDATE (2) 1 5 3 UPDATE (45) 6 2 4WAIT WAIT
  • 11.  Sender’s approaching order of redo log 1. Replication redo log buffer 2. Redo log buffer 3. Redo logfile  Tuning via property when sender’s performance decreased ♦ Increment the size of replication redo log buffer size REPLICATION_LOG_BUFFER_SIZE – Maximum 4G and 30M by default – To not directly approach the redo log buffer Local Server INSERT UPDATE DELETE sender redo log buffer redo logfile #1 redo logfile #n Xlog service service service replication redo log buffer service thread Pool service 123
  • 12.  DBMS Monitoring methods Methods Description Internal Monitoring Monitors internal DBMS by inquiring the meta tables and performance views External Monitoring Monitors external categories that are related to DBMS using OS commands in a OS level Trace Log Monitoring Monitors various trace log messages created from DBMS
  • 13.  Main internal monitoring categories for replication ♦ Replication Gap ♦ Sender ♦ Receiver  Main external monitoring categories for replication ♦ Network ♦ Redo log file system ♦ ALTIBASE HDB startup status ♦ OS startup status  Main trace log categories for replication ♦ Replication trace log file
  • 14.  Additional categories for internal monitoring ♦ The following tables are essential as they are somehow effected each other even though they are not directly related • Executing BULK DML – v$transaction, v$statement, v$session
  • 15.  Meta table related to Replication Meta table Description SYS_REPLICATIONS_ Replication object information SYS_REPL_HOSTS_ IP information about target replication of each replication object SYS_REPL_ITEMS_ Table information about target replication for each replication object SYS_REPL_OFFLINE_DIR_ Information about offline Replication option(5.3.3 higher) SYS_REPL_OLD_COLUMNS_ Information about column of target Replication that sender is using SYS_REPL_OLD_INDEX_COLUMNS_ Information about index column of target Replication that sender is using SYS_REPL_OLD_INDICES_ Information about index of target Replication that sender is using SYS_REPL_OLD_ITEMS_ Information about table of target Replication that sender is using SYS_REPL_RECOVERY_INFOS_ Meta table of log information for Replication recovery
  • 16.  Replication Performance view ♦ It can only be checked when sender and receiver are activated by running replication • Replication gap value from v$repgap can only be checked when sender is activated Performance View Description v$repgap Replication gap information v$repsender Sender information v$repsender_transtbl Sender’s transaction table information v$repreceiver Receiver Information v$repreceiver_column Information about column of target replication of receiver v$repreceiver_transtbl Information about transaction table of receiver v$repsync Information about table that is currently executing table cloning v$repoffline_status Information about status of offline replication(5.3.3 higher) v$repexec Information about replication manager v$replogbuffer Information about replication log buffer
  • 17.  Local Server iSQL> SELECT rep_name, rep_sn, rep_last_sn, rep_gap, read_file_no FROM v$repgap; REP_NAME REP_SN REP_LAST_SN REP_GAP READ_FILE_NO --------------------------------------------------------------------------- REP1 60602217 61617892 1015675 529 1 row selected. iSQL> SELECT rep_name, xsn, status, repl_mode FROM v$repsender; REP_NAME XSN STATUS REPL_MODE ----------------------------------------------------------- REP1 60602217 1 LAZY 1 row selected. iSQL> SELECT replication_name, xsn, is_started FROM SYSTEM_.SYS_REPLICATIONS_; REPLICATION_NAME XSN IS_STARTED -------------------------------------------- REP1 60600750 1 1 row selected. iSQL> exit $ $ ls $ALTIBASE_HOME/logs loganchor0 logfile529 logfile532 logfile535 logfile538 logfile541 logfile544 loganchor1 logfile530 logfile533 logfile536 logfile539 logfile542 logfile545 loganchor2 logfile531 logfile534 logfile537 logfile540 logfile543
  • 18.  Remote Server iSQL> SELECT rep_name, apply_xsn FROM v$repreceiver; REP_NAME APPLY_XSN ---------------------------- REP1 60600750