LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Swap file install (https://www.linuxquestions.org/questions/slackware-14/swap-file-install-22370/)

theapodan 06-02-2002 12:20 AM

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.

trickykid 06-02-2002 12:53 AM

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.

milos 06-02-2002 01:00 AM

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

sakeeb 06-02-2002 01:38 AM

Re: swap
 
Quote:

Originally posted by milos
use the formula taking half my ram for swap
half of ram for swap.? i believe it is double of ram

DeadPuddle 06-02-2002 02:34 AM

The rule of thumb is double the amount of RAM.

theapodan 06-02-2002 11:05 AM

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?

trickykid 06-02-2002 11:27 AM

Re: Re: swap
 
Quote:

Originally posted by sakeeb


half of ram for swap.? i believe it is double of ram

That was the rule of thumb about a half decade ago when 64 MB of RAM was standard, so a 100-125 MB swap partition would do you good. Unless your running a high performance server with many users logged in, I never see any need to have a swap twice the size of your RAM, only when you have maybe 64 megs or less.

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.

DeadPuddle 06-02-2002 03:45 PM

Well, trick, that rule of thumb is still in the Slackware book :D

DeadPuddle 06-02-2002 03:46 PM

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!

trickykid 06-02-2002 04:09 PM

Quote:

Originally posted by kernal
Well, trick, that rule of thumb is still in the Slackware book :D
I don't think the Slackware book has been updated in a while. That is the same one they've had for a while now. ;)
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.

DeadPuddle 06-02-2002 06:55 PM

Makes sense :)

theapodan 06-02-2002 10:18 PM

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.

trickykid 06-02-2002 11:22 PM

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 ?

jtshaw 06-03-2002 10:46 AM

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.

theapodan 06-04-2002 12:03 AM

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?

trickykid 06-04-2002 12:48 AM

Quote:

Originally posted by theapodan
What is to be gained from creating separate root and user partitions?
Usually corruption. If you ever need to reinstall and don't want to reinstall everything, you can just install or fix that one partition.
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.