thread are an importance resource.
A thread is a DB2 structure that descirbes a connection made by a application and trace its
process. (notice its equals connection's)
kind of thread
allied thread
database access thread (DBAT )
set limit:
1 set max user & max remote active
the total number of the above is 2000
2 for the tso connect and Call attachment facility,you limit the number of the threads indirected by choosing values for the MAX TSO CONNECT & MAX BATCH CONNECT
ALLIED THREAD CREATION
1 CHECK THE MAXIMUM NUMBER OF THE THREAD
2 CHECK THE PLAN AUTHORIZATION
3 FOR AN APPLICATION PLAN, LOAD THE CONTROL STRUCTURE ASSOSIATIED WITH THE PLAN
THE CONTROL BLOCK OF AN PLAN IS DIVIDE INTO SECTIONS:
THE HEADER AND DIRECTORY CONTAIN THE CONTROL INFORMATION
SQL SECTION CONTAIN SQL STATEMENT FROM THE APPLICATION
A COPY OF THE PLAN'S CONTROL STRUCTURE IS MADE FOR EACH THREAD EXECUTING THE PLAN
.ONLY THE HEADER AND DIRECTORY ARE LOADED WHEN THE THREAD IS CREATED.
4 LOAD THE DESCRIPTOR NECESSARY TO PROCESS THE PLAN
SOME OF THE CONTROL STRUCTURE DESCRIBE THE DB2 TABLE SPACE,TABLES,AND INDEXES USED BY THE APPLICATION.IF ACQUIRE(ALLOCATE) IS USED,ALL THE DESCRIPTORS REFERRED TO THE THE PLAN ARE
LOAD NOW.IF THE PLAN IS BOUND WITH ACQUIRE(USE),THEY ARE LOADED WHEN THE SQL STATEMENT ARE
EXECUTED.
THE MOST RELEVANT FACTION FROM A SYSTEM PERFORMANCE POINT OF VIEW ARE:
THREAD REUSE
THREAD CREATION IS A SIGNIFICANT COST FOR A SMALL AND MEDIUM TRANSACTION
WHEN EXEC OF A TRAN IS TERMINATED,THE THREAD CAN SOMETIMES REUSED BY ANOTHER TRANS USING THE SAME PLAN.
EDMPOOL SIZE
THE SIZE OF THE EDM POOL INFLUNENCES THE NUMBER OF THE I/O NEEDED TO LOAD THE CONTROL STRCTURES NECESSARY TO PROCESS THE PLAN OR PACKAGE.
ACQUIRE OPTION OF BIND
RESOURCE ALLOCATION
4KB PAGES ----------------STRUCTURES
IF NOT AVAIABLE ,FIRST LOAD INTO BP0 ,THEN COPY IT FROM THERE TO EDM POOL
SQL STATEMENT EXECUTION
IF THE STATEMENT RESIDES IN A PACKAGE,THE DIRECTORY AND HEADER OF THE PACKAGE'S CS(CONTROL STRUCTURE) IS LOAD AT THE TIME OF THE FIRST EXEC OF THE STATEMENT IN THE PACKAGE.
THE CS FOR A PACKAGE IS ALLOCATE AT STATEMENT EXEC TIME.THIS IS CONTRAST WITH THE CS FOR PLANS BOUNDS WITH ACQUIRE(ALLOCATE),WHICH ARE CREATE AT THREAD CREATION TIME.
THE HEADER OF THE PLAN'S CS IS ALLOCATED AT THREAD CREATION REGARDLESS OF THE ACQUIRE(ALLOCATE & USE).
STEP 4 COMMIT AND THREAD TERMINATION
COMMIT PROCESS CAN OCCUR MANY TIMES WHILE A THREAD IS ACITVE.
WHEN THE APPLICATION PROGRAM OR THE THREAD TERMI NATES ,AN IMPLICT COMMIT OR SYNCPOINT IS ISSUED.
NEXT IS TWO-PHASE COMMIT
阅读(1356) | 评论(0) | 转发(0) |