what if the swap memory size entered is memor

June 23, 2011 at 06:12:02
Specs: Linux i686
what if swap memory size is more than twice the physical memory

See More: what if the swap memory size entered is memor

Report •

#1
June 23, 2011 at 08:08:43
What about it? Swap will just work as it should.

Report •

#2
June 23, 2011 at 10:07:14
How big is your swap file? You didn't provide any info about your system but if you have 4GB RAM, an 8GB+ swap file is excessive.

Report •

#3
June 23, 2011 at 11:31:28
It's true that the old Unix adage of swap space being twice RAM doesn't really apply with larger amounts of RAM. On the other hand, it does no harm and disk space isn't exactly in short supply nowadays. Too much is definitely better than too little for Linux.

Report •

Related Solutions

#4
June 23, 2011 at 13:40:39
Swap is a two edged sword. Many people don't even use it at all.

1/3 of highway deaths are caused by drunks. The rest are by people who can't drive any better than a drunk.


Report •

#5
June 23, 2011 at 23:51:37
It's a complicated subject, and one that also confuses Windows 7 users, but a well-written virtual memory system can always make good use of swap space however much physical RAM is present. It's a question of working memory and file caches.

Another advantage of having at least some swap space is that it allows for graceful degradation of performance, which is likely to be noticed, in the case of a memory leak rather than a sudden kernel panic.

Given the cost and availability of hard disk space I always allow a reasonably sized swap partition. At worst it makes no difference; at best it improves performance and system stability. This is particularly true for systems with long uptimes.


Report •

#6
June 24, 2011 at 17:02:34
In my setup's I never use a swap file. I know that I have enough real ram and my use tends to need real time kernel and fast responses.

A normal user can put almost any amount of swap they want. It my only slow system by a very small amount to the users perspective. Swap is hard drive and when one compares how fast a cpu can access ram versus hard drive it makes sense to buy more ram instead.

1/3 of highway deaths are caused by drunks. The rest are by people who can't drive any better than a drunk.


Report •

#7
June 25, 2011 at 00:01:41
It makes more sense to buy more RAM and use some swap space; the two are not exclusive. There are very few situations where, for a given amount of RAM, swap space won't improve performance. In particular, any system that does significant I/O will benefit from the extra RAM available for swapping.

But if you are primarily concerned with a real-time system with little or no disk I/O then I agree that swap space will make little difference. But this is not the situation for most users.


Report •

Ask Question