LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   SWAP file size (https://www.linuxquestions.org/questions/linux-general-1/swap-file-size-84535/)

ashley75 08-22-2003 10:08 AM

SWAP file size
 
I will reconfigure the Linux 2.1 O/S and I have question about the SWAP file. From what I know, Oracle suggest to have the SWAP space has to be at least 400m or twice of the amount of the physical RAM (whichever is greater), in my case, I have 2G ram on the server, so I should have 4G for the SWAP file, right ????

I am not Linux admin, I did configure Linux 7.3 professional before to run 9i database and everything works fine, my company make me do this again even I am not system admin here, is there anything I need to watch out for this configuration for Linux as well as installing Oracle???

thanks

acid_kewpie 08-22-2003 10:20 AM

nah, ignore that. that advice is *REALLY* outdated. if you have a huge server with a high load then a couple of gigs might be useful. but 4gb will just get wasted, if you don't hav a high load on the machine it'll possibly never get touched with 2gb of ram in the first place.

btw... linux 7.3 and linux 2.1* don't exist.... maybe you mean redhat 7.3?

*well... you know what i mean....

Mega Man X 08-22-2003 10:21 AM

Hi ashley75!!!

Yeah, that's/was "true". It's recommended to have at least twice the amount of RAM as Swap. I really don't think it's necessary IMHO. I use Linux as my desktop. In this machine I'm now, it has only 256 of physical RAM. It's a 2GHZ processor, and I've blackbox, selpheed, Mozilla, Xmule, xmms running too and I still have 190 Megas of free RAM, so indeed the Swap is never used. I think, that you not really need even Swap if you have a nice amount of RAM (comparing your RAM with mine, makes me feel back to my 386...ghehe). Swap in Linux is more kept for slower machines I believe, when let's say, we had those powerful 486 with 16 or even 8 megas of RAM, swap was indeed a must have. With those new machines, I seriously doubt it :)

tangle 08-22-2003 10:27 AM

I wish that I could remember where I read about swap requirements. But in that artical is explained how much swap you needed compared to the physical memory and the amount of users accessing the system. Depending on how many users you have I think that one to two gigs would do.

ashley75 08-22-2003 10:43 AM

thanks for all of the valueable advise,

and yes I am going to configure Linux Redhat Advance Server 2.1 for my company and I am not Linux Admin :o) . I am an Oracle DBA but the network admin guys at my company chicken out since they only know Windozzzzzz.

I know just a little on Linux admin so that I need some good advises.

So you think it I have 2G SWAP file (just to be on the safe side, since I have a lot space on this server), is it going to good???

any thing else you guys would advise I need to watch out when I install Linux Redhat Advance Server 2.1??? I install Linux Redhat Professional 7.3 before, is Linux Redhat Advance Server pretty much the same ????

tangle 08-22-2003 11:07 AM

The main thing is to setup the server and test it for a while. Remebers Murphy's Law.

Artimus 08-22-2003 01:55 PM

You do mean a swap PARTITION, I hope? You loose quite a bit of performance when you use a swap file versues a swap partition.

stickman 08-22-2003 03:23 PM

Quote:

Originally posted by ashley75
So you think it I have 2G SWAP file (just to be on the safe side, since I have a lot space on this server), is it going to good???
Whether 2GB of swap is sufficient or not will depend on several factors such as number of users, size of queries, amount of cached data. I would recommend getting some baseline statistics from an existing server if you have that luxury.

RajRed 06-01-2006 04:49 PM

What is the difference between swap PARTITION and swap file according to the following thread?

You do mean a swap PARTITION, I hope? You loose quite a bit of performance when you use a swap file versues a swap partition.

Thanks.

twantrd 06-01-2006 05:28 PM

Quote:

What is the difference between swap PARTITION and swap file according to the following thread?
A partition dedicated only for swap versus a file that is used as swap. When you partition your drive, you set the filesystem type for that partition. If you look, there is an option called "swap". If you selected that, you have just told the OS to use that particular partition as swap.

You can also have a swap file. Just 'dd' out a file to a certain size that you want and run a couple commands to make it used as swap.

The reason why a swap partition is preferred over a swap file is because of performance reasons. With a swap file, there is filesystem overhead amongst other things.

-twantrd


All times are GMT -5. The time now is 10:42 AM.