where to put swap

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
red123

where to put swap

Post by red123 »

Should I put my swap partition on my SSD or on my secondary HD with my /home partition? Or does this matter?
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.
wayne128

Re: where to put swap

Post by wayne128 »

red123 wrote:Should I put my swap partition on my SSD or on my secondary HD with my /home partition? Or does this matter?
You should not put swap in /home.
Swap has different file system.

As swap is used for hibernation purpose, it should work anyway in SSD or HD. Read more details below
https://help.ubuntu.com/community/SwapFaq
red123

Re: where to put swap

Post by red123 »

I meant to say if I should put my swap partition on my secondary HD which is also where I put my /home partition.
pythagorean

Re: where to put swap

Post by pythagorean »

personally, I wouldn't waste the space at all. I have watched my system monitor numerous times with a variety of applications to see if swap is ever used and I have never seen it move off ZERO per cent at all.
gn2

Re: where to put swap

Post by gn2 »

red123 wrote:Should I put my swap partition on my SSD
If you will use swap: Absolutely not.
If you will not use swap: Doesn't matter where it goes.
Dave68

Re: where to put swap

Post by Dave68 »

I have my swap on the same Hard Drive that I have my / and /home partitions(Secondary, and External at that).

Although, there are some that would say a small Swap on the Primary and a small Swap on the Secondary tend to give a Raid effect to the Swap System.
pythagorean wrote:personally, I wouldn't waste the space at all. I have watched my system monitor numerous times with a variety of applications to see if swap is ever used and I have never seen it move off ZERO per cent at all.
I have never tried this, and was under the impression that Swap was a must. I'm not questioning this statement, I've just never tried it.

Another World of Possibilities :lol:

Thanks,
Dave
seeley

Re: where to put swap

Post by seeley »

Hi red123!
For "swap" you need an own partition - it has another file system as /home, it's impossible to put swap into /home.
I tested - with 1 internal hard disk: as primary partition, within an extended partition (as first logical = number 5, as last and in the middle) - no difference;
even no "swap" made problems - so as a normal user (without "suspend to disk") it plays no role.
seeley
DrHu

Re: where to put swap

Post by DrHu »

Typically an ssd drives is faster and has lower latency than a regular hard drive, other than that it doesn't matter much.

Most Linux distributions even if they require a swap partition or file when installed (being part of that installation procedure) but do not make any use of the swap area, if your hardware is adequate to that task of running the OS + applications; as you have enough RAM (memory) and system storage and are not at the minimum for use of the hardware with that installed software
Last edited by DrHu on Thu Dec 16, 2010 3:33 pm, edited 1 time in total.
ivan_rookie

Re: where to put swap

Post by ivan_rookie »

I personally (Mint 10 64-bit Gnome) did not assign a swap partition at all, because I think 4GB of RAM can handle everything. Until now my installation is superfast, responsive and it never manages to 'eat' more than 900MB of my memory even when running browsers and other intensive apps. Also, I wouldn't put a swap partition on a SSD.
AK Dave

Re: where to put swap

Post by AK Dave »

The only purposes for swap in a desktop or laptop system should be for emergency extra ram, or for suspend/resume functions. Either way, you want the fastest lowest latency you can get. If you have an SSD, by all means USE IT! If you have a USB3 thumb drive on a USB3 port, USE IT!

If you're planning to regularly use swap to supplement RAM, you're doing it wrong already. Maybe you have some obscure high-end system need which would actually be better handled by having gobs and gobs more ram. Swap isn't ram. It is a filesystem that augments ram, but it is mind-numbingly slower than real ram so if it is ever actually used you're already in trouble.

Now, on a high-end workstation (not a desktop at all at this point) where you actually regularly need somewhere north of 16gb of ram just to function and can't bring yourself to farm out some of this work to a beowulf cluster then all bets are off.

For a question in the Noob forum, the answer is: SSD.
mads

Re: where to put swap

Post by mads »

red123 wrote:Should I put my swap partition on my SSD or on my secondary HD with my /home partition?
On your secondary HD with your /home partition.

red123 wrote:Or does this matter?
"gn2" has already answered this part.
Dude
Level 1
Level 1
Posts: 11
Joined: Sat Nov 14, 2009 5:53 am

Re: where to put swap

Post by Dude »

I have the best luck when I put / in one partition and swap in another partition on the same drive. When I spread my data to more than one drive, it just slows the system down. I don't use a separate /home partition. Everything on a single / partition works best for me. I'm using a 90gb OCZ Agility 2 SSD.

By the way, I do have a separate WD 500gb hard drive to backup my data. I leave it unmounted most of the time and just mount it when I need it. It's not even listed in /etc/fstab.
Locked

Return to “Beginner Questions”