Kubernetes
Resource Quantity Converter
Convert Kubernetes CPU and memory quantities, and see exactly how far Mi differs from M.
Memory quantity
Binary (IEC) suffix536,870,912 bytes≈ 512Mi
Binary (Ki, Mi, Gi …)
- bytes
- 536,870,912
- Ki
- 524,288
- Mi
- 512
- Gi
- 0.5
- Ti
- 4.88e-4
- Pi
- 4.77e-7
- Ei
- 4.66e-10
Decimal (k, M, G …)
- bytes
- 536,870,912
- k
- 536870.912
- M
- 536.871
- G
- 0.537
- T
- 0.001
- P
- 5.37e-7
- E
- 5.37e-10
CPU quantity
0.25 cores250m
Kubernetes measures CPU in cores, so 1 is one core and 100m is a tenth of one. Note that m means milli while M means mega — the two differ by nine orders of magnitude.
Total for the workload
- Total memory
- 1.5Gi
- Total CPU
- 0.75 cores
Why Mi is not M
| Decimal | Bytes | Binary | Bytes | Difference |
|---|---|---|---|---|
| 1k | 1,000 | 1Ki | 1,024 | +2.40% |
| 1M | 1,000,000 | 1Mi | 1,048,576 | +4.86% |
| 1G | 1,000,000,000 | 1Gi | 1,073,741,824 | +7.37% |
| 1T | 1,000,000,000,000 | 1Ti | 1,099,511,627,776 | +9.95% |
| 1P | 1,000,000,000,000,000 | 1Pi | 1,125,899,906,842,624 | +12.59% |
| 1E | 1,000,000,000,000,000,000 | 1Ei | 1,152,921,504,606,847,000 | +15.29% |
Writing 512M where 512Mi was meant gives the container about 25 MB less than intended — often enough to turn a working pod into an OOMKill loop.