Why size of swap space is 2x of RAM??? Why not 1.5x of RAM or 2.5x of RAM???
Why size of swap space is 2x of RAM??? Why not 1.5x of RAM or 2.5x of RAM???
|
It's just a customary idea , not a rule.
|
It was a fairly stupid "rule of thumb" back when ram as a lot more expensive. Actual swap space requirements always depend on what you're doing with the system and don't correlate significantly with the amount of ram you have.
Now that people routinely (but not uniformly) buy much more ram than they really need, that 2X rule has shifted from fairly useless to totally useless. If you can't figure out how much swap you should have (don't worry, most people are no better at figuring that out) a better blind rule is configure 2GB of swap regardless of ram size. If you have 0.5GB of ram, 2GB of swap. If you have 8GB of ram 2GB of swap. |
Thank u...
|
Quote:
Though, if you're careful, it is entirely possible to get away with no swap at all. I've never had a swap partition on my EeePC with 2gb of RAM. I even keep /tmp/, /var/log/ and my browser cache in tmpfs, which is in RAM. |
Hello ,
it is not a rule, it was just because mostly systems had less physical memory earlier so we had to made swap space just double of ram but now days system have sufficient physical memory around 1 GB or more then 1 GB mostly ,so there is no need to create 2 GB swap partition if you do create only 1 GB swap your system will work fairly without any issue. for example my server has 8 GB RAM but swap space is only 2 GB and server is working fine since last 3 years. |
An alternative is to swap to a file (in a file system) as opposed to dedicated partition(s). AFAIK the file stays at the maximum swap used size so is a good way of measuring it, perhaps to decide what size dedicated partition to use. If the system is using swap then it will probably use more swap later (computing load has a tendency to grow) so best to configure more than the system actually uses to allow room for future growth.
|
hello,
here are my thoughts. depending of what you want to do, you dont need swap at all.. my desktop PC has 768 MB RAM. A LOT for the processor and tinycorelinux. And just for the principle of having it, 100 MB of swap (it was used 1 time when I had too much applications opened). I run my tinycorelinux USB stick on different PCs direct in RAM (no swap, no HDD). Using SWAP by these days is perhaps because - you cannot increase the RAM (physical limitation in your HW), - dont have more money for RAM, - have the wrong linux (too big too fat) .. forgot to buy RAM? |
All times are GMT -5. The time now is 06:50 PM. |