F5F Stay Refreshed Software Operating Systems SWAP partition is not always necessary on a modern Linux PC.

SWAP partition is not always necessary on a modern Linux PC.

SWAP partition is not always necessary on a modern Linux PC.

Pages (3): 1 2 3 Next
P
Peedy
Senior Member
641
11-08-2023, 04:46 AM
#1
You should evaluate whether a swap partition is necessary for your system. Given your 8G RAM and the limitations of using your HDD as virtual memory, it’s likely better to allocate dedicated swap space rather than relying on the hard drive. Consider how much free space you have available and aim for a reasonable size—typically around 1-2x your swap requirement. Since you mentioned not having enough storage, you might explore alternatives like using RAM expansion or checking if your OS supports faster swap files. If you opt for a partition, ensure it’s properly configured and monitor usage to avoid performance hits.
P
Peedy
11-08-2023, 04:46 AM #1

You should evaluate whether a swap partition is necessary for your system. Given your 8G RAM and the limitations of using your HDD as virtual memory, it’s likely better to allocate dedicated swap space rather than relying on the hard drive. Consider how much free space you have available and aim for a reasonable size—typically around 1-2x your swap requirement. Since you mentioned not having enough storage, you might explore alternatives like using RAM expansion or checking if your OS supports faster swap files. If you opt for a partition, ensure it’s properly configured and monitor usage to avoid performance hits.

D
DaNiggaSWAG
Senior Member
539
11-08-2023, 06:20 AM
#2
Linux swaps space occurs when RAM is completely filled. By default, it adjusts to match the available RAM. The swap partition must exist, though its size can be adjusted—try around 2 or 4 GB for a balance.
D
DaNiggaSWAG
11-08-2023, 06:20 AM #2

Linux swaps space occurs when RAM is completely filled. By default, it adjusts to match the available RAM. The swap partition must exist, though its size can be adjusted—try around 2 or 4 GB for a balance.

D
Danskr
Junior Member
29
11-08-2023, 11:44 AM
#3
Yes, you can use a swap file with a dynamic size by configuring it through tools like `swapon` or `swapoff`, which allow adjusting its size on the fly.
D
Danskr
11-08-2023, 11:44 AM #3

Yes, you can use a swap file with a dynamic size by configuring it through tools like `swapon` or `swapoff`, which allow adjusting its size on the fly.

C
coolerijk
Member
125
11-08-2023, 06:17 PM
#4
You can disable it anytime—just make sure you understand what you're doing. Ignoring the advice might lead to problems, not just minor issues. They suggest keeping at least 512 MB free in case things get unstable and consume your memory, which could cause a kernel panic. Be careful and read thoroughly before proceeding.
C
coolerijk
11-08-2023, 06:17 PM #4

You can disable it anytime—just make sure you understand what you're doing. Ignoring the advice might lead to problems, not just minor issues. They suggest keeping at least 512 MB free in case things get unstable and consume your memory, which could cause a kernel panic. Be careful and read thoroughly before proceeding.

L
LunarTicks
Member
148
11-09-2023, 01:41 AM
#5
It's been three years since I haven't used the SWAP partition. I've been running Ubuntu for two years now and have Arch Linux. Three years ago, I had only 6 GB of RAM on Arch, which has grown to 8 GB. I primarily use Firefox 15-30 tabs, PyCharm, and Steam (playing Doom, CS:GO, L4D 2, Portals). My system has never had any issues. I don't need a swap at all; my RAM usage stays under 173 MB during a fresh install, rarely reaching up to 5 GB.
L
LunarTicks
11-09-2023, 01:41 AM #5

It's been three years since I haven't used the SWAP partition. I've been running Ubuntu for two years now and have Arch Linux. Three years ago, I had only 6 GB of RAM on Arch, which has grown to 8 GB. I primarily use Firefox 15-30 tabs, PyCharm, and Steam (playing Doom, CS:GO, L4D 2, Portals). My system has never had any issues. I don't need a swap at all; my RAM usage stays under 173 MB during a fresh install, rarely reaching up to 5 GB.

D
davidcrapface
Junior Member
2
11-10-2023, 02:50 PM
#6
Fortunately, you didn’t run out of memory. At work I had to upgrade my RAM from 8GB to 16GB since my tasks reached 8GB and needed swapping. I also manage a network of Docker containers that replicate a small portion of AWS infrastructure, but always keep some swap available just in case.
D
davidcrapface
11-10-2023, 02:50 PM #6

Fortunately, you didn’t run out of memory. At work I had to upgrade my RAM from 8GB to 16GB since my tasks reached 8GB and needed swapping. I also manage a network of Docker containers that replicate a small portion of AWS infrastructure, but always keep some swap available just in case.

J
Jasvam
Junior Member
20
11-10-2023, 04:33 PM
#7
Linux can be adjusted to include or exclude it, and it can be deleted later if needed.
J
Jasvam
11-10-2023, 04:33 PM #7

Linux can be adjusted to include or exclude it, and it can be deleted later if needed.

X
211
11-10-2023, 05:04 PM
#8
For hibernartion
X
xXDamoDoggieXx
11-10-2023, 05:04 PM #8

For hibernartion

X
Xxunidemonxx
Member
214
11-10-2023, 06:05 PM
#9
Yes, you can generate a swap file directly without creating a full partition. This method provides flexibility and avoids the need for a separate partition setup.
X
Xxunidemonxx
11-10-2023, 06:05 PM #9

Yes, you can generate a swap file directly without creating a full partition. This method provides flexibility and avoids the need for a separate partition setup.

M
Megagamerist
Junior Member
17
11-10-2023, 06:40 PM
#10
Choose a swap file over a partition if you don’t want to create one—this file expands as needed, similar to a Windows page file. It doesn’t have to be huge; even 128MB works for some programs needing extra space.
M
Megagamerist
11-10-2023, 06:40 PM #10

Choose a swap file over a partition if you don’t want to create one—this file expands as needed, similar to a Windows page file. It doesn’t have to be huge; even 128MB works for some programs needing extra space.

Pages (3): 1 2 3 Next