Memory/Disk usage information -MB vs MiB


Ponraj E
 

Hi Colleagues,

I see CF using base 2 (1024 * 1024) for all the memory/disk quota/usage information, but base 10's unit at the end(MB). For ex, CF returns app instance memory as 1024 MB [using base 2 defintion (1024) and base 10's unit (MB)].

The problem arises when we have a client which does the conversion/formatting rightly and the values tend to differ from CF and the client. Though this confusion has been in varied existence still (for ex: Disk size of HDD), does CF have any plans of using one particular defintion throughout, like either 1024 MiB or 1000 MB?

P.S :
base 2 definition: 1 Kibibyte = 1024 Byte
base 10 defintion: 1 Kilobyte = 1000 Byte

------
Ponraj


Daniel Jones
 

+1 for proper units (KiB, MiB)

Regards,
Daniel Jones - CTO
+44 (0)79 8000 9153
@DanielJonesEB <https://twitter.com/DanielJonesEB>
*EngineerBetter* Ltd <http://www.engineerbetter.com> - UK Cloud Foundry
Specialists

On Thu, Nov 24, 2016 at 7:00 AM, Ponraj E <ponraj.e(a)gmail.com> wrote:

Hi Colleagues,

I see CF using base 2 (1024 * 1024) for all the memory/disk quota/usage
information, but base 10's unit at the end(MB). For ex, CF returns app
instance memory as 1024 MB [using base 2 defintion (1024) and base 10's
unit (MB)].

The problem arises when we have a client which does the
conversion/formatting rightly and the values tend to differ from CF and the
client. Though this confusion has been in varied existence still (for ex:
Disk size of HDD), does CF have any plans of using one particular defintion
throughout, like either 1024 MiB or 1000 MB?

P.S :
base 2 definition: 1 Kibibyte = 1024 Byte
base 10 defintion: 1 Kilobyte = 1000 Byte

------
Ponraj


Nicholas Calugar
 

Hi Ponraj and Daniel,

Could you point me at documentation or API endpoints you are looking at the
use MB?


Thanks,

Nick

--
Nicholas Calugar
Product Manager - Cloud Foundry API
Pivotal Software, Inc.

On November 28, 2016 at 2:42:07 PM, Daniel Jones (
daniel.jones(a)engineerbetter.com) wrote:

+1 for proper units (KiB, MiB)

Regards,
Daniel Jones - CTO
+44 (0)79 8000 9153
@DanielJonesEB <https://twitter.com/DanielJonesEB>
*EngineerBetter* Ltd <http://www.engineerbetter.com> - UK Cloud Foundry
Specialists

On Thu, Nov 24, 2016 at 7:00 AM, Ponraj E <ponraj.e(a)gmail.com> wrote:

Hi Colleagues,

I see CF using base 2 (1024 * 1024) for all the memory/disk quota/usage
information, but base 10's unit at the end(MB). For ex, CF returns app
instance memory as 1024 MB [using base 2 defintion (1024) and base 10's
unit (MB)].

The problem arises when we have a client which does the
conversion/formatting rightly and the values tend to differ from CF and the
client. Though this confusion has been in varied existence still (for ex:
Disk size of HDD), does CF have any plans of using one particular defintion
throughout, like either 1024 MiB or 1000 MB?

P.S :
base 2 definition: 1 Kibibyte = 1024 Byte
base 10 defintion: 1 Kilobyte = 1000 Byte

------
Ponraj


Ponraj E
 

Hi Nicholas,

There are so many API endpoints that returns response in MB. One such example is: http://apidocs.cloudfoundry.org/234/organizations/retrieving_organization_memory_usage.html

Do you need all of them?

--
Ponraj


Ponraj E
 

Hi Nicholas,

Anything that you expect from us? Are we missing something here?

---
Ponraj


Nicholas Calugar
 

Hi Ponraj,

Apologies for the delay, I promise you I have been considering this query,
just having trouble finding the correct response.

I think I actually do need more of an example of how this is failing you,
it’s not clear why presenting [1] Org Memory Usage in MB is inherently
wrong when [2] App Memory is also MB. For example:

cf curl "/v2/apps?q=space_guid:d2357fe4-a9f2-4c76-99d9-321b7668fde4" | grep
memory
"memory": 256,
"memory": 1000,

cf curl /v2/organizations/$(cf org system --guid)/memory_usage

{
"memory_usage_in_mb": 1256
}


Do you think you could provide a more end-to-end example of when this goes
wrong?

Thanks,

Nick


[1]
http://apidocs.cloudfoundry.org/234/organizations/retrieving_organization_memory_usage.html
[2] http://apidocs.cloudfoundry.org/234/apps/creating_an_app.html

--
Nicholas Calugar

On December 7, 2016 at 11:16:53 AM, Ponraj E (ponraj.e(a)gmail.com) wrote:

Hi Nicholas,

Anything that you expect from us? Are we missing something here?

---
Ponraj