How to debug performance in Service REST

Hi,

We are using a Service REST which serves some requests and it is taking high time to respond. I was trying to look into the alert logs But all I get is the below error:

2023-03-09 09:22:32,058 GMT*8*PEGA0011*1434*1000**xxxxxxxxxxxxxxxxxxxxxxxxxxxx*N*8943*xxxxxxxxxxxxxxxxxxxxxxxxxx*2935*default task-11617*STANDARD*com.pega.pegarules.integration.engine.internal.services.ServiceAPI 0*NA*false*NA***pxRDBIOElapsed=0.11;pxDeclExprCtxFreeUseCount=1;pxRDBIOCount=32;pxRunStreamCount=5;pxServiceActivityElapsed=0.78;pxTotalReqCPU=0.92;pxRunModelCount=43;pxRunWhenCount=2,632;pxDeclarativePageLoadElapsed=0.15;pxConnectClientResponseElapsed=0.23;pxRulesExecuted=3,625;pxStreamWriteCount=1;pxOtherCount=39;pxTotalReqTime=1.43;pxActivityCount=123;pxAlertCount=1;pxOtherFromCacheCount=157;pxRDBWithoutStreamCount=39;pxRunOtherRuleCount=2;pxStreamWriteTimeElapsed=0.00;pxConnectElapsed=0.39;pxDeclarativeRulesInvokedCount=2;pxInteractions=1;pxRuleCount=117;pxStreamOutputBytes=21,044;pxServiceOutMapReqElapsed=0.00;pxInputBytes=399;pxJavaCompileElapsed=0.08;pxConnectCount=3;pxRuleIOElapsed=0.00;pxServiceCount=1;pxRulesUsed=33,780;pxDeclarativePageLoadCount=22;pxRuleFromCacheCount=117;pxOtherIOElapsed=0.01;pxTrackedPropertyChangesCount=5;pxRDBRowWithoutStreamCount=3,053;pxOtherIOCount=1;pxServiceDataVolume=399;pxJavaCompileCount=4;pxConnectInMapReqElapsed=0.05;*NA*NA*NA*NA*NA*NA*RULE-SERVICE-REST xxxxxxxxxxxxxxxxxxxx x4!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #0000000000.000 GMT has exceeded the threshold of  1,000 ms: 1,434 ms;pxServiceInMapReqElapsed=0;pxServiceOutMapReqElapsed=1;pxServiceActivityElapsed=781;pxParseRuleTimeElapsed=0;*

As what I understand the total time taken by the Service REST is 1434 ms and pxServiceActivityElapsed is 781 ms, pxServiceInMapReqElapsed is 0 ms and pxServiceOutMapReqElapsed is 1 ms. I want to understand where is the remaining time getting consumed?

Is it in authentication or something else ? Need help on how to debug this issue please.

We are using LDAP authentication and also turned on Service invocation history.

Thanks,

Puneet

@BankupalliP16900419 there are other factors like jvm, active threads, OS etc etc.. Please check below url if it answers your query

https://support.pega.com/question/service-rest-performance-issue

@Anoop Krishna I wanted to check more on the PEGA side. How to see where is the time taken because the activity is taking only half of the time. But remaining half time is going in JVM and thread and OS ?

@B.Puneet we can make use of alert logs(you can reduce the threshold time in prconfig.xml so that alerts more the threshold will be captured).And also you can make use of tools like Pega Logs analyzer component or splunk which can be used for monitoring logs. These are the best approaches to troubleshoot it.

Yes right, jvm and OS also contribute to the performance of interaction.