Skip to main content


 

Symptoms

 


Very big delays in K2 processes observed on the user side while users performing normal operations (interaction with K2 SmartForms). This is accompanied by 60-80% CPU utilization level on the K2 host server and increasing number of CPUs does not improve situation. It is also visible that K2HostServer.exe is the heaviest process on the server which uses all CPU resources. RAM and HDD usage on K2 server are normal. 
 

 

Diagnoses

 


Extra things which should be verified in similar scenarios:

 

 

 

0) Any preceding changes in the environment before you noticed this issue? E.g. updates or configuration changes, deployment of new version of K2 process or new process/solution? Check with K2 developers as well as with IT infrastructure department.

 

 

 

1) Obtain more specific information on frequency of high CPU usage - is it constant or only spikes few time during the day. This may help isolating root cause.

 

 

 

2) Verify if RAM usage is also high. In 90% of the cases abnormal resource usage caused by some custom code or delays/instability of external systems/sources used by your K2 processes.

 

 

 

3) Review K2 host server logs recorded at the time of high CPU usage.

 

 

 

4) Execute the following SQL queries against K2 DB during the time when you see this issue:

 

 

 

--QUERY1

 

SELECT TOP 200 ID, DATALENGTH(State)/1048576.0 AS StateSize, Version, StartDate, Originator, Folio, Status

 

FROM Server.ProcInst WITH(NOLOCK)

 

WHERE Status IN (1, 2) AND DATALENGTH(State)/1048576.0 >= 1

 

ORDER BY DATALENGTH(State) DESC

 

 

 

--QUERY2

 

SELECT * FROM gK2].aServer].aProcInst] WHERE gStatus] = 1

 

 

 

5) Review hardware specifications of your K2 and SQL server.

 

 

 

6) Make sure that you have no issues/high latency on SQL server side - double check specifically if your K2 server CPU usage spikes coincide with any heavy load on SQL server side, and make sure that your SQL server instance which hosts K2 DB is not being shared with any other I/O intense applications (e.g. Exchange, SharePoint etc.). It is recommended to run K2 DB on dedicated SQL service instance.

 

 

 

7) Make sure that K2 server VM does not share the same virtualization host with I/O intensive applications, e.g. Exchange or SharePoint. Have a look at the following K2 community KBs: http://community.k2.com/t5/K2-blackpearl/K2-blackpearl-service-high-RAM-usage/ta-p/92114 http://community.k2.com/t5/K2-blackpearl/K2-Host-Service-CPU-usage-close-to-100/ta-p/77239 http://community.k2.com/t5/K2-blackpearl/Unresponsive-K2-Workspace-Server-run-out-of-worker-threads/ta-p/80723 http://mikerodionov.com/2016/05/k2-host-server-eats-up-my-ram/

 

 

 

As an example in one specific caseIn we identified that symptoms are very similar to those described here: http://community.k2.com/t5/K2-blackpearl/K2-Host-Service-CPU-usage-close-to-100/ta-p/77239 Next we confirmed that environment had increase of users quantity before this problem surfaced. After user base increase there were delays on the client side up to 30-40 minutes in different use-cases (loading smart-form, taking task, approving task and so on) and on different SmartForms. The common trait for all tests was that client's browser was unresponsive while performing some AjaxCall script.
 

 

Resolution

Using Dynatrace AppMon for monitoring K2 HostServer it was possible to identify an issue similar to one described on the Dynatrace forums:

 

http://apmblog.dynatrace.com/2013/03/12/net-and-sharepoint-performance-dont-let-default-settings-ruin-your-end-user-experience/

 

Based on this we increased parameter: in K2HostServer.exe.config file from 500 to 5000. This improved performance significantly. In addition to this we also tuned DB and Host Server according to recommendations in below articles:

 

https://msdn.microsoft.com/en-us/library/cc558565(v=bts.10).aspx http://www.infoworld.com/article/3038429/application-development/how-to-tune-machine-config-settings-for-improved-performance.html

 

 

 

These changes resolved poor performance issue.

 

 



 
Be the first to reply!

Reply