LinuxQuestions.org
Help answer threads with 0 replies.
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 04-26-2021, 08:15 PM   #16
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,635

Rep: Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202Reputation: 2202

Quote:
Originally Posted by pan64 View Post
there are two related links. The first is the well known www.linuxatemyram.com and the second is about "why do we need swap". Unfortunately I can't find it right now. But it explain why is it still useful. Probably someone can post that link...
Perhaps this? I came across it recently and found it very useful.
 
Old 04-27-2021, 12:19 AM   #17
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,510

Rep: Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552Reputation: 5552
yes, exactly. thanks
 
Old 04-27-2021, 06:27 PM   #18
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,154
Blog Entries: 4

Rep: Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232
"Swap space" becomes necessary anytime the demand for virtual memory exceeds the availability of physical RAM. Which is, of course, "all the time."

However, these days, there's no longer any credible reason to create a disk partition for this purpose. Simply allow the operating system to use a file, and thus to "grow or shrink it" however it likes. The "bad old days" that necessitated the use of "partitions" are gone, and will never return. (see below)

Last edited by sundialsvcs; 04-27-2021 at 07:52 PM.
 
Old 04-27-2021, 06:54 PM   #19
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,715

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
Quote:
Originally Posted by sundialsvcs View Post
However, these days, there's no longer any credible reason to create a disk partition for this purpose. Simply allow the operating system to use a file, and thus to "grow or shrink it" however it likes.
Nope. Swap extents need to be a fixed, contiguous region that then needs to be formatted by mkswap.
Swap partitions certainly still have a use.
 
Old 04-27-2021, 07:39 PM   #20
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,505

Rep: Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113
I typically have swap partitions but as an example I believe that Ubuntu by default uses files now days. There is no performance loss since swap was revamped back in the 2.6 kernel days and total swap space can be a combination of both partitions and files.
 
Old 04-27-2021, 07:52 PM   #21
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,154
Blog Entries: 4

Rep: Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232
I readily and without objection yield to all "differences of opinion." I'm wrong.

Linux is of course deployed in a wide variety of technical situations, and I have therefore readily struck my previous "closing comment." Which I acknowledge to have been "too specific to a particular user-case, and therefore 'in error.'" 'Nuff said.

In "a typical user-Linux situation," a swap-file works just fine and of course is most convenient. However, in other extant situations, a partition would be most appropriate.

Last edited by sundialsvcs; 04-28-2021 at 08:54 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Questions on Swap Partition, How did Anyone Pass This Along? Next Ubuntu No Swap Partition happydog500 Linux - Software 18 12-25-2016 12:37 PM
Would a Linux swap partition work as a FreeBSD swap partition? Froggy192 *BSD 11 07-27-2013 02:06 PM
swap file vs. swap partition verndog Ubuntu 16 07-09-2012 08:49 PM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM

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

All times are GMT -5. The time now is 12:25 AM.

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