Linux - GeneralThis 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
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.
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142
Rep:
swap memory on second drive
Hi
I have "merged" Fedora Core 1 and Ubuntu onto one drive.
Fedora was originally on hda and Ubuntu on a drive in another identical PC. I managed to copy the Ubuntu image onto hda, then thought I'd be really clever and use the spare drive to create a universal /home.
In this way both distros can access the same /home. This works fine.
BUT, Ubuntu seemed to use more space for swap. Now on my hda is the original fedora swap of about 126M, whereas Ubuntu's was about 600M
Ubuntu is running slowly, so I have repartitioned hdb and put an 800M swap file on there. I then changed fstab to say:
/dev/hdb3 none swap sw 0 0
But it won't use it. A df -h shows /dev/shm as only the 126M partition.
The partition is correct and is of the right type. I am now wondering whether swap HAS to be on the first drive?
Tmpfs is a filesystem that is stored in ram. Conversely, swap is a way for "virtual ram" to be stored on disk.
FYI, Look into the pri= option of fstab for multiple swap spaces: with swaps on multiple drives, you can see a significant performance boost if they are at the same priority. Otherwise (as a default), the first swap must be full before it uses the second.
It's a good idea to have swap-space on multiple drives, particularly if your hardware is such that more than one input/output operation can be going on simultaneously.
The rule of thumb, afaik, is that total swap-space should be about 2x the size of RAM. Beyond that, it probably won't be used. And of course, "chips are cheap." Purchase as much RAM as the box will hold.
well if i have good amount of RAM then i do not like to use more swap
it can slow down some time too
lots of swap doesn't slow things down
swap on two different hardrives is a good thing
having no swap and lots of ram is worse than having lots of swap and lots of ram just because the kernel vm is designed to have swap -- without swap the kernel vm is all screwed up
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.