This is a discussion on Why Swap=2 x RAM within the Getting started tutorials forums, part of the Linux Getting Started category; Hi Friends, Why do we use Swap space double the RAM. i.e SWAP = 2 x RAM. Is this a ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| Sponsored Links | ||
|
|
|
||||
|
That is the general rule of thumb so that you get exactly twice as much memory for loaded programs as there is physical RAM. For example if RAM is 512 you will get total 1 Gig. Swap is only used when you have maximum load.
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
||||
|
Noop.. that doesn't work with everyone.
To OP, First find out how much RAM is sufficient or max to your needs. Generally you are limited by pricing factor (affordability aka price of RAM) Second find out the min virtual memory requirements that will avoid server crash. So it is like: SWAP Space = Min crash space Let us say you have 2 GB ram and your server can take load upto 3GB and after that it will crash. So my swap space is set to 1GB. Swap space defines the minimum virtual memory that system can operate with and the total amount of RAM. So If you have 16GB RAM you are not going to create 32GB swap space. It is all about your and your application requirements. Find out that and create space as per requirements don't follow blindly |
|
||||
|
Quote:
All I wanted to highlight is - OP is new to linux and should stick to general rule. Let him/her play with Linux and understand Linux and computer. So once you know your server you should able to make an estimate based upon your needs (I guess this what you are talking about).
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat Last edited by rockdalinux; 06-19-2007 at 06:13 PM. |
|
||||
|
|
|
|||
|
first off there is no thumb rule as swap = 2x RAM.
these days hdd space is more, back in those days 650 megs of hdd = heaven or dream come true, they were all BNC net or floppy net or net image or some mode or other which resulted in dumb terminals, they had the booting off via NFS root. those days RAM was expensive. ram's clock cycle is in gigs and before in megs. but hdd's clock cycle is in 3600 then, now 7200 and newest 10000 rpm. so those days also they had to run dbms, and dbms like bdb berkeley db which normally uses a lot of processing and indexing which reqires a lot of ram. so, the rule is valid still today. if you want a database server like mysql or pgsql or oracle or db4.3 or unixodbc? you need an insane amount of RAM. which is why? if you are planning to run dbms? then to be on safe side? 4x RAM is safe and secure from hdd potential crash. coming to point 2: if you upgrade RAM what do you? STOP being a PANICKY CHICKEN CHICK with skirt. swapoff the swap drive, remove it from fstab, resize some partition where you got loads of space for party, create a new partition for swap and format it as a swap and swapon. rh 7.x got a nice howto on system customisation. /dev/mem and /dev/kmem = RAM memory and /dev/hdNX = hdd, RAM = high speed hdd. in short and they ease the process of io which is why we have seek time. |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Swap | piggy | Getting started tutorials | 3 | 07-17-2007 09:44 AM |
| Difference between Linux Swap partition & Swap file | hrishikesh | Linux software | 9 | 03-16-2007 02:08 AM |
| difference between Swap and Virtual memory | ricc | Linux software | 3 | 03-16-2007 01:35 AM |
| how to find swap in solaris | raj | Solaris/OpenSolaris | 1 | 02-05-2007 06:48 PM |
| Deleted SWAP partition | sonaikar | Linux software | 1 | 02-05-2005 06:20 PM |