{"id":726,"date":"2026-06-17T22:58:40","date_gmt":"2026-06-18T02:58:40","guid":{"rendered":"https:\/\/www.xconvert.com\/blog\/?p=726"},"modified":"2026-06-17T22:58:40","modified_gmt":"2026-06-18T02:58:40","slug":"mib-vs-mb-vs-gb-binary-vs-decimal-storage","status":"publish","type":"post","link":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage","title":{"rendered":"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A Kubernetes manifest with <code>memory: 256M<\/code> and one with <code>memory: 256Mi<\/code> describe pods that get <strong>5% different memory allocations<\/strong>. A JVM started with <code>-Xmx2g<\/code> actually gets <strong>2 GiB<\/strong> (2.147 \u00d7 10\u2079 bytes), not 2 GB. <code>docker images<\/code> prints sizes in MB; <code>docker-compose images<\/code> prints them in MiB. Engineering tools mix decimal and binary prefixes inconsistently \u2014 usually invisibly \u2014 until a pod gets OOMKilled because someone wrote <code>M<\/code> when they meant <code>Mi<\/code>. This guide covers the conventions used by the major developer tools, the traps that catch teams in production, and the unit each tool actually uses under the suffix.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Quick answer:<\/strong> <strong>1 MiB = 1,048,576 bytes (2\u00b2\u2070); 1 MB = 1,000,000 bytes (10\u2076)<\/strong> \u2014 a 4.86% difference. <strong>Kubernetes:<\/strong> <code>M<\/code> = MB (decimal), <code>Mi<\/code> = MiB (binary). <strong>JVM:<\/strong> <code>m<\/code> \/ <code>M<\/code> \/ <code>g<\/code> \/ <code>G<\/code> = MiB \/ GiB (binary, despite the letter). <strong>Docker:<\/strong> decimal in <code>docker images<\/code>, binary in <code>docker-compose images<\/code>. <strong>cgroups:<\/strong> raw bytes. <strong>Always specify with the <code>i<\/code> (Mi, Gi) for explicit binary<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Jump to a section<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"#gap\">The 4.86% gap and why it bites in production<\/a><\/li><li><a href=\"#kubernetes\">Kubernetes: M vs Mi, and the OOMKilled trap<\/a><\/li><li><a href=\"#jvm\">JVM heap flags: -Xmx uses binary despite K\/M\/G suffixes<\/a><\/li><li><a href=\"#docker\">Docker: inconsistent reporting across CLI tools<\/a><\/li><li><a href=\"#cgroups\">cgroups: raw bytes in memory.max<\/a><\/li><li><a href=\"#prometheus\">Prometheus metric naming conventions<\/a><\/li><li><a href=\"#reference\">Quick reference for the common developer tools<\/a><\/li><li><a href=\"#tool\">Use the xconvert MiB &#x2194; MB converter<\/a><\/li><li><a href=\"#faq\">FAQ<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"gap\">The 4.86% gap and why it bites in production<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Two definitions:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The gap grows with each scale-up:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>KiB vs KB:<\/strong> 2.4% difference<\/li><li><strong>MiB vs MB:<\/strong> 4.9% difference<\/li><li><strong>GiB vs GB:<\/strong> 7.4% difference<\/li><li><strong>TiB vs TB:<\/strong> 10% difference<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The IEC ratified the binary prefixes (kibi\/mebi\/gibi\/tebi) in <a href=\"https:\/\/www.iso.org\/standard\/64974.html\">ISO\/IEC 80000-13<\/a> specifically to end the ambiguity. Adoption in developer tooling is uneven \u2014 some tools follow the spec rigorously (Kubernetes, Prometheus), some quietly use binary while displaying decimal-looking suffixes (JVM, Linux <code>df -h<\/code>), and some are internally inconsistent (Docker).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The 4.9% MB-vs-MiB gap rarely matters for a 1-byte difference, but for a tightly-tuned container or JVM with limits set near actual usage, <strong>the gap is enough to either crash the workload or leave free memory unused on the host<\/strong>. For a deeper general treatment of binary vs decimal storage prefixes (including the hard-drive 1 TB \u2192 931 GB puzzle), see <a href=\"https:\/\/www.xconvert.com\/blog\/bytes-gb-mb-storage-units-when-each-matters\/\">Bytes to GB: Binary vs Decimal Storage Units Explained<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"840\" src=\"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png\" alt=\"The xconvert Mebibytes to Gigabytes converter showing the conversion between binary and decimal storage units\" class=\"wp-image-725\" srcset=\"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png 1600w, https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66-300x158.png 300w, https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66-1024x538.png 1024w, https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66-768x403.png 768w, https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66-1536x806.png 1536w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"kubernetes\">Kubernetes: M vs Mi, and the OOMKilled trap<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/configuration\/manage-resources-containers\/\">Kubernetes resource-management docs<\/a> define two distinct memory suffix conventions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Suffix<\/th><th>Meaning<\/th><th>Bytes per 1 unit<\/th><\/tr><\/thead><tbody><tr><td><code>k<\/code><\/td><td>kilobyte (decimal)<\/td><td>1,000<\/td><\/tr><tr><td><code>M<\/code><\/td><td>megabyte (decimal)<\/td><td>1,000,000<\/td><\/tr><tr><td><code>G<\/code><\/td><td>gigabyte (decimal)<\/td><td>1,000,000,000<\/td><\/tr><tr><td><code>Ki<\/code><\/td><td>kibibyte (binary)<\/td><td>1,024<\/td><\/tr><tr><td><code>Mi<\/code><\/td><td>mebibyte (binary)<\/td><td>1,048,576<\/td><\/tr><tr><td><code>Gi<\/code><\/td><td>gibibyte (binary)<\/td><td>1,073,741,824<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The trap:<\/strong> if you\u2019re sizing a JVM service to \u201c256 MB heap,\u201d writing <code>memory: 256M<\/code> gives the container <strong>244 MiB<\/strong> of memory \u2014 less than the 256 MiB heap the JVM allocates with <code>-Xmx256m<\/code> (see next section). The pod starts, the JVM tries to allocate its heap, and gets <strong>OOMKilled<\/strong> because the container limit is below the JVM\u2019s requested heap.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommended practice for memory limits in K8s:<\/strong> always use the <code>Mi<\/code> \/ <code>Gi<\/code> (binary) suffix. RAM is fundamentally binary; the SI decimal suffixes (<code>M<\/code>\/<code>G<\/code>) are technically valid but invite the mismatch error above. K8s docs say either is allowed but explicitly recommend binary for memory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CPU limits don\u2019t have this problem (they\u2019re a different unit \u2014 fractional CPU cores <code>0.5<\/code>, <code>100m<\/code> = 0.1 CPU, etc.), but memory is where the M-vs-Mi distinction is load-bearing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jvm\">JVM heap flags: -Xmx uses binary despite K\/M\/G suffixes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is the trap that catches Java developers most often. From the <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/17\/gctuning\/ergonomics.html\">Oracle HotSpot ergonomics docs<\/a>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The single-letter suffixes (<code>k<\/code>, <code>m<\/code>, <code>g<\/code>, <code>K<\/code>, <code>M<\/code>, <code>G<\/code>) all use <strong>binary<\/strong> multipliers in the JVM, even though those letters are the SI decimal symbols everywhere else. The JVM has had this convention since at least JDK 1.4 and shows no sign of changing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why this is a trap:<\/strong> a developer reading <code>-Xmx256m<\/code> who\u2019s been reading Kubernetes docs assumes that\u2019s 256 MB (decimal). It\u2019s actually 256 MiB \u2014 about 5% more memory than they thought. Set a Kubernetes container limit of <code>memory: 256M<\/code> for a JVM with <code>-Xmx256m<\/code>, and the container gets killed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommended fixes:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Modern JVMs (JDK 11+ container-aware mode) read the cgroup memory limit at startup and right-size their heap relative to that \u2014 set the container limit, leave <code>-Xmx<\/code> unset, and the JVM picks a sensible default (usually 25% of cgroup limit for the heap). For tightly-tuned services, still set <code>-Xmx<\/code> explicitly and leave <strong>at least 25\u201350% headroom<\/strong> between heap and container limit for non-heap memory (thread stacks, metaspace, direct buffers, native libraries).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"docker\">Docker: inconsistent reporting across CLI tools<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Docker is the messiest case \u2014 different CLI tools in the same ecosystem use different conventions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Tool<\/th><th>Convention<\/th><th>Example output<\/th><\/tr><\/thead><tbody><tr><td><code>docker images<\/code><\/td><td>Decimal (MB, GB)<\/td><td><code>nginx 142MB<\/code><\/td><\/tr><tr><td><code>docker-compose images<\/code><\/td><td>Binary (MiB, GiB)<\/td><td><code>nginx 135MiB<\/code><\/td><\/tr><tr><td><code>docker stats<\/code><\/td><td>Binary (MiB, GiB)<\/td><td><code>MEM USAGE 245.7MiB \/ 1.952GiB<\/code><\/td><\/tr><tr><td><code>docker inspect<\/code><\/td><td>Raw bytes (no formatting)<\/td><td><code>&quot;Size&quot;: 148723456<\/code><\/td><\/tr><tr><td>Docker Hub web UI<\/td><td>Decimal (MB)<\/td><td>\u201cCompressed Size: 54.3 MB\u201d<\/td><\/tr><tr><td>Container Registry API<\/td><td>Raw bytes<\/td><td><code>{&quot;size&quot;: 148723456}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So the <strong>same image<\/strong> can read as 142 MB in <code>docker images<\/code>, 135 MiB in <code>docker-compose images<\/code>, and 148,723,456 bytes in <code>docker inspect<\/code>. All three are technically the same number \u2014 <code>142,000,000 \u00f7 1,048,576 \u2248 135.5<\/code> and <code>148,723,456 \u00f7 1,048,576 \u2248 141.8<\/code> (the small extra difference is rounding).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For image size budgets<\/strong> (Docker Hub auto-pull caps, deployment manifests with size thresholds), the convention depends on the system enforcing the cap. <strong>Docker Hub\u2019s \u201cfree tier 100 GB egress\u201d is decimal GB.<\/strong> <strong>A <code>kubectl describe pod<\/code> image-pulled error reporting a 1 GiB limit is binary GiB.<\/strong> Read which tool reported the number before doing the math.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Docker community has tracked this inconsistency for years (see <a href=\"https:\/\/github.com\/docker\/cli\/issues\/3091\">GitHub docker\/cli issue #3091<\/a>) \u2014 it\u2019s not going away. The pragmatic workaround is to standardise on bytes for any automation and let the display layer decide which suffix to show.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cgroups\">cgroups: raw bytes in memory.max<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Below Kubernetes, the Linux kernel\u2019s cgroup v2 controller stores memory limits as <strong>raw bytes<\/strong> in <code>\/sys\/fs\/cgroup\/...\/memory.max<\/code>. No suffix, no conversion:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s 536,870,912 bytes = exactly 512 MiB = 512 \u00d7 2\u00b2\u2070. When Kubernetes sets a <code>memory: 512Mi<\/code> limit, it writes this exact byte count to the cgroup. When you set <code>memory: 512M<\/code> instead, Kubernetes writes 512,000,000 \u2014 about 488 MiB of actual memory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Implication for observability:<\/strong> any tool reading cgroup memory limits directly (Prometheus <code>cadvisor<\/code>, <code>kubectl top<\/code>, <code>docker stats<\/code>) operates on raw bytes and then converts for display. The conversion choice (MiB vs MB) is purely cosmetic; the underlying value is the byte count. When debugging \u201cthe pod has more \/ less memory than I configured,\u201d diff against the byte value, not against the suffix.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prometheus\">Prometheus metric naming conventions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/prometheus.io\/docs\/practices\/naming\/\">Prometheus naming conventions<\/a> recommend <strong>base SI units<\/strong> for metric values \u2014 and for memory, that means <strong>bytes, no prefix<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Prometheus rationale: display tooling (Grafana, Mimir, AlertManager) handles unit conversion at presentation time; storing in base units avoids ambiguity. A Grafana dashboard then converts to MiB\/GiB for display using <code>humanize1024(value)<\/code> or <code>humanizeBytes(value)<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Don\u2019t write metrics like <code>node_memory_MemTotal_MiB<\/code><\/strong> \u2014 even though it\u2019s tempting for readability, the canonical Prometheus approach is <code>_bytes<\/code> with the conversion happening downstream. Tools that emit <code>_mb<\/code> or <code>_gb<\/code> metrics are non-canonical and will trip up automation that expects bytes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"reference\">Quick reference for the common developer tools<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Tool \/ context<\/th><th>Default unit<\/th><th>Notation example<\/th><\/tr><\/thead><tbody><tr><td>Kubernetes memory limit<\/td><td>Binary (Mi, Gi) recommended<\/td><td><code>256Mi<\/code>, <code>2Gi<\/code><\/td><\/tr><tr><td>Kubernetes memory limit (decimal)<\/td><td>Allowed but error-prone<\/td><td><code>256M<\/code>, <code>2G<\/code> (= 244 MiB, 1.86 GiB)<\/td><\/tr><tr><td>JVM <code>-Xmx<\/code>, <code>-Xms<\/code>, <code>-Xss<\/code><\/td><td>Binary (despite single-letter suffix)<\/td><td><code>-Xmx2g<\/code> = 2 GiB<\/td><\/tr><tr><td><code>docker images<\/code><\/td><td>Decimal<\/td><td><code>142MB<\/code><\/td><\/tr><tr><td><code>docker-compose images<\/code><\/td><td>Binary<\/td><td><code>135MiB<\/code><\/td><\/tr><tr><td><code>docker stats<\/code><\/td><td>Binary<\/td><td><code>245MiB \/ 1.95GiB<\/code><\/td><\/tr><tr><td><code>kubectl top pods<\/code><\/td><td>Binary<\/td><td><code>245Mi<\/code><\/td><\/tr><tr><td>cgroup <code>memory.max<\/code><\/td><td>Raw bytes<\/td><td><code>536870912<\/code><\/td><\/tr><tr><td>Prometheus <code>*_bytes<\/code> metrics<\/td><td>Raw bytes<\/td><td><code>268435456<\/code><\/td><\/tr><tr><td>Linux <code>free -m<\/code><\/td><td>Binary (MiB labelled as Mi or M)<\/td><td><code>Mem: 15920<\/code><\/td><\/tr><tr><td>Linux <code>df -h<\/code><\/td><td>Binary (labelled with no <code>i<\/code>)<\/td><td><code>4.0G<\/code>, <code>2.0M<\/code><\/td><\/tr><tr><td>AWS EBS volume sizes<\/td><td>Binary (GiB billed as \u201cGB\u201d)<\/td><td>\u201c10 GB volume\u201d = 10 GiB<\/td><\/tr><tr><td>Cloud cost-per-GB<\/td><td>Mixed \u2014 check provider docs<\/td><td>AWS: GiB; some GCP: GB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Bookmark this if you work across multiple stacks \u2014 the conventions differ even within the same vendor (Docker tools).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tool\">Use the xconvert MiB &#x2194; MB converter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For precise conversions \u2014 debugging a container size mismatch, sizing a JVM heap relative to a K8s limit, converting Prometheus byte metrics to human-readable values \u2014 use:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><a href=\"https:\/\/www.xconvert.com\/unit-converter\/mebibytes-to-megabytes\">Mebibytes to Megabytes (MiB \u2192 MB)<\/a><\/strong> \u2014 for converting K8s <code>Mi<\/code> to decimal <code>M<\/code>.<\/li><li><strong><a href=\"https:\/\/www.xconvert.com\/unit-converter\/mebibytes-to-gigabytes\">Mebibytes to Gigabytes (MiB \u2192 GB)<\/a><\/strong> \u2014 for scaling up memory limits across tiers.<\/li><li><strong><a href=\"https:\/\/www.xconvert.com\/unit-converter\/bytes-to-mebibytes\">Bytes to Mebibytes<\/a><\/strong> \u2014 for converting raw cgroup or Prometheus byte values.<\/li><li><strong><a href=\"https:\/\/www.xconvert.com\/unit-converter\/megabytes-to-mebibytes\">Megabytes to Mebibytes (MB \u2192 MiB)<\/a><\/strong> \u2014 for translating decimal marketing numbers to actual binary memory.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For the general-purpose treatment of binary vs decimal across all storage scales (KB \/ MB \/ GB \/ TB and the \u201cwhy does my hard drive show less\u201d puzzle), see the companion article: <a href=\"https:\/\/www.xconvert.com\/blog\/bytes-gb-mb-storage-units-when-each-matters\/\">Bytes to GB: Binary vs Decimal Storage Units Explained<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Related explainer articles on the xconvert blog:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.xconvert.com\/blog\/ms-to-seconds-when-precision-matters\/\">ms to Seconds: Web Vitals, Frame Rates, Latency<\/a> \u2014 same kind of \u201cwhere each unit applies in developer tooling\u201d treatment for time.<\/li><li><a href=\"https:\/\/www.xconvert.com\/blog\/mwh-vs-kwh-vs-gwh-energy-units-utility-billing\/\">kWh, MWh, GWh: Your Bill, Your EV, and the Power Grid<\/a> \u2014 SI prefix ladder for energy.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-k8s-mi-vs-m\">Should I use Mi or M for Kubernetes memory limits?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use Mi (binary).<\/strong> It matches what your kernel, container runtime, and JVM actually allocate. The K8s docs note both work, but using <code>M<\/code> (decimal) introduces a 4\u20137% gap that can cause OOMKilled events when the workload\u2019s actual memory allocation lands between the configured <code>M<\/code> and the equivalent <code>Mi<\/code>. Stick with <code>256Mi<\/code>, <code>2Gi<\/code>, <code>512Mi<\/code> for memory; reserve <code>m<\/code> (lowercase) for CPU millicore notation (<code>500m<\/code> = 0.5 CPU).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-jvm-suffixes\">Why does the JVM use single-letter suffixes that mean binary?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Historical. Java\u2019s <code>-Xmx<\/code> flag predates the IEC binary prefixes (1998). The JVM has used <code>k<\/code>\/<code>m<\/code>\/<code>g<\/code> to mean binary since Java 1.4 (2002), and changing it now would break thousands of production scripts. Modern JDK documentation specifies the binary meaning explicitly \u2014 but if you only read the flag and not the docs, you\u2019d assume decimal.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-256mi-mb\">What is 256Mi in plain decimal megabytes?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">256 MiB = 256 \u00d7 1,048,576 = <strong>268,435,456 bytes<\/strong> = <strong>268.43 MB<\/strong> (decimal). So <code>memory: 256Mi<\/code> in Kubernetes is equivalent to about <code>268M<\/code> (decimal). The 12 MB gap (about 5%) is the source of most \u201cI set the right limit, why did it OOMKill\u201d issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-aws-ebs\">Does AWS bill EBS in GB or GiB?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">AWS bills EBS in <strong>GiB but labels it \u201cGB\u201d<\/strong> on the pricing page. A 10 \u201cGB\u201d EBS volume holds 10 \u00d7 2\u00b3\u2070 = 10.74 \u00d7 10\u2079 bytes. The AWS billing docs are explicit on this point (<a href=\"https:\/\/aws.amazon.com\/ebs\/pricing\/\">Amazon EBS pricing page<\/a>); the \u201cGB\u201d label is a convention they keep for backward compatibility. Same convention applies to RDS storage, EFS, S3 \u2014 see <a href=\"https:\/\/aws.amazon.com\/s3\/faqs\/\">AWS S3 FAQs<\/a> for the formal statement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-docker-unit-check\">How do I check what unit Docker is using for a specific image?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>docker inspect &lt;image&gt; --format '{{.Size}}'<\/code> \u2014 returns raw bytes, unambiguous. Then convert with the <a href=\"https:\/\/www.xconvert.com\/unit-converter\/bytes-to-megabytes\">xconvert bytes to MB tool<\/a> (decimal) or <a href=\"https:\/\/www.xconvert.com\/unit-converter\/bytes-to-mebibytes\">bytes to mebibytes<\/a> (binary) depending on what convention you need to match.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-kubectl-top\">Is <code>kubectl top pods<\/code> showing MiB or MB?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Binary (MiB, GiB) \u2014 but the suffix is rendered as <code>Mi<\/code> \/ <code>Gi<\/code> without the redundant <code>B<\/code>. So <code>245Mi<\/code> means 245 MiB. The numeric value matches the cgroup <code>memory.usage_in_bytes<\/code> divided by 2\u00b2\u2070.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-cpu-100m\">What about CPU \u2014 is \u201c100m\u201d decimal or binary millicores?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Neither \u2014 CPU notation in Kubernetes is fractional cores. <code>100m<\/code> = 100 millicores = 0.1 CPU; <code>1000m<\/code> = 1 CPU. There\u2019s no binary\/decimal ambiguity for CPU because the unit is decimal-fractional by definition. Lowercase <code>m<\/code> (millicore) is different from uppercase <code>M<\/code> (megabyte) \u2014 confusing but well-defined.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sources<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Last verified 2026-05-25.<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/configuration\/manage-resources-containers\/\">Kubernetes \u2014 Resource management for Pods and Containers<\/a> \u2014 primary source for M \/ Mi \/ G \/ Gi conventions.<\/li><li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/17\/gctuning\/ergonomics.html\">Oracle \u2014 HotSpot Virtual Machine Garbage Collection Tuning Guide<\/a> \u2014 <code>-Xmx<\/code> \/ <code>-Xms<\/code> heap-flag specification.<\/li><li><a href=\"https:\/\/prometheus.io\/docs\/practices\/naming\/\">Prometheus \u2014 Metric and label naming<\/a> \u2014 naming convention for <code>_bytes<\/code> metrics.<\/li><li><a href=\"https:\/\/www.iso.org\/standard\/64974.html\">ISO\/IEC 80000-13 \u2014 Information science and technology<\/a> \u2014 formal standard for binary prefixes.<\/li><li><a href=\"https:\/\/physics.nist.gov\/cuu\/Units\/binary.html\">NIST \u2014 Definitions of the SI units: The binary prefixes<\/a> \u2014 accessible reference for kibi\/mebi\/gibi.<\/li><li><a href=\"https:\/\/aws.amazon.com\/s3\/faqs\/\">AWS \u2014 Amazon S3 FAQs<\/a> \u2014 explicit AWS GiB-billed-as-GB convention.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1 MiB = 1,048,576 bytes; 1 MB = 1,000,000. Why container memory limits, JVM heap sizing, and Prometheus metrics all use MiB \u2014 and the OOMKilled trap.<\/p>\n","protected":false},"author":3,"featured_media":725,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,14],"tags":[],"class_list":["post-726","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to-guides","category-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary<\/title>\n<meta name=\"description\" content=\"1 MiB = 1,048,576 bytes; 1 MB = 1,000,000. Why container memory limits, JVM heap sizing, and Prometheus metrics all use MiB \u2014 and the OOMKilled trap.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary\" \/>\n<meta property=\"og:description\" content=\"1 MiB = 1,048,576 bytes; 1 MB = 1,000,000. Why container memory limits, JVM heap sizing, and Prometheus metrics all use MiB \u2014 and the OOMKilled trap.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage\" \/>\n<meta property=\"og:site_name\" content=\"XConvert Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/xconvertcom\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-18T02:58:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"840\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"James\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@xconvert_com\" \/>\n<meta name=\"twitter:site\" content=\"@xconvert_com\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage\"},\"author\":{\"name\":\"James\",\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/#\\\/schema\\\/person\\\/3434db135e6a7f239ba8414244df9845\"},\"headline\":\"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary\",\"datePublished\":\"2026-06-18T02:58:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage\"},\"wordCount\":1733,\"image\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/featured-66.png\",\"articleSection\":[\"How To Guides\",\"Tools\"],\"inLanguage\":\"en-CA\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage\",\"url\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage\",\"name\":\"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/featured-66.png\",\"datePublished\":\"2026-06-18T02:58:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/#\\\/schema\\\/person\\\/3434db135e6a7f239ba8414244df9845\"},\"description\":\"1 MiB = 1,048,576 bytes; 1 MB = 1,000,000. Why container memory limits, JVM heap sizing, and Prometheus metrics all use MiB \u2014 and the OOMKilled trap.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#breadcrumb\"},\"inLanguage\":\"en-CA\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-CA\",\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage\",\"url\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/featured-66.png\",\"contentUrl\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/featured-66.png\",\"width\":1600,\"height\":840,\"caption\":\"The xconvert Mebibytes to Gigabytes converter showing the conversion between binary and decimal storage units\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.xconvert.com\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/\",\"name\":\"XConvert Blog\",\"description\":\"Blog for XConvert file converter\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-CA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/#\\\/schema\\\/person\\\/3434db135e6a7f239ba8414244df9845\",\"name\":\"James\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-CA\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/46be416a360dc6b95bffc4b116d86872c03f8d8e4c1047a3a08033742f03d04d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/46be416a360dc6b95bffc4b116d86872c03f8d8e4c1047a3a08033742f03d04d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/46be416a360dc6b95bffc4b116d86872c03f8d8e4c1047a3a08033742f03d04d?s=96&d=mm&r=g\",\"caption\":\"James\"},\"url\":\"https:\\\/\\\/www.xconvert.com\\\/blog\\\/author\\\/james\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary","description":"1 MiB = 1,048,576 bytes; 1 MB = 1,000,000. Why container memory limits, JVM heap sizing, and Prometheus metrics all use MiB \u2014 and the OOMKilled trap.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage","og_locale":"en_US","og_type":"article","og_title":"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary","og_description":"1 MiB = 1,048,576 bytes; 1 MB = 1,000,000. Why container memory limits, JVM heap sizing, and Prometheus metrics all use MiB \u2014 and the OOMKilled trap.","og_url":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage","og_site_name":"XConvert Blog","article_publisher":"https:\/\/www.facebook.com\/xconvertcom","article_published_time":"2026-06-18T02:58:40+00:00","og_image":[{"width":1600,"height":840,"url":"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png","type":"image\/png"}],"author":"James","twitter_card":"summary_large_image","twitter_creator":"@xconvert_com","twitter_site":"@xconvert_com","twitter_misc":{"Written by":"James","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#article","isPartOf":{"@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage"},"author":{"name":"James","@id":"https:\/\/www.xconvert.com\/blog\/#\/schema\/person\/3434db135e6a7f239ba8414244df9845"},"headline":"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary","datePublished":"2026-06-18T02:58:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage"},"wordCount":1733,"image":{"@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage"},"thumbnailUrl":"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png","articleSection":["How To Guides","Tools"],"inLanguage":"en-CA"},{"@type":"WebPage","@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage","url":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage","name":"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary","isPartOf":{"@id":"https:\/\/www.xconvert.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage"},"image":{"@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage"},"thumbnailUrl":"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png","datePublished":"2026-06-18T02:58:40+00:00","author":{"@id":"https:\/\/www.xconvert.com\/blog\/#\/schema\/person\/3434db135e6a7f239ba8414244df9845"},"description":"1 MiB = 1,048,576 bytes; 1 MB = 1,000,000. Why container memory limits, JVM heap sizing, and Prometheus metrics all use MiB \u2014 and the OOMKilled trap.","breadcrumb":{"@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#breadcrumb"},"inLanguage":"en-CA","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage"]}]},{"@type":"ImageObject","inLanguage":"en-CA","@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#primaryimage","url":"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png","contentUrl":"https:\/\/www.xconvert.com\/blog\/wp-content\/uploads\/2026\/05\/featured-66.png","width":1600,"height":840,"caption":"The xconvert Mebibytes to Gigabytes converter showing the conversion between binary and decimal storage units"},{"@type":"BreadcrumbList","@id":"https:\/\/www.xconvert.com\/blog\/mib-vs-mb-vs-gb-binary-vs-decimal-storage#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xconvert.com\/blog"},{"@type":"ListItem","position":2,"name":"MiB vs MB: Why Kubernetes, Docker, and JVM Use Binary"}]},{"@type":"WebSite","@id":"https:\/\/www.xconvert.com\/blog\/#website","url":"https:\/\/www.xconvert.com\/blog\/","name":"XConvert Blog","description":"Blog for XConvert file converter","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xconvert.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-CA"},{"@type":"Person","@id":"https:\/\/www.xconvert.com\/blog\/#\/schema\/person\/3434db135e6a7f239ba8414244df9845","name":"James","image":{"@type":"ImageObject","inLanguage":"en-CA","@id":"https:\/\/secure.gravatar.com\/avatar\/46be416a360dc6b95bffc4b116d86872c03f8d8e4c1047a3a08033742f03d04d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/46be416a360dc6b95bffc4b116d86872c03f8d8e4c1047a3a08033742f03d04d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/46be416a360dc6b95bffc4b116d86872c03f8d8e4c1047a3a08033742f03d04d?s=96&d=mm&r=g","caption":"James"},"url":"https:\/\/www.xconvert.com\/blog\/author\/james"}]}},"_links":{"self":[{"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/posts\/726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/comments?post=726"}],"version-history":[{"count":1,"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/posts\/726\/revisions"}],"predecessor-version":[{"id":728,"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/posts\/726\/revisions\/728"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/media\/725"}],"wp:attachment":[{"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/media?parent=726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/categories?post=726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xconvert.com\/blog\/wp-json\/wp\/v2\/tags?post=726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}