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

Licence total_managed_memory computed using decimal GB but memory sizes typically use binary GiB #5465

Closed
DaveCTurner opened this issue Mar 11, 2022 · 8 comments · Fixed by #5527
Assignees
Labels
>bug Something isn't working

Comments

@DaveCTurner
Copy link

A user reported confusion to me about the total_managed_memory field of the license:

259GB as total_managed_memory but as elastic nodes we have 7 x 30gb data nodes + 16 gb master node + 16 gb kibana = 242GB. So I don't understand where is the difference?

The explanation seems to be the difference between multiples-of-1024 Gibibytes and multiples-of-1000 Gigabytes: 242×1024×1024×1024 ≅ 259×1000×1000×1000. Typically we use binary gibibytes to describe memory sizes (e.g. the JVM argument -Xmx16g gives you a 16 GiB node which is a little over 17.1 GB in decimal) so I think the confusion is justified. Could we fix this or at least avoid the ambiguity somehow?

@DaveCTurner DaveCTurner added the >bug Something isn't working label Mar 11, 2022
@pebrc
Copy link
Collaborator

pebrc commented Mar 18, 2022

We discussed this a bit out of band and agree that moving to GiB would probably be easier to understand and would avoid the confusion. One thing we want to clarify upfront is which unit the Enterprise Resource Units are based on just to make sure everything aligns here eventually and we don't introduce a new source of confusion.

@thbkrkr
Copy link
Contributor

thbkrkr commented Mar 18, 2022

In theory ERUs are calculated using GB (multiples of 10).

@pebrc
Copy link
Collaborator

pebrc commented Mar 21, 2022

ERUs are calculated using GB (multiples of 10).

That is unfortunate. But as all other user interfaces including in ECE and Elastic Cloud return GiB (often incorrectly labeled as GB) I think we should still do the same and return GiB despite this inconsistency.

@DaveCTurner
Copy link
Author

FWIW Elasticsearch APIs typically avoid this ambiguity by reporting both the raw number of bytes and a "human-readable" version of the same number. I find the redundancy often helpful, although you can switch it off with ?human=false if the parsimony is more important.

I'd also rather see this number in GiB, but I can see the arguments in both directions. Either way, if the raw value were also available then there would be much less confusion.

@lucianaparaschivei
Copy link

Basically I think for an end user is important to know how much license it is using vs how much he needs to buy. We have multiple elastic clusters running with x amount of Enterprise Resource Units. So this difference can be that large that we need to decide if we need an extra resource unit or not based on GiB vs GB which is an extra cost.

@thbkrkr thbkrkr self-assigned this Mar 28, 2022
@thbkrkr
Copy link
Contributor

thbkrkr commented Mar 28, 2022

We will report the total managed memory in GiB and raw bytes to avoid confusion.

Current:

{
  ...
  "total_managed_memory": "68.72GB"
}

Proposed change:

{
   ...
  "total_managed_memory_bytes": "68719476736",
  "total_managed_memory": "64.00GiB"
}

@lucianaparaschivei
Copy link

We will report the total managed memory in GiB and raw bytes to avoid confusion.

Current:

{
  ...
  "total_managed_memory": "68.72GB"
}

Proposed change:

{
   ...
  "total_managed_memory_bytes": "68719476736",
  "total_managed_memory": "64.00GiB"
}

In this case 1 ERU equals 64.00GiB equals 68.7GB ??

@thbkrkr
Copy link
Contributor

thbkrkr commented Mar 29, 2022

In this case 1 ERU equals 64.00GiB equals 68.7GB ??

Yes, ERUs are the total of bytes divided by 64.00GiB (in the above example: 68719476736 / (64*1024*1024*1024) = 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants