You are not logged in.

#1 2018-12-07 19:42:08

Utini
Member
Registered: 2015-09-28
Posts: 227
Website

Swap size for 32GB RAM

Hello everyone,

my new laptop has 32GB RAM and a 1TB Samsung 970Pro NVME SSD.
I will most likely newer user up all the RAM (even with virtual machines) but I guess SWAP is still handy for kernel crashes or other stuff.
With that in mind I believe a SWAP size of 512MB would be sufficient.

How ever, I wonder if there are also other reasons to go for a bigger SWAP size and if yes, what size would be recommended for me?
I decreases swappiness to 10.


www.whymacsucks.com - Just the truth about why Mac sucks !

Setup: Thinkpad X1 Extreme, 15.6" FHD - i7-8850H 2.6-4.3Ghz - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME SSD
Accessories: Filco Majestouch Tenkeyless MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD600 + Audio-GD NFB-12.1

Offline

#2 2018-12-07 20:01:55

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 374

Re: Swap size for 32GB RAM

Suspend to disk uses swap - maybe you'll use it? Don't forget you can add and use swap files on the fly as well as having a swap partition.

Recommended reading...
https://wiki.archlinux.org/index.php/Swap
https://wiki.archlinux.org/index.php/Po … _hibernate

Cheers
Paul.

Offline

#3 2018-12-07 20:02:12

loqs
Member
Registered: 2014-03-06
Posts: 6,371

Re: Swap size for 32GB RAM

Could you explain the connection to kernel crashes?  Other reason you have not mentioned would be suspend to disk.

Offline

#4 2018-12-07 20:06:10

Utini
Member
Registered: 2015-09-28
Posts: 227
Website

Re: Swap size for 32GB RAM

loqs wrote:

Could you explain the connection to kernel crashes?  Other reason you have not mentioned would be suspend to disk.

paulkerry wrote:

Suspend to disk uses swap - maybe you'll use it? Don't forget you can add and use swap files on the fly as well as having a swap partition.

Recommended reading...
https://wiki.archlinux.org/index.php/Swap
https://wiki.archlinux.org/index.php/Po … _hibernate

Cheers
Paul.


I do only use suspend to RAM but not to disk.
I read that without a swap file a kernel panic or any other crashes might not get logged in a logfile?

If that is wrong, and since I do not use suspend to disk - I could simply disable SWAP?


www.whymacsucks.com - Just the truth about why Mac sucks !

Setup: Thinkpad X1 Extreme, 15.6" FHD - i7-8850H 2.6-4.3Ghz - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME SSD
Accessories: Filco Majestouch Tenkeyless MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD600 + Audio-GD NFB-12.1

Offline

#5 2018-12-07 20:18:36

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,996

Re: Swap size for 32GB RAM

You don't need to disable swap, just don't set it up in the first place - unless of course you've already installed.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2018-12-07 20:32:32

Utini
Member
Registered: 2015-09-28
Posts: 227
Website

Re: Swap size for 32GB RAM

Slithery wrote:

You don't need to disable swap, just don't set it up in the first place - unless of course you've already installed.

I just set it up as a file because I thought I would need it.
So if I understood you guys correctly I should simply deactivate and remove SWAP again.


www.whymacsucks.com - Just the truth about why Mac sucks !

Setup: Thinkpad X1 Extreme, 15.6" FHD - i7-8850H 2.6-4.3Ghz - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME SSD
Accessories: Filco Majestouch Tenkeyless MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD600 + Audio-GD NFB-12.1

Offline

#7 2018-12-07 20:38:14

loqs
Member
Registered: 2014-03-06
Posts: 6,371

Re: Swap size for 32GB RAM

Coredumps are managed without the use of swap by default they are logged in the journal.
Kernel oops are logged to dmesg which is by default logged to to the journal.
A kernel panic is fatal and the backtrace will be left on the console and execution halted assuming the linux package is used without configuration changes overriding the settings.
Yes deactivate the swap device and remove its fstab entry if it has one.

Last edited by loqs (2018-12-07 20:38:35)

Offline

Board footer

Powered by FluxBB