You are not logged in.

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

Utini
Member
Registered: 2015-09-28
Posts: 452
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.


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

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

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

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: 17,195

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: 452
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?


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

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

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

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: 452
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.


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

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

loqs
Member
Registered: 2014-03-06
Posts: 17,195

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