Time taken in calling .p files and persistent procedures.

Posted by nilesh_pharate on 17-Oct-2015 04:04

I am running progress code on broker (running on AIX machine) . Using progress 10.2B.

when code gets executed I noticed that there is lot of time taken just to call .p file or persistent procedure. Time taken is around 8 to 40 seconds.

I have few questions regarding same.

1. Is this related to memory leak. I have tried to avoid any memory leak by using single copy of persistent procedure, deleting unused procedures etc.

2. Do I need to increase stack size (-s parameter) , as I am passing lot of information through temp-tables to these procedures or .p files ?

But I did not see any stack overflow error till now in logs. Request processing getting completed without any error but its taking time.

3. Do I need to increase heap size (-jvmargs parameter) ? But I did not notice any hep size error also.

4. Does this is related to resources available on server (memory, CPU etc) ? Do I need to re-configure those things on server?

If anyone has faced same situation, Your findings or solutions are much appreciated.

Thanks in advance. 

All Replies

Posted by Tim Kuehn on 17-Oct-2015 08:50

Call times like this are not a result of the AVM - the code itself is doing something that's taking all that time.

Posted by nilesh_pharate on 17-Oct-2015 11:56

@Tim: I checked adding logs at start of .p or procedure... measured time from calling .p to that log I added using 4GL-Trace. There is no code to execute except line which writes log. I guess its the calling time only.

Posted by Lieven De Foor on 17-Oct-2015 13:43

What is your propath setting?

Are you using -q parameter?

Posted by Tim Kuehn on 17-Oct-2015 15:57

Some other options then:

  1. there's a network drive in the propath that's timing out before the AVM can continue 
  2. the .p has a large number of temp table definitions, and you're running < 11.0. Progress does eager instantiation for TTs, so if you have a huge DBI file somewhere after running this program, then that's where your problem list.

Posted by Brian K. Maher on 19-Oct-2015 05:35

Nilesh,

>> 2. Do I need to increase stack size (-s parameter) , as I am passing lot of information through temp-tables to these

>> procedures or .p files ?

This is the most likely cause of the problem.  How are you passing these temp-tables?  If you are simply passing the temp-table from one program to another as a parameter then the AVM copies the data.  If there is a lot of data in each temp-table then that will take time to copy.  I would recommend passing the temp-table handle instead.

Brian

Posted by Tim Kuehn on 19-Oct-2015 09:52

I would recommend passing the temp-table handle instead.

Or pass the TTs BY-REFERENCE:

RUN x.p (TABLE ttTest BY-REFERENCE).

Posted by nilesh_pharate on 20-Oct-2015 00:11

Thanks Tim! I will surely try it and will post my observations.

Posted by nilesh_pharate on 21-Oct-2015 14:56

@Tim: It worked well for me. Initially same call was taking around 35 sec, now its taking around 200 ms.

Posted by Tim Kuehn on 21-Oct-2015 15:24

Excellent.

Posted by Swalpa Jain on 23-Oct-2015 05:41

@Tim: Now we are facing some other issue over here. We are testing same code for performance testing phase with 1K concurrent users,  (where number of users and request is increasing per second till number of user reaches 1K). Initially this call takes around 200 ms, but same thing increases to 4-5 seconds at full load, I have passed all temp-tables as reference only, which helped me a lot, but still I need to reduce time taken to call a procedure under heavy load. Any comments would be appreciated.

Posted by Tim Kuehn on 23-Oct-2015 09:17

Swalpa - this would require a more in-depth look at what you're doing, and not something I can do from here. Please drop me a line at tim.kuehn@tdkcs.com and we can discuss your specifics.

Posted by Thomas Mercer-Hursh on 23-Oct-2015 10:59

If the procedure is fast single threaded and you are seeing slowness under heavy user load, it sounds like it is the AppServer that needs tuning ... or, perhaps you simply have too much load for the resources.

Posted by nilesh_pharate on 27-Oct-2015 03:39

@Thomas: Yes procedure is single threaded, but we are not seeing any load on CPU or memory of CPU. Seems app server needs tuning, but I am not sure which parameters need to be adjusted for this tuning. We have already increases -s (stack size) parameter, but it did not have much improvement.

Posted by Lieven De Foor on 27-Oct-2015 06:45

I don't think stack size (-s) is a performance impacting parameter.

How many AppServer agents are available? If there are too many concurrent request to be served by all (available) agents, they might get queued at the broker.

Posted by nilesh_pharate on 27-Oct-2015 12:31

My problem solved, I increased value of -Bt parameter which specifies number of buffers for temp-tables. Now calls are executed in 50 ms even under heavy load. This was problem with TT's only. Passing those by-ref helped me and then increasing -Bt made it more fast.

Posted by Tim Kuehn on 27-Oct-2015 12:44

Excellent! Congrats on that!

This thread is closed