Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize query, fix for no cadvisor relabels #907

Merged
merged 2 commits into from Aug 25, 2021

Conversation

AjayTripathy
Copy link
Contributor

@AjayTripathy AjayTripathy commented Aug 24, 2021

What does this PR change?

Neglected to migrate the container_network* queries to new cadvisor data. Also, filtering for "POD" clears a significant amount of data

Does this PR rely on any other PRs?

No

How does this PR impact users? (This is the kind of thing that goes in release notes!)

Minor query optimization, supports users not using the default cadvisor relabel rules better.

Links to Issues or ZD tickets this PR addresses or fixes

Perhaps ZD #608? Unclear.

How was this PR tested?

On a cluster without relabel rules:
Previous Version:

        "name": "cost-model",
        "properties": {
          "cluster": "cluster-one",
          "node": "gke-standard-cluster-1-spotpool-b4a02c44-bov0",
          "container": "cost-model",
          "controller": "cost-model",
          "controllerKind": "deployment",
          "namespace": "cost-model",
          "pod": "cost-model-69bddb5545-krz4b",
          "providerID": "gke-standard-cluster-1-spotpool-b4a02c44-bov0"
        },
        "window": {
          "start": "2021-08-24T00:00:00Z",
          "end": "2021-08-25T01:00:00Z"
        },
        "start": "2021-08-24T22:12:00Z",
        "end": "2021-08-25T00:16:00Z",
        "minutes": 124.000000,
        "cpuCores": 0.010000,
        "cpuCoreRequestAverage": 0.010000,
        "cpuCoreUsageAverage": 0.000159,
        "cpuCoreHours": 0.020667,
        "cpuCost": 0.000138,
        "cpuCostAdjustment": 0.000000,
        "cpuEfficiency": 0.015859,
        "gpuCount": 0.000000,
        "gpuHours": 0.000000,
        "gpuCost": 0.000000,
        "gpuCostAdjustment": 0.000000,
        "networkTransferBytes": 0.000000,
        "networkReceiveBytes": 0.000000,
        "networkCost": 0.000000,
        "networkCostAdjustment": 0.000000,
        "loadBalancerCost": 0.000000,
        "loadBalancerCostAdjustment": 0.000000,
        "pvBytes": 0.000000,
        "pvByteHours": 0.000000,
        "pvCost": 0.000000,
        "pvs": null,

Current Version

      "cost-model": {
        "name": "cost-model",
        "properties": {
          "cluster": "cluster-one",
          "node": "gke-standard-cluster-1-spotpool-b4a02c44-bov0",
          "container": "cost-model",
          "controller": "cost-model",
          "controllerKind": "deployment",
          "namespace": "cost-model",
          "pod": "cost-model-69bddb5545-krz4b",
          "services": [
            "cost-model"
          ],
          "providerID": "gke-standard-cluster-1-spotpool-b4a02c44-bov0",
          "labels": {
            "app": "cost-model",
            "pod_template_hash": "69bddb5545"
          }
        },
        "window": {
          "start": "2021-08-24T00:00:00Z",
          "end": "2021-08-25T00:00:00Z"
        },
        "start": "2021-08-24T22:12:00Z",
        "end": "2021-08-24T23:59:00Z",
        "minutes": 107.000000,
        "cpuCores": 0.010000,
        "cpuCoreRequestAverage": 0.010000,
        "cpuCoreUsageAverage": 0.000061,
        "cpuCoreHours": 0.017833,
        "cpuCost": 0.000119,
        "cpuCostAdjustment": 0.000000,
        "cpuEfficiency": 0.006081,
        "gpuCount": 0.000000,
        "gpuHours": 0.000000,
        "gpuCost": 0.000000,
        "gpuCostAdjustment": 0.000000,
        "networkTransferBytes": 180851.731869,
        "networkReceiveBytes": 9777082.354739,

Copy link
Collaborator

@mbolt35 mbolt35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AjayTripathy AjayTripathy changed the title optimize query, fix for no cadvisor relabels [DRAFT] optimize query, fix for no cadvisor relabels Aug 25, 2021
@AjayTripathy AjayTripathy merged commit d4bcb7f into develop Aug 25, 2021
@michaelmdresser michaelmdresser deleted the AjayTripathy-fix-network-data branch June 23, 2023 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants