How Much Virtual Memory is Enough?
whitroth asks: "Ten years ago, Received Wisdom said that virtual memory should be, on the average, two to two-and-a-half times real memory. In these days, where 2G RAM is not unusual, and many times is not that uncommon, is this unreasonable? What's the sense of the community as to what is a reasonable size for swap these days?"
lots
640k should be enough for anybody.
I use 4x750 GB hard drives (RAID), purely for virtual memory. It increases the speed on the RAM preprocessing directive, but demodulates the core processing utility monitor. I find it to be a good setup, especially for running Naibed Linux.
Stupidity is like nuclear power, it can be used for good or evil. And you don't want to get any on you.
You have a GUI to run: 600 MB for firefox, 1800 MB for OpenOffice.org, 100 MB for X, 100 MB for desktop odds and ends, 300 MB for Evolution or Thunderbird, and 10 MB for old-style stuff running in the background.
Total: 2910 MB
Yep, you need a gigabyte of swap. OpenOffice.org was made 64-bit clean for a reason. If you plan ahead, not wanting to reallocate disk space in the next few years, you'll allow for this:
2 GB for firefox, 5 GB for OpenOffice.org, 1/2 GB for X, 1/2 GB for desktop odds and ends, 1 GB for Evolution or Thunderbird, and 10 MB for old-style stuff running in the background
That's 9.01 GB. You're exactly 7.01 GB short, so you'll be needing that swap space before you know it.
Can't you linucks people get on the same page about this?
You're 10 years on now, for God's sake; get it done.
Before talking about swapping, pagging, and virtual memory please learn and understand this equation: Virtual Memory = Physical Memory + Swap(or Page) file. I let the OS (windows) manage my page file. The current generation of windows OS's (2k, xp, & 03) mange the swap file much more efficently than windows 9x did. All this mumbo-jumbo about tweaking the swapfile came about because these old versions of windows needed to be tweaked, they had memory problems and tweaking the swapfile would improve performance and stability. But the current generation of windows has no need for tweaking the swapfile, save for some special server situations. Its a waste of time to personally manage the swapfile for a desktop/development computer.
...I see your swap is as big as mine...
"Memory is like an orgasm. It's a lot better if you don't have to fake it."
-- Seymour Cray, on virtual memory.
You are not entitled to your opinion. You are entitled to your informed opinion. -- Harlan Ellison
Are you aware of the ironic disconnect between the content of your posting (If you need to ask, you don't need to know) and the content of your .sig?
"It looks like Windows does a better job in this (not so hypothetical) case."
LOL. Windows will swap out my web browser when I'm copying a 2GB file from one drive to another.
The whole idea of kicking out real applications to increase disk cache size is absolutely retarded. Unless the cache is below some absolute minimum size, it should never, ever swap out an application just to try to cache data that I'm probably never going to use again. The operating system has no damn clue about how important a file may be so it should never be trying to make these kind of decisions for me.
Similarly, last night I left my PC running, and Microsoft Antispyware did a disk scan, which meant that Windows swapped out all the applications in order to increase the disk cache size to cache files that the Antispyware program was going to read once. It literally took five minutes of thrashing to get back to a usable system, while providing absolutely no damn benefit whatsoever.
As an Apple fanboi, I'm surprised you'd even know what a swap file is. I was thinking that, like all the other fanbois out there, you were too busy jerking off to your Steve Jobs screensaver.
#echo [0-100] > /proc/sys/vm/swappiness
I hope this is not your example of how Linux is ready for the mainstream.
Before I started this I didn't care about the answer, but now I realize that this question is as important as "Ultimate Answer to Life, the Universe, and Everything" and as I read I have realized that we humans are not powerful enough to answer this question. We should build a super computer with more VM and VA and more processors, yes, then we can ask it the question.
Just kidding all, but it was good reading