# Size of swap partition for 4GB ram

I got a notebook with 4GB RAM and i want to create a swap partition with the exact same size, using gparted.

`gparted` has GiB and MiB as units.

is the correct amount 4 GiB or 4.295 GiB?

• , or . at the 4,295GiB? Nov 25, 2015 at 14:24
• 4,295GiB. that is ~4GB. because 1GB = 1,07374GiB Nov 25, 2015 at 14:26
• 4,295GiB ~ 4TB, sir. Nov 25, 2015 at 14:55
• TheAntiGuruMax: What @xiaodongjie wants to say is that the `,` in numbers is used to separate groups of 3 digits (thousand): 1 million = 1,000,000 - We use a decimal point `.` instead: One and a half = 1.5 Nov 25, 2015 at 15:55

The `i` in `GiB` means it's talking about Gibibytes, 2³⁰. When not synonymous, a GB is 10⁹ bytes.

A literal GB is 7.3741824e7 bytes (~70MiB) smaller than a literal GiB…

So if you want to match your RAM, you want 4 Gibibytes.

When talking about computing, most people use GB when they actually mean GiB. This is something we could try to correct but it's endemic now. This causes issues when comparing:

• RAM is made in binary-power quantities. You actually have 4 GiB of RAM.
• Storage vendors don't though, because it means they can sell a bigger number.
It's a marketing trick.