IBM Cloudability

Cloudability

A place for Cloudability product users to learn, connect, share and grow together.

 View Only
  • 1.  Unit Cost Metrics ($ per GB, $ per CPU) for kubernetes containers

    Posted Fri February 09, 2024 11:16 AM

    @Andrew Midgley - The Cloudability Insights/Containers UI and report export provide nice cost metrics for a cluster's total memory and CPU. Coming up with a unit cost (per GB or per CPU) could be as simple as "$$ / GB total / hours in report" - not entirely sure. The report export contains columns "memory/reserved_rss:allocation"  and  "memory/reserved_rss:fairShare" that appear to be a unit cost - but not sure, they don't line up with the previous formula described. 

    tl;dr: do you have a recommended method for determining cost per GB or cost per CPU for kubernetes clusters (ideally using the data available in the Cldy container reports)? 

    bonus - best source for detailed definitions of the columns in the Insight/Containers report export?


    #Cloudability


  • 2.  RE: Unit Cost Metrics ($ per GB, $ per CPU) for kubernetes containers

    Posted Mon February 12, 2024 06:43 AM
    Edited by Andrew Midgley Tue November 05, 2024 05:34 PM

    Hey @Jeff Hyatt, in good news the team has done a really good job in documenting all of those special container metrics here in the help center.

    The metrics "costs:memory/reserved_rss:allocation" and "costs:memory/reserved_rss:fairShare" are not unit costs, but in fact are the aggregate costs associated with memory. In this case the cost of memory that could be allocated to actual usage, and the cost of memory in total (including usage and idle). Similar exist for CPU etc.

    The amount of CPU and memory consumed is actually listed in the report too, looking like "cpu/reserved:resource:sum" - this isn't documented, but the average hourly amount is. In any case these easily gets you to a unit cost. Let me know how you go!




  • 3.  RE: Unit Cost Metrics ($ per GB, $ per CPU) for kubernetes containers

    Posted Mon February 12, 2024 02:31 PM

    thanks @Andrew Midgley - the reference for the csv columns is super helpful. 

    What is Cloudability's definition for the unit listed on the report: "microcpu"? another term for "CPU" or equivalent to K8s "millicore"?

    If you were looking for a cost per unit of memory from the report - would you divide cost by the memory "mean" value or the "sum"? 

    I'm still digging through the details - I'll update anything new here too. 




  • 4.  RE: Unit Cost Metrics ($ per GB, $ per CPU) for kubernetes containers

    Posted Mon February 12, 2024 02:59 PM
    Edited by Jeff Hyatt Tue November 05, 2024 05:47 PM

    It looks like "sum" is just the hourly average "mean" multiplied by number of hours in the report period. so either metric could be used as long as you use the cost for matching period. 




  • 5.  RE: Unit Cost Metrics ($ per GB, $ per CPU) for kubernetes containers

    Posted Mon February 12, 2024 03:00 PM

    and I'm going with this unless Cloudability relays something different: 




  • 6.  RE: Unit Cost Metrics ($ per GB, $ per CPU) for kubernetes containers

    Posted Tue February 13, 2024 05:16 AM

    You are definitely heading in the right direction @Jeff Hyatt. Here's how I would go about it for CPU:

    For the cost I would use "costs:cpu/reserved:fairShare" since that captures the entire cost for the period. 

    For CPU, the best way to think of what's been consumed is in terms of core-hours (a bit similar to the usage quantity AWS would have in the CUR file for EC2, which is instance-hours). The column for this is "cpu/reserved:resource:sum" and the unit for this is effectively micro-core-hours (1 millionth of a core-hour). So working through the maths it would be:

    "costs:cpu/reserved:fairShare" / "cpu/reserved:resource:sum" * 1,000,000. I did that on some of our data and the numbers came out as i'd expect. 

    One last point to note the difference between milli and micro,  with milli being divided by 1,000 and micro 1,000,000




  • 7.  RE: Unit Cost Metrics ($ per GB, $ per CPU) for kubernetes containers

    Posted Tue February 13, 2024 10:39 AM

    Nice @Andrew Midgley! thanks for the clarification between milli and micro.