LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-28-2022, 10:43 AM   #1
Krupski
Member
 
Registered: Jan 2015
Location: The worst state in USA (can you guess?)
Distribution: Debian 11 (x86_64)
Posts: 44

Rep: Reputation: 0
Swap and drive implementation question


Hi all. If this is the wrong forum, mods please move and my apologies.

Ok, my over 10 year old machine died and had to build a new one. This new one has 128GB of memory (yes, DRAM, not HDD). Started with 64GB, but the two empty UDIMM slots bugged me... had to fill them!

Anyway, my swap questions are: (please provide explanation for answers):
  • Do I even need swap since there's so much ram?
  • If yes, what size should it be? RAM*2?
  • Should I make any change to "vm.swappiness"?
  • My "hard drives" are two 2TB SATA3 SSD devices.
  • Planning to install a small, fast (~250 GB PCIE-4 NVME) drive solely for swap. Good idea, or no?

My thinking is that using a dedicated device for swap keeps R/W wear off the main drives.

BTW, if it matters, the OS is 64 bit Debian 11.3.

Any info will be appreciated. Thanks!
 
Old 05-28-2022, 10:53 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,927

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
ok, there are actually three pages you can read:
the first one: how memory handling works: www.linuxatemyram.com
the second is exactly the answer to your question: https://chrisdown.name/2018/01/02/in...e-of-swap.html
about the size: https://opensource.com/article/18/9/...-linux-systems
 
1 members found this post helpful.
Old 05-28-2022, 12:18 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Krupski View Post
  • [1]Do I even need swap since there's so much ram?
    [2]If yes, what size should it be? RAM*2?
    [3]Should I make any change to "vm.swappiness"?
    [4]My "hard drives" are two 2TB SATA3 SSD devices.
    [5]Planning to install a small, fast (~250 GB PCIE-4 NVME) drive solely for swap. Good idea, or no?

My thinking is that using a dedicated device for swap keeps R/W wear off the main drives.
1. You don't need any swap unless you plan to use hibernate.

2. If you use hibernate then you need a swap area the same size as your ram.

3. It depends on your configuration. From what you have shown here I think that vm.swappiness is irrelevant to you.

5. Your swap partition will be unused. Use your SSD for something that will be very active.
 
1 members found this post helpful.
Old 05-29-2022, 05:39 PM   #4
Krupski
Member
 
Registered: Jan 2015
Location: The worst state in USA (can you guess?)
Distribution: Debian 11 (x86_64)
Posts: 44

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
ok, there are actually three pages you can read:
the first one: how memory handling works: www.linuxatemyram.com
the second is exactly the answer to your question: https://chrisdown.name/2018/01/02/in...e-of-swap.html
about the size: https://opensource.com/article/18/9/...-linux-systems
Those links cleared up a lot of swap misconception. Thanks! Thread solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] what the difference swap space and swap file dundu Linux - Newbie 4 07-29-2012 12:03 PM
swap question: using 8e filesystem for swap dennysnight Red Hat 1 06-26-2009 03:17 PM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration