Ask Your Question
1

What does the "swap" partition do?

asked 2014-10-01 05:06:48 -0500

updated 2014-10-01 14:19:50 -0500

I installed Fedora 21 Alpha yesterday. When installing I created two swap partitions. I don't know what the swap partition is for, should I delete one of the two? How would I do that?

Here is fdisk:

[root@hostname folder]# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7257A6D6-CA27-4CAF-B02F-99CF816546CA

Device        Start       End   Sectors   Size Type
/dev/sda1      2048    411647    409600   200M EFI System
/dev/sda2    411648   1435647   1024000   500M Linux filesystem
/dev/sda3   1435648  13647871  12212224   5.8G Linux filesystem
/dev/sda4  13647872 976773119 963125248 459.3G Linux LVM

Disk /dev/mapper/fedora_Hostname-swap--32: 3.7 GiB, 4001366016 bytes, 7815168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_Hostname-root: 90 GiB, 96687095808 bytes, 188841984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/luks-ab599228-1e6c-4b96-bbad-199c61084c13: 5.8 GiB, 6250561536 bytes, 12208128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_localhost-swap: 5.8 GiB, 6241124352 bytes, 12189696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_Hostname-var: 7.5 GiB, 7998537728 bytes, 15622144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_Hostname-home: 358 GiB, 384424738816 bytes, 750829568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-10-01 14:34:46 -0500

lzap gravatar image

Swap partition helps your computer optimizing memory. It's good idea to have one.

http://en.wikipedia.org/wiki/Paging

Two wont hurt, Linux can use multiple swap partition. If you are not experienced in live disk partitioning, I'd recommend you to keep it as-is.

edit flag offensive delete link more

Comments

1

Additionally if you have swap at least as big as much memory you have, you can start using hibernate aka 'suspend to disk'. See for example here: https://wiki.archlinux.org/index.php/Suspend_and_hibernate

msuchy gravatar imagemsuchy ( 2014-10-01 16:18:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-01 05:06:48 -0500

Seen: 290 times

Last updated: Oct 01 '14