Question

Cognite Function single call runtime

  • 23 January 2024
  • 4 replies
  • 41 views

Badge

Hi community,

I have noticed a large discrepancy in runtime when running my handle function as a single Cognite Function call and when I run the handle function locally. And yes, this is the runtime of the actual CALL, not the creation/deployment of the Cognite Function. The handle function is doing some calculations on a time series with around 500 000 datapoints. Locally, it runs under 1 minute, while through Cognite Function call it takes around 9 minutes. 

Do you have any idea what could cause the large discrepancy?

Thanks!


4 replies

Userlevel 1
Badge +2

Hi Vetle. 
It could be the CPU cores per function call and/or the RAM per function call. 

 

Badge

Is it possible to change this to the maximum available cores per function call? In that case, where do we set this? Or is the maximum the default?

Userlevel 1
Badge +2

To my knowledge, no, it is not possible to change.
Someone please correct me if I am wrong.
This is one of the biggest restriction of Cognite functions!
What you can do is to push your code to foundational infrastructure if it can be an internal service managed by Cognite. 
See documentation here

Badge

Thank you. My account is unfortunately not added as an external user to the “Cognite AS” tenant, so I can’t open the link provided.

Reply