Swap file install
So, I have a burning desire in the left leg of my pants to install slackware. My only linux knowledge was from installing a distro called small linux on a 486 that I had.
Anyway, I have 320 MB of ram in my computer, and I was pondering whether I'd have to have a swap partition. I would rather install linux in one single partition. So, how do I go about using a swapfile on the same partition as the rest of my linux install, what kind of performance hit would I take, and is this an incredibly stupid thing to do? Thank you kindly. |
Well usually Linux requires a swap file and during the install of Slack it will ask for the creation of a swap file. You could get by with only installing a small swap, maybe 64 megs or so, but I would consider creating more than just one partition for Linux.
|
swap
You want to create a swap partition if your going to run linux on your machine. It doesn't have to be huge though. I have 256mg of ram on my machine and use the formula taking half my ram for swap, so my partition is 128mg in size. How big is your hard drive? Anyhow I run a dual boot with win98 taking the first 5 GB of my hard drive and slackware linux using the remaining 15 GB (my 128 MG swap space lies between these 2 partitions).
good luck |
Re: swap
Quote:
|
The rule of thumb is double the amount of RAM.
|
What kind of performance hit would I take by using only a swapfile?
I am used to DOS and MacOS, and see no reason for the additional complexity of making two or three partitions for linux. I want the familiarity of a one-partition system. So how much swap space should I create with 320 MB of ram? |
Re: Re: swap
Quote:
I personally use and only use no more than 125 MB of swap ever. I have one box with 128 MB of RAM, got a 100 MB swap that is never hardly touched or used. |
Well, trick, that rule of thumb is still in the Slackware book :D
|
Generally, for a desktop user, you only need three partitions:
/boot - About 32MB SWAP - Use rule of thumb OR take trick's advice / - Whatever is left over Huzzah! |
Quote:
The supposedly rule of thumb is still in alot of HowTo's and other documents you may find, as it won't hurt anyone making a swap twice the size of their RAM, but it just seems wasteful to me. If I created a 1GB swap on the machine I have 512 MB of RAM and when I had a 100 MB swap never getting touched, that would seem wasteful space to me IMHO. |
Makes sense :)
|
Dudes, i still want to know what kind of performance hit i'd take from putting it all on one partition, because despite advice about every other partition scheme, i still want to stick to my original idea.
|
You probably won't see much of a performance decrease with a small swap partition with that much RAM, but I recommend you still have one though, its essential to the functionality of Linux.
I still recommend creating more than just a swap and a / partition though. What are you going to be using the Linux box for ? |
The double the ram rule of thumb comes from being able to copy your entire memory into swap and still have operating space left if somethings strange happens. I have 512MB of Ram in my main system and I did opt for a 1024MB Swap file, but I have disk space to spare so it wasn't a big deal for me to do so.
When I first started using linux I didn't see the benifit for multiple partitions... then one day I started experimenting with other distributions and whatnot, and realized that having things like /home or /usr/local seperate is pretty nice. Especially if you want to to a fresh OS install but not lose all your home directories. |
I'm just setting this up for the hell of it. I plan on using a desktop environment in addition to the commandline. Nothing that is particularly taxing is going to be going on. I'd also like to learn more Unix than I know, so I figure slackware will be good.
Also, slackware came recommended. What is to be gained from creating separate root and user partitions? |
Quote:
Separating your /var and /tmp files is always a plus too as those change in size all the time, with logs and temp files being used/moved around. Lets say if something happens so your logs fill up your one partition, your system won't boot then. With its own partition, it will only fill that up, making it easier to fix. Also making a separate home directory is also good, so if you do ever reinstall, you can keep your home directory if uncorrupted and you don't have to go back, reinstall or setup those home directories again. Usually you want to make your / and /usr separate as programs are usually installed on /usr which require more space, its just a good idea to have it separate from the rest as well. If your going to be installing for learning though, and maybe not going into X so much, you should easily get by with a small swap partition though, that shouldn't be any problem. But if you want to learn Linux, create multiple partitions just to get your hands dirty and see how it all works, cause any server you ever encounter will most likely have separate partitions. That in the long run will help you learn how linux works as well. ;) |
All times are GMT -5. The time now is 11:46 AM. |