How do I get 20.2 to use my new swap space?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- wutsinterweb
- Level 6
- Posts: 1042
- Joined: Tue Feb 28, 2017 2:14 am
- Location: Connecticut, USA
How do I get 20.2 to use my new swap space?
I added swap space, but 20.2 is still stuck at 2 GB.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
- Michael_Hathaway
- Level 4
- Posts: 313
- Joined: Sat Oct 09, 2021 2:27 am
- Location: Shebang, USA
- Contact:
- wutsinterweb
- Level 6
- Posts: 1042
- Joined: Tue Feb 28, 2017 2:14 am
- Location: Connecticut, USA
Re: How do I get 20.2 to use my new swap space?
thanks!
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
- wutsinterweb
- Level 6
- Posts: 1042
- Joined: Tue Feb 28, 2017 2:14 am
- Location: Connecticut, USA
Re: How do I get 20.2 to use my new swap space?
I'll atttempt after the holiday.
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
Re: How do I get 20.2 to use my new swap space?
What do you mean by "added swap space"? Do you mean that you added a drive you want to use for swap? Or that you created a new partition you wish to use as swap? If either of those, you don't need or want to create a swap file, all you need to do is edit your fstab file to point to that drive or partition that you wish to use as swap. Most of us here use a swap partition rather than a swap file.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
Re: How do I get 20.2 to use my new swap space?
That is the size of the default swap file which is created automatically when one installs Linux Mint 19 and 20. One can increase the size of that swap file, create an additional swap file, or create a swap partition to supplement the swap file(s).
If you created a swap partition to supplement that swap file, then you would need to make sure Mint knows the new swap partition exists by adding it to fstab.
A woman typing on a laptop with LM20.3 Cinnamon.
-
- Level 1
- Posts: 3
- Joined: Wed Dec 01, 2021 10:30 pm
Re: How do I get 20.2 to use my new swap space?
Did you get this fixed? I have the exact same problem... New to forum and Linux! Is it ok to post a note here if same problem and recent post? Mint 19.2 cinnamon desktop. 10 year old Dell laptop, dual core pentium with 4gb ram. I believe the fstab reference is my problem now but afraid to mess things up!! )
Re: How do I get 20.2 to use my new swap space?
Welcome to the forum, Hippie_gramps.Hippie_gramps wrote: ⤴Wed Dec 01, 2021 10:38 pm I believe the fstab reference is my problem now but afraid to mess things up!! )
Did you add swap to the swap file or a swap partition? Open a terminal and run
cat /etc/fstab
to show us your fstab results.A woman typing on a laptop with LM20.3 Cinnamon.
-
- Level 1
- Posts: 3
- Joined: Wed Dec 01, 2021 10:30 pm
Re: How do I get 20.2 to use my new swap space?
Sorry, couldn't get back to laptop yesterday. It was a was a swap file I am pretty sure, followed the directions here (viewtopic.php?f=90&t=284301&p=1929566&h ... e#p1929566), to delete and then recreate new file of 4.0 gb size... and all seemed to work fine, except now new allocated space not being used by OS.
contents of fstab:
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=2ef6cf6b-afff-4c75-8c57-be8ebf2800a7 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
Thank you in advance!
contents of fstab:
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=2ef6cf6b-afff-4c75-8c57-be8ebf2800a7 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
Thank you in advance!
Re: How do I get 20.2 to use my new swap space?
Your /etc/fstab says that those instructions you linked are fine and applicable, so the question becomes as to how you determined that now not all 4G is being used. Look at the output of the command
free
; it should say "Swap: 4194300" for a (precisely) 4G large swapfile /swapfile that has been "formatted" as per those instructions. If it does all's well; if it does not, said output of free
together with the output of ls -l /swapfile
would tell us whether or not you in fact followed those instructions (correctly).-
- Level 1
- Posts: 3
- Joined: Wed Dec 01, 2021 10:30 pm
Re: How do I get 20.2 to use my new swap space?
I apologize again for delayed response...not much computer time lately, honey do list too long..
results of free command
output of ls command for swapfile
-rw------- 1 root root 4294967296 Nov 30 10:15 /swapfile
I learned swapfile not utilized from resource monitor...hardly budged even though it reported accurately bump in size from 2-4 gb. I even stupidly froze the computer yesterday, testing it by maxing out memory by opening several image files with a video editor app. Had to hard reset but learned since then about commands I should have tried instead to just restart the OS. Even while studying this issue yesterday I imagined I may have had a pagefile before I started this procedure, still not clear to me the best path forward, without causing further damage. Thank you again for your help/suggestions!
results of free command
Code: Select all
total used free shared buff/cache available
Mem: 4001596 1209648 287364 349356 2504584 2160256
Swap: 4194300 18772 4175528
-rw------- 1 root root 4294967296 Nov 30 10:15 /swapfile
I learned swapfile not utilized from resource monitor...hardly budged even though it reported accurately bump in size from 2-4 gb. I even stupidly froze the computer yesterday, testing it by maxing out memory by opening several image files with a video editor app. Had to hard reset but learned since then about commands I should have tried instead to just restart the OS. Even while studying this issue yesterday I imagined I may have had a pagefile before I started this procedure, still not clear to me the best path forward, without causing further damage. Thank you again for your help/suggestions!
Last edited by SMG on Thu Dec 02, 2021 11:23 pm, edited 1 time in total.
Reason: Added code tags to retain formatting of command output.
Reason: Added code tags to retain formatting of command output.
Re: How do I get 20.2 to use my new swap space?
It would only be used if the system calls for it to be used. If you were not maxing out your computer's RAM and swap in the past, then increasing the swap size isn't really going to have an impact because the extra swap is not needed.Hippie_gramps wrote: ⤴Thu Dec 02, 2021 10:15 pmI learned swapfile not utilized from resource monitor...hardly budged even though it reported accurately bump in size from 2-4 gb.
The data you posted indicates the swap file is there and it is being used. However, your system at the time that was run still had plenty of RAM available. The system will use RAM before it uses swap. Using RAM is faster and is preferred.
Whether or not RAM/swamp are used depends on how the software program is designed.
A woman typing on a laptop with LM20.3 Cinnamon.
- wutsinterweb
- Level 6
- Posts: 1042
- Joined: Tue Feb 28, 2017 2:14 am
- Location: Connecticut, USA
Re: How do I get 20.2 to use my new swap space?
Hello all. I apologize for not updating sooner, my life has become cluttered with other things.
I performed the steps in that link and created a larger swap file and since then my system hasn't locked up or given me much trouble. Sometimes it slows down some, but something with it has improved problems I've had since 19.x. My laptop only has 8 GB of RAM while gets progressively used up with just browser use over about 24 hours use. There might be some sub optimal thing with the base OS memory management for an older system like mine, my laptop has a 3rd gen i5 in it. It is a Lenovo and I don't remember offhand the model number.
It doesn't seem to USE more swap than the 2 GB the default set for me, but something is different since following those steps. Very curious.
If I don't respond quickly, be aware that the chrisis in the Philippines and a number of other things have me distracted and preoccupied.
I performed the steps in that link and created a larger swap file and since then my system hasn't locked up or given me much trouble. Sometimes it slows down some, but something with it has improved problems I've had since 19.x. My laptop only has 8 GB of RAM while gets progressively used up with just browser use over about 24 hours use. There might be some sub optimal thing with the base OS memory management for an older system like mine, my laptop has a 3rd gen i5 in it. It is a Lenovo and I don't remember offhand the model number.
It doesn't seem to USE more swap than the 2 GB the default set for me, but something is different since following those steps. Very curious.
If I don't respond quickly, be aware that the chrisis in the Philippines and a number of other things have me distracted and preoccupied.
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
- wutsinterweb
- Level 6
- Posts: 1042
- Joined: Tue Feb 28, 2017 2:14 am
- Location: Connecticut, USA
Re: How do I get 20.2 to use my new swap space?
sorry swap SPACE
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
- wutsinterweb
- Level 6
- Posts: 1042
- Joined: Tue Feb 28, 2017 2:14 am
- Location: Connecticut, USA
Re: How do I get 20.2 to use my new swap space?
yes indeed, setting and instantiating a different and larger swap space has mostly ameliorated my lock up problem, though sometimes shutdowns lock at the end of the sequence.
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.