Page 1 of 1
How to Add swap space
Posted: Sun Nov 10, 2024 1:40 pm
by CharlesV
I see people all the time with no swap file or swap space, and many dont understand a) that even a little swap space is VERY good for your system, and b) how to create swap once your up and installed.
The reality of the first part is that some swap space is required for some applications to properly run. Even if you have gobs of ram, the reality that some applications need 'a little swap space' , or will just check for it before they start, or will even allocate a little swap space just in case.
Many times the creation of a small swap space will resolve "odd issues" that are hard to pin down, and creation of a swap file even can help test / resolve some issues.
So, how can you easily check and create swap ? ... This is the best guide I have found and covers checking, turning on and off and creation of both types of swap.
https://www.digitalocean.com/community/ ... -debian-11
Re: How to Add swap space
Posted: Sun Nov 10, 2024 5:07 pm
by artytux
@CharlesV Thanks for the link and article, I get these as pdf's incase I lose my own memory in future days passed.
Re: How to Add swap space
Posted: Sun Nov 10, 2024 5:21 pm
by CharlesV
Your very welcome! and yes, I have both links and PDF's of too :-)
Re: How to Add swap space
Posted: Sat Jul 19, 2025 9:45 am
by putih
ZRam and Zswap
zram (previously called compcache) can create RAM based compressed block devices. It is a module of the Linux kernel since 3.2.
If physical swap devices exist, they will also be used by the system, but with a lower priority than a Zram device.
Similar results as with Zram can be achieved with Zswap, though Zswap needs a physical swap device (or swap file).
Zswap
Zswap is a lightweight compressed cache for swap pages. It takes pages that are in the process of being swapped out and attempts to compress them into a dynamically allocated RAM-based memory pool. Older pages can be evicted to disk making this a sort of write-behind cache. zswap basically trades CPU cycles for potentially reduced swap I/O.
Alternative
Similar results as with Zswap can be achieved with Zram though eliminates the need for physical swap device.
https://wiki.debian.org/ZRam
Re: How to Add swap space
Posted: Sat Jul 19, 2025 10:07 am
by putih
How to Add ZRam and Zswap with antiX memory manager GUI
antiX memory manager is a Control centre script allowing for checking and managing the way the Linux kernel handles memory usage, in particular activating and deactivating memory compression by zram and zswap.
Page :
https://gitlab.com/Robin-antiX/antix-memory-manager
How to install :
Click bin > antiX-memory-manager > click download button
Add extension .sh example antiX-memory-manager.sh
Make shell script executable
Run from terminal
Support
For help, questions, suggestions and bug reporting please write to
antiXlinux forums.
Contributing
If you find a translation of user interface or user manual being inadequat or misleading wrong, please edit it simply on antix-development at transifex. On transifex you may edit the string translations used in user interface directly.
If you happen to have knowledge and want to help improving this tool, please bark up in antiX forum (see Support link above).
Authors and acknowledgment
This is an antiX community project. In particular many thanks to anticapitalX and anti-apXos !

Before

After
Re: How to Add swap space
Posted: Sat Jul 19, 2025 10:12 am
by Eadwine Rose
Please don't post screenshots of code output, they cannot be searched. You can post code on the forum like this:
[code]code output here[/code]
Thanks.
Re: How to Add swap space
Posted: Sat Jul 19, 2025 3:29 pm
by dings
Thank you for posting this, @CharlesV
Re: How to Add swap space
Posted: Sat Jul 19, 2025 3:36 pm
by CharlesV
dings wrote: Sat Jul 19, 2025 3:29 pm
Thank you for posting this, @CharlesV
Your very welcome.
Re: How to Add swap space
Posted: Sun Aug 10, 2025 12:00 pm
by AA BB
If MX is installed without specifying a swap partition , will it automatically use root partition file /swap ?
In which case we only have to ensure the root partition has enough free space (say 2x RAM size).
I always specify a root partition but for the most part it goes unused on systems with >4G RAM
Re: How to Add swap space
Posted: Sun Aug 10, 2025 12:22 pm
by j2mcgreg
AA BB wrote: Sun Aug 10, 2025 12:00 pm
If MX is installed without specifying a swap partition , will it automatically use root partition file /swap ?
In which case we only have to ensure the root partition has enough free space (say 2x RAM size).
I always specify a root partition but for the most part it goes unused on systems with >4G RAM
If you use the 'automatic install using entire disk' option, a swap file will be created by default. If you use any of the custom install options, it is up to you to create a swap partition. or. follow these instructions to create a swap file post install:
https://www.digitalocean.com/community/ ... -debian-11