You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/10/21 08:15:11 UTC

[GitHub] [openwhisk] parichehrvn opened a new issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

parichehrvn opened a new issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007


   
   I install _openwhisk_ via _kubernetes_ cluster. I invoke my actions through the API and also receive their logs via API. But in the log, it is only known whether the action is _cold_ or _warm_, through initTime annotation. And it is not clear whether the cold action is executed on a _cold container_ or _preWarmed container_.
    I tried to access this information through the _user-events service_ and _metrics endpoint_ via kubectl port forwarding and localhost:9095/metrics. But at this endpoint, only the cold start number is specified.
    How do I know if the action is executed on a prewarm container?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] parichehrvn commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
parichehrvn commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-716742369


   > The system does not record the container allocation - so this is not possible without modifying the metric generation or the annotations on activations.
   
   can you suggest a metric for this?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] style95 commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
style95 commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-717645419


   Since we already expose `cold` and `warm` to users, I just want to provide more fine-grained information.
   For example, even if an activation denotes a cold start, the wait time can vary when prewarm is used or the container is recreated.
   
   From the operator perspective, I wanted it to figure out the performance difference among different start types.
   With ElasticsearchActivationStore, we can easily get the statistics and dashboard for each type.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] style95 commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
style95 commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-716978173


   I feel this implies more fine-grained starting types such as `prewarm`, `cold`, `recreated`, and `warm` in activation results?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] rabbah commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-716574657


   The system does not record the container allocation - so this is not possible without modifying the metric generation or the annotations on activations.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] parichehrvn commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
parichehrvn commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-717778790


   > Since we already expose `cold` and `warm` to users, I just want to provide more fine-grained information.
   > For example, even if an activation denotes a cold start, the wait time can vary when prewarm is used or the container is recreated.
   > 
   > From the operator perspective, I wanted it to figure out the performance difference among different start types.
   > With ElasticsearchActivationStore, we can easily get the statistics and dashboard for each type.
   
   Can you please explain more? I have never worked with Elasticsearch. How can I access the activation logs through the API using Elasticsearch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] parichehrvn edited a comment on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
parichehrvn edited a comment on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-716742369


   > The system does not record the container allocation - so this is not possible without modifying the metric generation or the annotations on activations.
   
   can you suggest a metric for this?  Can I define this metric in environment variables?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] rabbah commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-717926037


   This requires code changes in the invoker. I think the metric has to be emitted from the container proxy which will know if it's a pre-warm container or a new container. The information has to be retained until the activation record is created so that it's added as an annotation.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] rabbah commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-717127732


   What’s the use case for knowing this? 
   I thinks it’s for research purposes. Is it useful otherwise?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] style95 commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
style95 commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-717801826


   @parichehrvn You can use Elasticsearch as an activation store.
   https://github.com/apache/openwhisk/blob/f788d095565c14d3a2908cdf71215498a5512b36/ansible/README.md#using-elasticsearch-to-store-activations
   
   But only `cold` and `warm` start type is available now.
   Also, we can indirectly infer the start type by the existence of "initTime" but there is no explicit field for them.
   So I doubt you can directly get some statistics using the start type.
   
   But the `wsk` CLI is already exposing the start type.
   
   ```
   $ wsk activation list
   Datetime            Activation ID                    Kind      Start Duration   Status  Entity
   2020-10-28 13:05:29 64b84f88d5f345c5b84f88d5f335c5c8 nodejs:10 cold  31ms       success style95/env:0.0.7
   2020-10-28 13:05:29 79950b09eb5f4581950b09eb5fb58158 unknown   warm  0s         success style95/zxcvasdfasdfasdf:0.0.2
   ```
   
   So I imagined explicitly adding such information in annotations.
   Then we can query Elasticsearch using the field.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] parichehrvn commented on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
parichehrvn commented on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-717515325


   > What’s the use case for knowing this?
   > I thinks it’s for research purposes. Is it useful otherwise?
   
   I just need this metric for my work and to get the exact activation logs


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk] style95 edited a comment on issue #5007: know if the Openwhisk action is executed on a prewarm container by receiving the log from API

Posted by GitBox <gi...@apache.org>.
style95 edited a comment on issue #5007:
URL: https://github.com/apache/openwhisk/issues/5007#issuecomment-716978173


   I feel this implies the need for more fine-grained starting types such as `prewarm`, `cold`, `recreated`, and `warm` in activation results?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org