DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 2 hard drives and 3 solutions for 1 computer.
1 - use just the hdd.
2 - use just the ssd.
3 - use both.
RAM = 48GB
For each of those solutions what would be the best swap file size and for solution 3 which drive should the swap file go to.
After some searching, I found out that 2GB more than ram is normal, so I figured for all solutions to have a 50GB swap file. Again for solution 3 what drive would I put that on.
Or is there a more sensible solution for this. I am using Debian 9.
Swap size really depends on what applications you are running, how you use the computer and if you hibernate. Ubuntu seems to recommend the most swap space with rough numbers being 8GB for no hibernation and 56GB with hibernation for 48GB RAM.
Some would say that you should put swap on the HDD to prevent wearing out the SDD and some say it does not matter. Considering that you may not use swap at all I say it does not matter.
Some would say that you should put swap on the HDD to prevent wearing out the SDD and some say it does not matter. Considering that you may not use swap at all I say it does not matter.
If you use hibernation (and a lot of laptop users do), I would say: put the swap on the hard disk. It mostly is larger then the SSD and speed for swap doesn't matter that much.
Keep the SSD for things that need the speed.
Really ?. Swapin speed usually matters a lot - this is by definition where a user is waiting for the I/O completiton. Very few user seem to have any patience.
Swap is easy to resize and move - I would pick a number, say 10 Gig, stick it on the hard disk, and see what happens. Proceed based on actual data rather than speculation.
Really ?. Swapin speed usually matters a lot - this is by definition where a user is waiting for the I/O completiton.
Yeah but most modern systems have RAM enough that swapping doesn't occur much.
Swap is often only there to get rid of startup and other inactive daemons (AND for hibernation, of course). Try the "free" command to see how much swap you're currently using.
Mine, about a month since the last reboot is
Distribution: Slackware, MX Linux, Devuan, Debian, Puppy, Linux Lite, Linux Mint, etc.
Posts: 16
Rep:
Swap size (and location) really depends on your particular computer habits and needs. It depends on if this is a laptop or a desktop, and if you ever hibernate or not. And depends on how you use the computer.
I have a desktop computer with 32 GB of RAM, with 6 GB of swap space, and it almost never uses the swap space. Once in a rare moment, it will use some swap space, when I'm compiling software.
My laptop only has 4 GB of RAM memory, with around 5 to 6 GB swap space, and it will sometimes use the swap space, when I have too many tabs open in Firefox or Chrome(ium). Or I'm compiling software on it.
I don't have any SSD drives, other then a tiny 32 GB SSD inside a netbook. That netbook has 1 GB of RAM memory, not much at all. All my other drives are the traditional spinning hard drives. But if I had a SSD and hard drive combination, I personally would put the swap space on the hard drive. To conserve the amount of writes to the SSD, assuming the computer actually used the swap.
I fully realize a SSD is much faster compared to a traditional spinning hard drive, but they cannot handle as many writes to a particular sector.
Howard
Last edited by Howard1975; 01-01-2019 at 01:49 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.