4

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?

4
  • , 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
  • 1
    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
    – Byte Commander
    Nov 25, 2015 at 15:55

2 Answers 2

4

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.

And that's why Gparted is so explicit about this. They straddle the line between these two worlds.

5
  • i know, i looked up the SI definitions. when i use 4GiB it would be 3,725GB and thats less then my 4GB ram? or is ram also measured in GiB? Nov 25, 2015 at 14:27
  • 1
    You are converting the wrong way. A GiB contains more bytes than a GB.
    – Oli
    Nov 25, 2015 at 14:30
  • sigh... i did 4 / (2³⁰/10⁹) but i had to do 4*(2³⁰/10⁹).. thanks. so when i use 4GiB swap it is 4,295GB and slightly more than my RAM? Nov 25, 2015 at 14:33
  • No, your RAM is actually in GiB too. I've added an explanation.
    – Oli
    Nov 25, 2015 at 14:38
  • THANK your very much for your last edit, i only knew Harddrive manufacturers use this trick. Nov 25, 2015 at 14:41
0

Swap is a memory on your HDD where will your RAM data be stored when hibernating or things like that, since RAM has to be electrically maintained it will be erased when PC shuts down and then again data will be buffered from the swap partition to your RAM when booted up.. So basically, you just need the swap partition to be as big as your RAM.. (I always leave a few MB as an extra.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .