kube-scheduler-simulator icon indicating copy to clipboard operation
kube-scheduler-simulator copied to clipboard

make scheduler metrics visible

Open sanposhiho opened this issue 2 years ago • 15 comments

It would be nice if we could see the time used in scheduling for each plugin.

  • [ ] ~~Aggregate the time used for each plugin.~~
    • ~~It can be achieved in the same way as scheduling results. We can aggregate it in simulatorPlugin and send used time to resultStore.~~
    • EDIT: Not need to aggregate the time on simulator. We can use plugin_execution_duration_seconds to see each plugins time.
  • [ ] show them on WebUI in table or graph..? should be something nice.
  • [ ] update doc. (include https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/docs/how-it-works.md)

/assign /kind feature

sanposhiho avatar Dec 17 '21 07:12 sanposhiho

Hi @sanposhiho Is there any progress on this? Are you looking for a worker?

196Ikuchil avatar Mar 01 '22 14:03 196Ikuchil

I haven't worked on this. So, feel free to pick this issue. But, I think we should work on the following issue before this feature. https://github.com/kubernetes-sigs/kube-scheduler-simulator/issues/125

sanposhiho avatar Mar 01 '22 15:03 sanposhiho

Hi @196Ikuchil @sanposhiho , I am planning to work on this feature, additionally, my thoughts are to do something similar to Kube-Scheduler, where these performance metrics are emitted in prometheus metrics format. Something like this ? WDYT ?


EDIT: turns out it is already implemented here. Maybe we could implement a metrics endpoint for the simulator server ?

matthewygf avatar Mar 20 '22 17:03 matthewygf

EDIT: turns out it is already implemented here. Maybe we could implement a metrics endpoint for the simulator server ?

Oh, yes. You are right. I misunderstood about the metrics plugin_execution_duration_seconds 😓 Change this issue to make scheduler metrics visible.

/retitle make scheduler metrics visible

sanposhiho avatar Mar 22 '22 23:03 sanposhiho

One problem is pluginMetricsSamplePercent is const and we cannot change the value. Ideally, I would like to see metrics recorded for all pod schedules. (Because unlike real clusters, users do not always create many pods on the simulator)

I will make a feature request issue to k/k later. We will not know if the request will be approved until discussing it, but consider a work-around or another way if it is not approved then.

sanposhiho avatar Mar 23 '22 01:03 sanposhiho

https://github.com/kubernetes/kubernetes/issues/108903

sanposhiho avatar Mar 23 '22 01:03 sanposhiho

Regarding the metrics available, should we add a metric handler to the simulator server ? WDYT about having our own frontend charts to show these metrics like dashboard (probably need to investigate some of the frontend charts) or using prometheus to show them ?

matthewygf avatar Mar 29 '22 19:03 matthewygf

@matthewygf

Sorry, I missed your comment.

having our own frontend charts to show these metrics like dashboard (probably need to investigate some of the frontend charts) or using prometheus to show them ?

Yeah, hmm, I prefer the former. But, charts in frontend.. It could be a very tough road because at least I'm not very familiar with frontend... 😓 It would be so much easier if there were a public component or a public library to show charts from data in the form of grafana.

sanposhiho avatar May 06 '22 08:05 sanposhiho

@matthewygf

Sorry, I missed your comment.

having our own frontend charts to show these metrics like dashboard (probably need to investigate some of the frontend charts) or using prometheus to show them ?

Yeah, hmm, I prefer the former. But, charts in frontend.. It could be a very tough road because at least I'm not very familiar with frontend... 😓 It would be so much easier if there were a public component or a public library to show charts from data in the form of grafana.

No problem @sanposhiho , I will have a look at it ~

matthewygf avatar May 06 '22 14:05 matthewygf

One approach is to process the grafana data on the simulator api into a form that is easy to display on the front end, and then display it on the front end using some library or component.

It seems vuetify has the component to write a simple graph. (But, not sure whether the component is sufficiently expressive) https://vuetifyjs.com/en/components/sparklines/

sanposhiho avatar May 09 '22 16:05 sanposhiho

/triage accepted Not to mark as stale.

sanposhiho avatar Jun 07 '22 10:06 sanposhiho

/area simulator

sanposhiho avatar Sep 04 '22 03:09 sanposhiho

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Dec 03 '22 03:12 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jan 02 '23 04:01 k8s-triage-robot

/remove-lifecycle rotten /lifecycle frozen

sanposhiho avatar Jan 17 '23 00:01 sanposhiho