Removing SWAP <SOLVED>

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Removing SWAP <SOLVED>

Post by mrmajik45 »

How do i remove my SWAP partition because I have 4 GB of RAM and my swap just wastes 3.91 GB of disk space :?
Don't know if this helps but my CPU is: Intel Celeron CPU N3060 @ 1.60GHZ x 2 Cores
Last edited by mrmajik45 on Sat Sep 02, 2017 9:50 pm, edited 1 time in total.
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

User avatar
WharfRat
Level 21
Level 21
Posts: 13898
Joined: Thu Apr 07, 2011 8:15 pm

Re: Removing SWAP

Post by WharfRat »

Are you sure it's never used :?:


I had a 4GB RAM desktop and according to the conky monitor it was being utilized occasionally.
ImageImage

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP

Post by mrmajik45 »

WharfRat wrote:Are you sure it's never used :?:


I had a 4GB RAM desktop and according to the conky monitor it was being utilized occasionally.
Gparted says used: 0.00 B
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

rene
Level 16
Level 16
Posts: 6310
Joined: Sun Mar 27, 2016 6:58 pm

Re: Removing SWAP

Post by rene »

Run sudo swapoff -a, comment or delete the line regarding your swap partition in /etc/fstab and then just delete the partition 5 (and 2; there's nu use for an extended partition without any logicals).

Quite sure though? 4G is not a lot for current day usage. I'd definitely keep at least 1G of swap for some overflow capacity. Note that the "0.00" figure from gparted doesn't mean anything: you want to check what the command free has to say about things when running for some time. Also, that you need swap if you wish to hibernate...

User avatar
WharfRat
Level 21
Level 21
Posts: 13898
Joined: Thu Apr 07, 2011 8:15 pm

Re: Removing SWAP

Post by WharfRat »

Well if you must then sudo swapoff -a, remove the swap line in /etc/fstab and delete the partition with gparted.
ImageImage

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP

Post by mrmajik45 »

rene wrote:Run sudo swapoff -a, comment or delete the line regarding your swap partition in /etc/fstab and then just delete the partition 5 (and 2; there's nu use for an extended partition without any logicals).

Quite sure though? 4G is not a lot for current day usage. I'd definitely keep at least 1G of swap for some overflow capacity. Note that the "0.00" figure from gparted doesn't mean anything: you want to check what the command free has to say about things when running for some time. Also, that you need swap if you wish to hibernate...
First i don't understand Run sudo swapoff -a, comment or delete the line regarding your swap partition in /etc/fstab and then just delete the partition 5 (and 2; there's nu use for an extended partition without any logicals).

Second heres what free says:
ghostslayer989@mrmajik45 ~ $ free
total used free shared buff/cache available
Mem: 3956004 1066048 315620 155676 2574336 2400468
Swap: 4104188 0 4104188
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP

Post by mrmajik45 »

Now im a bit worried because someone said that 4 GB isn't much so how do i lower Swap to 1GB
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

User avatar
Schultz
Level 7
Level 7
Posts: 1946
Joined: Thu Feb 25, 2016 8:57 pm

Re: Removing SWAP

Post by Schultz »

mrmajik45 wrote:
Now im a bit worried because someone said that 4 GB isn't much
That's all I have and I don't even have a swap partition. Then again, I don't do anything that consumes a lot of memory.
Last edited by Schultz on Sat Sep 02, 2017 9:43 pm, edited 1 time in total.

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP

Post by mrmajik45 »

Well all i play is GARRYS MOD Steam and use chrome
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

rene
Level 16
Level 16
Posts: 6310
Joined: Sun Mar 27, 2016 6:58 pm

Re: Removing SWAP

Post by rene »

(note; WharfRat and I were posting concurrently)

The free result is saying that currently no swap is being used. But start a few firefox and libreoffice sessions and that may change. As to you "not understanding" that first bit: it's fairly straightforward advise so this would mean you're quite new. I'd in that case for now keep the swap partition around until you know you don't want it.

Seeing your next post upon hitting "submit" on the above: why is it so important for you to lower it? Just leave it be for now I'd say: combining your apparent nature and Linux's nature, you'll be reinstalling quite a few times over the coming year anyway...

But basically, you'd first remove the old one as per above, create a new one, format it, enable it and reenter it into /etc/fstab. That's only a sketch though. I'm sort of reluctant to provide step-by-step on a case where it's not clear that you should be doing anything.
Last edited by rene on Sat Sep 02, 2017 9:46 pm, edited 1 time in total.

MintBean

Re: Removing SWAP

Post by MintBean »

I would advise you to keep it. That one day where you end up doing something a bit heavier than usual, do you want your system to slow down a bit as it starts paging swap or would you rather it just went tilt and crashed, possibly losing your work? 4GB of disc seems a small price to pay, plus it allows you to suspend the system.

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP

Post by mrmajik45 »

If it allowed me to suspend the system you could've told me EDIT: gonna keep swap = SOLVED
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

rene
Level 16
Level 16
Posts: 6310
Joined: Sun Mar 27, 2016 6:58 pm

Re: Removing SWAP

Post by rene »

You can suspend without swap. As said above, you do need it for hibernation.

User avatar
WharfRat
Level 21
Level 21
Posts: 13898
Joined: Thu Apr 07, 2011 8:15 pm

Re: Removing SWAP

Post by WharfRat »

mrmajik45,

Before you delete the partition why not just turn it off and comment the /etc/fstab line so it won't restart at boot and test it for a week or two.

You have plenty of space in your / partition so you can't be in dire need of disk space at this time unless you have something planned that we don't know about :?
ImageImage

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP

Post by mrmajik45 »

rene wrote:You can suspend without swap. As said above, you do need it for hibernation.
Yeah I Meant that :wink:
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP

Post by mrmajik45 »

WharfRat wrote:mrmajik45,

Before you delete the partition why not just turn it off and comment the /etc/fstab line so it won't restart at boot and test it for a week or two.

You have plenty of space in your / partition so you can't be in dire need of disk space at this time unless you have something planned that we don't know about :?
As i said it's solved
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP <SOLVED>

Post by mrmajik45 »

Also when do I rank up?
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

rene
Level 16
Level 16
Posts: 6310
Joined: Sun Mar 27, 2016 6:58 pm

Re: Removing SWAP <SOLVED>

Post by rene »

At your current rate of posting, tomorrow.

User avatar
mrmajik45
Level 5
Level 5
Posts: 597
Joined: Tue Aug 29, 2017 9:51 pm
Location: USA, indiana
Contact:

Re: Removing SWAP <SOLVED>

Post by mrmajik45 »

rene wrote:At your current rate of posting, tomorrow.
Well 8)
ReactOS Donator ~ $5.00 | Linux Mint Donator ~ $1.00 in BTC

MintBean

Re: Removing SWAP <SOLVED>

Post by MintBean »

My bad, meant hibernate. Thumbs up for Garry's mod... it's a hoot.

Post Reply

Return to “Hardware Support”