[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference acadmy::tpas_notes

Title:Transfer Price Administration System
Notice:Conference has moved to ACADMY::TPAS_NOTES
Moderator:ACADMY::MAGNI
Created:Wed Jul 01 1992
Last Modified:Fri Mar 21 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:102
Total number of notes:459

23.0. "VERY IMPRESSIVE PERFORMANCE WITH TPAS LOGIC MODULES" by ZGOV02::YNTAN (YN TAN @ZGO) Tue Jan 26 1993 23:46

    
    
    Hello,
    
       I installed a new saveset TPAS007.A in the TPAS$PUBLIC
    directory and tested the tpas logic modules today with the latest
    TPAS_DB_0039.RBR. I submitted nine batches of tpas update each with
    one or more part classes after the installation and compare the results
    with the run using TPAS006.A saveset.  I am very impressed with the
    vast improved in performance e.g. 
    
      saveset version:          TPAS006.A     TPAS007.A
     
      no of records	     
      successfully              2916	    	3240
      returned from
      TPAS_CALC_TRNSFR_PRC  
    
      Elapse time 		8:40:49.30      1:26:56.24
      Buffered i/o count        132322           8591
       Direct I/O count	        735048           44487 
      Page faults               608079           4581
    
    
      This is only from one of the batch.
       
      I hope you don't mind explaining why the impressive performance so
      that all of us can learn from you.  
      
      Note: I also use a new disk RF73... for the run which also is one of the
      major cause of the vast improvements before I install TPAS007.A.
    
    Rgds,
     Yan Noi
     
    
      
T.RTitleUserPersonal
Name
DateLines
23.1Great performance improvementELIS::ELIS::JANSSENRWed Jan 27 1993 08:1310
    Hello,
    
    We installed also the latest TPAS saveset TPAS007.A and we are also very
    enthousiast about the performance improvement. Our batch job called
    TPAS 3016 times and managed to do this in 00:39:23. The same program
    linked against the previous TPAS software lastet  more than 8 hours.
    
    My congratulations to the TPAS project team.
    
    Rinus Jansen 
23.2How we did it AYRPLN::RAMANA::RAMANARamana Annavarapu, MSO2-2/H11Wed Jan 27 1993 15:2761

	TPAS Performance 

        The TPAS Logic module (TPAS_CALC_TRNSFR_PRC) was facing performance 
	problems. This module is a callable program which calculates the 
	transfer price to be used for a part number, given the ship from and 
	ship to area codes.

	It was confirmed that the SQL Statements executed as part of the code
	were using the indices defined on the various tables and that that this
	was not a cause for the problem faced on site.

	The program first converts the Stockroom number/Plant Mnemonic to a 
	valid transfer area code or validates the input transfer area code,
	depending on the value of the shipping data logical. This is done by
	calling a cobol program "TPAS_STKRM_TO_AREA". The part number is then
	validated by checking the MPF Database on ACADMY/the AMPS file at the
	site. Once the data is found to be valid, the Pricing/Discount tables
	on the TPAS database are read to get the appropriate information for
	the transfer price calculation.

	The program was analyzed using the VAX Performance and Coverage
	Analyzer. 

	It was found that the most time was consumed during the SET
	TRANSACTION Statement executed in the TPAS_STKRM_TO_AREA module. It was
	also noticed that the TPAS_STKRM_TO_AREA module detached from the
	databases after the validation was complete. The next most time was
	consumed by the module to fetch information from the Pricing/Discount
	Tables. Further, the databases were detached from before exiting from
	the callable module.

	The first change was made to ensure that instead of using the SET
	TRANSACTION Statement, a DECLARE TRANSACTION Statement was used. This
	was expected to reduce the time somewhat. When PCA was run on the
	modified version, the most time was spent on the first executable SQL
	Statement. This confirmed that the greatest bottleneck was that the
	databases were being detached from at the end of each call of
	TPAS_CALC_TRNSFR_PRC and that this was wholly unnecessary.

	The FINISH Statement found to be executed in all the modules was
	replaced with a COMMIT statement, to ensure that the transaction was 
	not left outstanding. When the performance was measured again using
	PCA, a drastic improvement in the performance was found.

	It is to be noted that the program never explicitly detaches from the 
	database, but when the calling program ends and the image is 
	deactivated, all files to which the process was attached are detached
	from. This could be a problem if the calling program could be left
	running for a long period of time. The only real dangers are that
	database maintenance activities could be affected and max attaches
	threshold may be reached earlier than otherwise expected. To guard
	against this potential problem, it is recommended that the next release
	of this module have the users detach from the database using a separate
	TPAS call when they have completed all activity related to the
	calculation of the transfer prices. This should also be kept in mind
	when developing other modules of the TPAS System as well as any other
	system developed by us.