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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityThe 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:
And that's why Gparted is so explicit about this. They straddle the line between these two worlds.
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.)
,
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