LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   swap part. question (https://www.linuxquestions.org/questions/slackware-14/swap-part-question-69889/)

pine0279 07-03-2003 02:45 PM

swap part. question
 
I am using 384 meg, (128 x 3), of RAM. I read where the swap partition should equal the amount of RAM times two, (384 x 2 = 768). Do I make a single swap partition of 768 meg? Or do I break it up into seperate swap partitions of 128 meg each, (128 x 6 =768)?

I also read somewhere that a swap partition should not be larger than 128 meg. If you wanted more than a 128 meg swap partition you would have to have multiple swap partitions to satisfy the amount you want to use. Is this old or outdated info? Thank you.

Tinkster 07-03-2003 02:56 PM

Considering the amount of RAM you got I think
that a swapper of the same size is MORE than
enough. The rule where it said that you need
double the swap of your physical RAM is from
the days where 64MB was considered heaps.

And no, you don't have to make "stripes"
of swappers, one with 256 would do perfectly
well. If you had a SCSI system with several
HDD's making one swap on every disk might
help with performance, but not with one big IDE
HDD.

Cheers,
Tink

Anti-Gates 07-03-2003 02:56 PM

I have a 317mb swap parititon (just what was left over after I set up my others {win & slack}) I have NEVER used any part of my swap space, and I always have 6 or 7 programs open. Then again I have 512mb of ram. A 300 or 400 meg swap file should be fine I think. (doesnt matter if you go over 128. I have never heard anything about that being a problem)

NOTE: Although I have been trying to get information and searching the web about linux for awhile I have only been using it for about a week.

pine0279 07-03-2003 02:59 PM

Thanks Tinkster!

contrasutra 07-03-2003 03:48 PM

Yeah, I have 256MB of RAM, and on a normal basis, I have 0-10MB of swap being used. Its not a problem like it is in Windows. I know lots of people who get by with 50MB swap partitions and have never had issues.

scottwest2 07-03-2003 11:06 PM

I am using a 1.3ghz athlon and am ready to setup another harddrive as the main harddrive, do u think i am going overboard considering i always make a 512mb swap with a gigabyte of ram

Tinkster 07-03-2003 11:13 PM

Unless you're running several virtual
hosts under apache, a chubby postgres
database and a squid-proxy on that box
I'd say you won't need a swapper at all ;)

You see, it really depends on the usage :}

If you run OO, Mozilla and a few other small
tools under KDE you'd hardly need a swapper
with 512MB RAM ...

Cheers,
Tink

scottwest2 07-03-2003 11:33 PM

I am using a 1.3ghz athlon and am ready to setup another harddrive as the main harddrive, do u think i am going overboard considering i always make a 512mb swap with a gigabyte of ram

pine0279 07-05-2003 09:52 AM

Scottwest2 :: From the sound of it, if you put a few wheels on that thing you could drive it around the block. :-)

scottwest2 07-06-2003 11:57 PM

sorry for posting twice i was probably using my parents computer and it i a slow winDOZE machine. but i guess i could drive it around the block, the only problem i have is i dont know how to liscense it, is it a vehicle or a trailer?

linuxJaver 07-07-2003 03:24 AM

My consideration of swap:

So swap space is actually for speed up programs, so if u don't have any it ll not problematics, if ur physical ram is not, 32mb .. like it was in the prior time.

The speed benefit of swap will be achived only in few cases like mentined above running httpd with virtual hosts, compiling kernel, booting time. But X, window managers: kde,gnome use it intensively especially during "starting of their applications".

For those windowing applications, a GraphicCadrs(GC) with great ram is real plus, it relax CPU n RAM activity, so gamers PC spec won't worry too much about swap for windowing aspect, but in those certain cases like booting, kernel compiling, servers/demons.

As commented above, 1:1 of RAM:swap comparison is already good. But if HD capacity is not of problem, n u've only a stick of 128/256 on ur mobo, then u should consider 1:2 of swap for the possible further upgrade of ram (save of repartitioning HD later).

Hope that save ur time by partitioning or designing partitions ..

whansard 07-07-2003 03:53 AM

i propose a new formula for calculating the amount of
swap you need.
you take (the kernel version X the version of your flavor
of linux X the number of people or connections that
could possibly be made to the machine at any time X
the version number of kde on your machine X the
version number of xfree86) +256 X ( current year -2002).

you take your current amount of ram and subtract the
number from above from that. thats how much swap
you need. if it's a negative number, you don't need
any swap. by the way, thats swap measured in
rupees, not megs. thats how many rupees of swap
you need.

Noryungi 07-07-2003 04:32 AM

Quote:

I am using 384 meg
Funny you should ask that, I also happen to have 384 MB of RAM on my laptop. My swap space is about 500 MB if I remember well.

In general, unless you have very little RAM, your swap space should be about the same as your RAM.

If your RAM < 128 MB, then, yes, your swap space should be = to the size of your RAM.

Also, removing the daemons you don't need helps A LOT when it comes to save memory space... I only have sshd running and it makes a difference! :)

pine0279 07-07-2003 12:40 PM

Hey thanks everybody! Thats what was missing, I didn't have enough rupee's working. I think I have it fixed now. I figured out the exchange rate for krones and bot for the same amount in rupee's. It seems to work fine only a bit slower but decent nevertheless. My sound card won't stop speaking Japanees but I can live with it. :-) Chin ho!

ps: The gasoline and napalm thing sounds good too.

fuelinux 11-17-2003 02:20 AM

I have 64MB (DIMM) + 2x16 (SIMM) = 96 MB (TOTAL) RAM on my PC. But seems like because of true parity issues linux makes use of only 64 MB of RAM. Since I was constrained with HD size (1 GB only), I set up swap partition of size of 32 MB only. And now when I look at swap's use with free or cat /proc/meminfo it shows that swap memory is not used at all.
Do I need any swap? ;) I'd make good use of that 32 MB


All times are GMT -5. The time now is 06:17 PM.