Question about Swap Partition

When you run into problems installing MX Linux XFCE
Message
Author
User avatar
Stevo
Developer
Posts: 12837
Joined: Fri Dec 15, 2006 8:07 pm

Re: Question about Swap Partition

#11 Post by Stevo »

Mauser wrote: Tue Jan 15, 2019 3:17 pm
Eric wrote: Tue Jan 15, 2019 3:09 pm Thanks for the quick reply.

So, no, MX Linux will NOT make a swapfile if I have no Swap Partition.
And No I do not absolutely need a Swap Partition.

So, what are the drawbacks of not having a Swap Partition on a machine with 8 GB of ram?

I ask, as my boot drive is SSD, so constant swapping reduces lifespan of the drive.
You should be fine because I never seen MX Linux even reach 4GB of memory usage. The only drawback is if you use much more memory intensive programs than I do your computer will run into a roadblock from running out of memory. Not good. You can always add more RAM. I highly recommend no swap file with a SSD. The only question is what will happen to the swapness setting when there is no Swap file? Swapness should be set to 0.
You can easily eat up 16 GB if you compile certain packages using twelve threads...Probably opening very large image files for editing in Gimp, too.

User avatar
Mauser
Posts: 1361
Joined: Mon Jun 27, 2016 7:32 pm

Re: Question about Swap Partition

#12 Post by Mauser »

Stevo wrote: Tue Jan 15, 2019 7:21 pm
Mauser wrote: Tue Jan 15, 2019 3:17 pm
Eric wrote: Tue Jan 15, 2019 3:09 pm Thanks for the quick reply.

So, no, MX Linux will NOT make a swapfile if I have no Swap Partition.
And No I do not absolutely need a Swap Partition.

So, what are the drawbacks of not having a Swap Partition on a machine with 8 GB of ram?

I ask, as my boot drive is SSD, so constant swapping reduces lifespan of the drive.
You should be fine because I never seen MX Linux even reach 4GB of memory usage. The only drawback is if you use much more memory intensive programs than I do your computer will run into a roadblock from running out of memory. Not good. You can always add more RAM. I highly recommend no swap file with a SSD. The only question is what will happen to the swapness setting when there is no Swap file? Swapness should be set to 0.
You can easily eat up 16 GB if you compile certain packages using twelve threads...Probably opening very large image files for editing in Gimp, too.
Thanks. Makes sense but I didn't know that much memory could be used up but is good to know. What would happen if swapness is set to 1 like the OP and all the memory is used up then MX Linux is looking for a swap partition but it's not there?
I am command line illiterate. :confused: I copy & paste to the terminal. Liars, Wiseguys, Trolls, and those without manners will be added to my ignore list. :mad:

User avatar
Colargole
Posts: 4
Joined: Wed Jul 20, 2022 8:50 am

Re: Question about Swap Partition

#13 Post by Colargole »

Adrian wrote: Tue Jan 15, 2019 5:05 pm Some people had system freezes without Swap partition so it's a good idea to create one anyway.
Indeed, on Linux 19.2 I did not install any swap partition and I do have system freezes on a regular basis.
I'm migrating to 21.1 with a swap partition.
PC is a well-loved HP Pro 3130 with Core i5 and 8GB RAM.
Last edited by Colargole on Wed Jul 20, 2022 12:01 pm, edited 1 time in total.

User avatar
entropyfoe
Posts: 591
Joined: Thu Apr 19, 2007 11:42 am

Re: Question about Swap Partition

#14 Post by entropyfoe »

Drive space is cheap these days. SSD endurance has long gone away as a significant concern.

Even with 32 G of RAM, I make a 33G swap partition, though it is rarely used as I set VM swappiness to either 1 or 10.

No crashes, very stable system with uptimes 30-60 days easily.
I never want a lack of RAM to cause a crash or lock-up.

And 16G of RAM can get eaten up with Firefox ! My wife's MX 19.4 install runs low on RAM sometimes because she doesn't like to use noscript. So sometimes I see isolated web processes ( tabs) consuming 5-10% of the memory in top.
I usually kill those tabs and reload them after which their memory is more well behaved. I think it is scripts running advertising, but a gig or RAM for a web page ! insane!

I run no script and never see such high memory usage for a tab. [Now I do have a hundred tabs open sometimes.... :rolleyes: ]
Asus PRIME X470-PRO
AMD Ryzen 3600X (12 threads @ 3.8 GHz)
32 Gig DDR4 3600 (Crucial CL 16)
Nvidia GeForce GT 710
Samsung 970 NVMe nvme0n1 P1-3=MX-23, P4=testing
Samsung 980 NVMe =1TB Data, plus 2TB WD =backups
on-board ethernet & sound

User avatar
Eadwine Rose
Administrator
Posts: 11959
Joined: Wed Jul 12, 2006 2:10 am

Re: Question about Swap Partition

#15 Post by Eadwine Rose »

@Colargole Please pay attention to how old threads are. Don't dig old ones from the trenches. This one is three years ago. Thanks.



Locking this topic now.
MX-23.2_x64 July 31 2023 * 6.1.0-20-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

Locked

Return to “Installation”