Slashdot Mirror


Why Use Virtual Memory In Modern Systems?

Cyberhwk writes "I have a system with Windows Vista Ultimate (64-bit) installed on it, and it has 4GB of RAM. However when I've been watching system performance, my system seems to divide the work between the physical RAM and the virtual memory, so I have 2GB of data in the virtual memory and another 2GB in the physical memory. Is there a reason why my system should even be using the virtual memory anymore? I would think the computer would run better if it based everything off of RAM instead of virtual memory. Any thoughts on this matter or could you explain why the system is acting this way?"

983 comments

  1. You mean physical memory right :-) by alain94040 · · Score: 5, Informative

    You must be confused about virtual vs. physical memory. In modern processors, there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

    So all the physical memory installed in your PC is used by the processor as one big pool of resources. Processes can think whatever they want and address huge memory spaces, that's all in virtual land. Virtual memory only starts impacting performance when pages are being swapped in and out, because all your processes need more resident memory than you actually have.

    Swapping means accessing the disk and freezing the requesting process until its page of memory has arrived from the disk, which takes millions of processor cycles (a lifetime from the processor's point of view). It's not so bad if you swap once, as the processor can work on other processes while waiting for the data to arrive, but if all your programs keep pushing each other out of physical memory, you get thrashing and consider yourself happy if the mouse pointer is still responsive!

    So you may want to change the title of your post to: "why use physical memory in modern systems?". I would point you to an article I wrote on that topic in 1990, but somehow I can't find a link to it on the web :-)

    fairsoftware.net - software developers share revenue from the apps they build

    1. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 5, Insightful

      You must be confused about virtual vs. physical memory.

      Indeed. When I read this story my knee jerk reaction was "please be gentle." And thankfully the first +5 post on this story is informative and helpful and relatively kind.

      I fear the "turn off your computer, put it in a box and mail it back to the manufacturer" hardcore hardware experts that are going to show up in 3 ... 2 ... 1 ...

    2. Re:You mean physical memory right :-) by Anthony_Cargile · · Score: 2, Funny

      Either he/she (wait, this is /.) thinks "Virtual Memory" is the same thing as paging, or thinks it is the reason the computer is slow with even those specs, not taking into consideration the operating system...

    3. Re:You mean physical memory right :-) by brxndxn · · Score: 4, Funny

      So do I really only need 640k of physical memory if I have a modern system?

      --
      --- We need more Ron Paul!
    4. Re:You mean physical memory right :-) by TypoNAM · · Score: 5, Insightful

      Actually no the author was correct in Microsoft's Windows' terms. This is the exact text used in System Properties -> Advanced tab under Virtual memory:
      "A paging file is an an area on the hard disk that Windows uses as if it were RAM."

      You might think well they said paging file not virtual memory, well click on Change button and you'll see the dialog pop up named "Virtual Memory" of which you can specify multiple paging files on multiple drives if you wanted to. Defaulted to a single paging file on the C:\ or boot drive. So blame Microsoft for the confusing use of virtual memory and paging file back and forth. I guess they mean by virtual memory as in the collection usage of paging files after the fact (for those situations where there's more than one paging file used, just like on Linux you can have more than one swap file in use).

      Anyway, I too have seen Windows 2000 and XP just love to make heavy use of the paging file even though there is clearly enough physical memory available. Some friends of mine have even disabled Windows from using a paging file completely, at first you will get a warning about it, but other than that they have reported better system performance and no draw backs noticed since then. This is on systems with at least 3GB of RAM.

      --
      This space is not for rent.
    5. Re:You mean physical memory right :-) by alain94040 · · Score: 5, Funny

      Gentle answers is what 6 years in customer support teaches you.

      That, or hating everyone ;-)

    6. Re:You mean physical memory right :-) by TypoNAM · · Score: 5, Informative

      Sorry, got to correct the path to where exactly I got that quote from:
      System Properties -> Advanced -> Performance area, click Settings -> Advanced tab (on Windows XP, as for 2000 its the default tab).

      --
      This space is not for rent.
    7. Re:You mean physical memory right :-) by houstonbofh · · Score: 5, Funny

      Gentle answers is what 6 years in customer support teaches you.

      That, or hating everyone ;-)

      That kind of attitude really pisses me off! ;-)

    8. Re:You mean physical memory right :-) by Dadoo · · Score: 2, Insightful

      So blame Microsoft for the confusing use of virtual memory and paging file

      I'm no Microsoft fanboy, but I don't think you can blame them for this, especially when "virtual memory" originally did mean what the OP thinks it does. I'd like to know when the definition changed.

      --
      Sit, Ubuntu, sit. Good dog.
    9. Re:You mean physical memory right :-) by Aranykai · · Score: 0

      Your right. The only thing I can figure is the term virtual memory was held over from the ol dos days, since a pagefile can function in a similar manner if the computer requires.

      This is why the fools that try to trim windows down to a tiny pagefile don't gain any considerable performance over a properly configured system with adequate pagefile.

      --
      If sharing a song makes you a pirate, what do I have to share to be a ninja?
    10. Re:You mean physical memory right :-) by jon3k · · Score: 2, Funny

      If you get your technical information from Microsoft dialog windows, I blame YOU for being wrong. You should know better.

    11. Re:You mean physical memory right :-) by pisymbol · · Score: 1

      You must be confused about virtual vs. physical memory. In modern processors, there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

      Well I would say the penalty for virtual to physical translation is mitigated by the translation units on the processor. Remember, when x86-64 came out they did away with segmentation since most operating systems (other than NT) didn't make use of it at all (pretty much all mainstream UNIX kernels map segments to cover the whole physical address space). There is certainly a penalty for lookup.

      To further the above, remember with a direct memory mapped environment there has to be a way to prevent processes from stepping over each other. As many people have noted, virtual memory allows processes to *think* they have access to the entire address space (albeit virtual one) when only a limited amount of physical memory is installed. This feature also enables a cleaner run-time and linking environment. Imagine if every program had to be linked with hard addresses, how would you manage them...

      What's interesting is that the concept of virtual memory and its benefits have now spread on a much more wider scale with complete virtualization where the entire hardware is abstracted.

    12. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      You are confusing virtual address space with "virtual memory".

    13. Re:You mean physical memory right :-) by IamTheRealMike · · Score: 1

      In modern processors, there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

      That's not quite true actually. Microsoft measured the overhead of doing page table translations and kernel mode switching at about 30%. Running things in isolated address spaces is quite expensive, it turns out, even with dedicated hardware support.

    14. Re:You mean physical memory right :-) by nategoose · · Score: 1

      If I were a betting man I'd bet that much of what is being reported as living in a page file is likely also still in RAM, but that RAM is ready to be used either for something new or for it's current contents (mirror of what's in the page file).
      It's likely that there's a bunch of stuff in each process that gets used very infrequently so the OS sees that it hasn't been changed in a while and goes ahead and puts it on the disk so that if/when that RAM is needed for something else the current contents will already be saved and no disk delay will be incurred in repurposing that RAM.

    15. Re:You mean physical memory right :-) by Reziac · · Score: 5, Interesting

      I've been running without a pagefile, in all versions of Windows, for about 10 years now -- on any machine with more than 512mb.

      The only drawback is that a few stupid Photoshop plugins whine and refuse to run, because if they don't see a pagefile, they believe there is "not enough memory" -- a holdover from the era when RAM was expensive and the pagefile was a busy place. Sometimes I think about making a very small pagefile just for them, but have never actually got around to doing it.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    16. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      another reason not to use windows...

    17. Re:You mean physical memory right :-) by hardburn · · Score: 5, Informative

      It never did change. "Virtual Memory" always meant a trick the kernel and CPU do to make programs think they are accessing a different memory address than they actually are. This trick is necessary in all multitasking operating systems.

      Once you've made the jump to mapping real memory addresses to fake ones, it's easy to map the fake addresses to a swap file on the hard drive instead of actual RAM. The confusion of the terms started when naive programmers at the UI level called that swap file "virtual memory".

      --
      Not a typewriter
    18. Re:You mean physical memory right :-) by Calibax · · Score: 4, Insightful

      No, I don't think the OP is confused.

      Back in the days of mainframes only, say before 1980 or so, all the systems I worked on (NCR, IBM and Burroughs) used the term "virtual memory" to refer to secondary memory storage on a slower device. Early on the secondary device was CRAM (Card Random Access Memory) and later it was disk.

      But the point is that Virtual Memory originally referred to main memory storage on a secondary device. Furthermore, this is still the term used for paged storage in Microsoft Windows. Check out the Properties page on the "Computer" menu item on Vista or "My Computer" icon on XP which talks about Virtual Memory when setting the size of the paging file.

      The OP is totally correct in his use of Virtual memory both by historical precedent and by current usage in Windows.

    19. Re:You mean physical memory right :-) by Cowmonaut · · Score: 1

      Mod parent up, and keep him that way.

      Also, Vista likes to try to keep 2GB in 'virtual' memory as you put it so that its readily available for your applications as needed. Like parent said, no penalty on the access times. Even with 8GB of RAM Vista will do that to 2GB of your memory, or close to. Vista seems to be using 1.72 right now.

      BTW, I really like ID software's games. They seem to really use your system well. Doom3 is one of the few older games that handles using a quad core well. Ack. Doom3 is considered older now. Oh dear, oh dear...

    20. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      your confusing virtual address space with "virtual memory" or swap in non microsoft terminology...

      in linux you can easily set a swappiness factor to decide how likely the OS is to move data to swap instead of leaving it in ram, then again, linux is much more cached than windows. that is linux uses all your ram pretty much all the time to keep things around it thinks you may need or used recently or for disk cache, etc.

      windows has its own system that decides when to use swap, don't know what its heuristic is but its, well, something i'm sure..

      my desktop has 16GB of ram running linux 2.26.27 atm, i don't think i've ever seen it use swap and i keep gkrellm up all the time.

      on my eeePC i set the swapiness factor such that even with only 1GB of ram it hardly ever uses swap, since the write performance of the flash drives in the eeePC sucks...

      in windows, you can simple get rid of the page file all together, it will run, but will brick if you ever need more ram than you actually have. with 4GB you could do this fairly easier with vista assuming your a power user type.

      cheers

    21. Re:You mean physical memory right :-) by Khyber · · Score: 1

      Don't make a pagefile.

      Tell the sloppy coders of the plugins to get their crap straight and catch up to modern times.

      --
      Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
    22. Re:You mean physical memory right :-) by ozphx · · Score: 1

      Windows will back pages on disk constantly so it can alloc pages faster by just dropping them. (It also tries to keep a pool of zeroed pages).

      Also in some circumstances it can be better to push some unused pages onto disk to embiggen (I love that word) the disk cache.

      --
      3laws: No freebies, no backsies, GTFO.
    23. Re:You mean physical memory right :-) by wellingj · · Score: 1

      It never did change. "Virtual Memory" always meant a trick the kernel and CPU do to make programs think they are accessing a different memory address than they actually are. This trick is necessary in all multitasking operating systems.

      I don't think that's true on multitasking operating systems that live on systems with less memory than is addressable by it's instruction size...

    24. Re:You mean physical memory right :-) by Reziac · · Score: 1

      I've had that thought too :)

      Alas, sometimes the plugin required is old as dirt and has no modern replacement. :(

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    25. Re:You mean physical memory right :-) by Nefarious+Wheel · · Score: 1

      Not to mention the fact that paging in Windows is the mechanism used in your memory model to load executable images in, mapped by program sections. So you may be loading programs, not necessarily swapping portions of them out. Legacy of VMS. A flat memory model is certainly possible with today's RAM volumes, but there's still a lot of logic shared between the paging mechanism and the executable interface.

      --
      Do not mock my vision of impractical footwear
    26. Re:You mean physical memory right :-) by Meumeu · · Score: 1

      It's necessary in all half decent multitasking operating systems ie. all of them except for Windows 3.1...

    27. Re:You mean physical memory right :-) by AuMatar · · Score: 1

      It is if you don't want some very weird fragmentation issues. If your multitasking OS has no virtual memory, you can't use any address used by any other app which is bound to make large allocations hard and majorly screw up the stack. With it, you can allocate memory wherever you want and fit it wherever physical ram has room.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    28. Re:You mean physical memory right :-) by Gibsnag · · Score: 1, Offtopic

      Thanks for the tip. I shall have a fiddle around on my Server 2k8 system, as I've got 8GB of RAM so I really do not need a page file.

    29. Re:You mean physical memory right :-) by lgw · · Score: 1

      Imagine if every program had to be linked with hard addresses, how would you manage them...

      This is a far better system, if you don't need a pagefile. There was a time when all OSs worked this way, and some still do. Programs are "relocated" at load, using a relocation table to correct any hard-coded addresses. This still happens for Windows DLLs, and on a modern system it's a trivial processing cost.

      The payoff for not using virtual addressing is that (a) you can't have a pagefault, which just simplifies kernel code all around, and (b) generally when you pass a pointer to a kernel routine (e.g, I/O operations), the kernel has to translate the memory address form virtual to physical, which gets messy sometimes.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    30. Re:You mean physical memory right :-) by Pharmboy · · Score: 1

      I'm running 3gb of ram on a laptop with Vista (it came used with it.) that I dual boot with Linux. I run no swap with Vista because it is too aggressive about using it. I have 1gb of swap for Linux, although I would expect it would never get used and Linux doesn't get greedy with swap. On a side note, it was my first install of Ubuntu (used to CentOS), which is pretty weird but nice. Just haven't gotten the wifi to work yet (1 week).

      --
      Tequila: It's not just for breakfast anymore!
    31. Re:You mean physical memory right :-) by aoheno · · Score: 1

      Lets put our 4TiB database into this new fangled virtual memory Microsoft has come up with, before the competition catches on.

      --
      Her lips were softer than a duck's bill, but her quacks ...
    32. Re:You mean physical memory right :-) by hardburn · · Score: 1

      To add to the other replies, what you're suggesting is basically what TSR programs on DOS did. Basically, the OS would mark the sections of memory used by the TSR as unusable, and any other programs were expected to work around those areas.

      Wikipedia has a pretty good rundown of the problems with this method. We should all be glad that those days are far behind us.

      --
      Not a typewriter
    33. Re:You mean physical memory right :-) by anexkahn · · Score: 1

      As long as you dont want to read the dump files on your computer. I frequently use dump files to trouble shoot problems

      --
      Curious about Storage and Virtualization? Check out
    34. Re:You mean physical memory right :-) by 0xABADC0DA · · Score: 2, Insightful

      Virtual memory only starts impacting performance when pages are being swapped in and out, because all your processes need more resident memory than you actually have.

      Actually, virtual memory adds quite a bit of overhead to everything the processor does. Just using virtual memory slows down the processor by ~6%, and using it in a traditional OS (separate page tables, processes isolated using virtual memory) slows it down by ~20%. These numbers are from Singularity research, fyi, and don't even count the memory cost from the page tables.

      So the question I'd ask is why use virtual memory in a modern system?

      Singularity, jxos, JavaOS show that it is not necessary or efficient to run programs using 1970s style protection domains. The actual answer is "because of network effects." So much code is written that requires memory protection that we have to also use virtual memory. Oh yeah, and Dvorak keyboard is better than qwerty you free market uber alles freaks!

    35. Re:You mean physical memory right :-) by Reziac · · Score: 1

      People sure do get hung up on the subject, eh? Just turn swap off, and if it don't work right without it, turn it back on. D'oh!!

      On your other note... I couldn't get Ubuntu 8.x to install on my test box (which ran U-5/6/7 just fine). Mandriva 2009 with KDE runs okay too, but MDK2009 with Gnome also failed to install. Both fails bogged down when trying to prep the HD. Appears something's wrong between these latest Gnome-bearing distros and that machine's hardware, but damned if I know what -- and it's not THAT old!

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    36. Re:You mean physical memory right :-) by Creepy · · Score: 0, Troll

      You and grandparent obviously haven't worked tech support. The only time you really get angry is when you get your third call in a row for something like a full reinstall of Windows while management is monitoring your call times (and each takes 2-3 hours - so much for your 20 minute average).

      What you do realize is 99% of the human population is dumber than headless chickens. Then you gather up all the idiotic stories from the people you talked to that day and share them in the break room. The old jokes about the footpedal, drink holder, and trying to use the computer in a blackout? Not even scratching the surface of people I've talked to on tech support...

    37. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      You've obviously never worked desktop support!

    38. Re:You mean physical memory right :-) by nmb3000 · · Score: 5, Informative

      Either he/she thinks "Virtual Memory" is the same thing as paging

      Physical memory, virtual memory, address space, and paging files are some of the most misunderstood things your average computer "expert" deals with. When it comes to Windows, few can probably explain why only 3GB of 4GB physical RAM shows up on a 32-bit system. Fewer even can probably define the difference between "virtual memory" and "paging file".

      I highly recommend any Windows users or administrators read Mark Russinovich's latest blog entry Pushing the Limits of Windows: Virtual Memory . It goes over all these things and describes the difference between virtual memory, committed memory, and why it really is important to have a paging file, even on that system with 8GB of physical RAM. Should be required reading for any Windows admin.

      --
      "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
      /)
    39. Re:You mean physical memory right :-) by mR.bRiGhTsId3 · · Score: 1

      No, it is not necessary on a multiprogramming environment. Older CPUs/OSs made do fine with primitive Memory Management Units that supported only base/limit address enforcement.

    40. Re:You mean physical memory right :-) by weighn · · Score: 4, Funny

      That kind of attitude really pisses me off! ;-)

      yes, I detest being gently hated by patronising tech support heroes

      --
      Mongrel News all the news that fits and froths
    41. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      I think that you must also be confused on the definition of virtual memory.

      In a windows system, virtual memory is stored on a disk like swap. Because a rotating disk is much slower than that of RAM transfers there is a hit to performance. See wikipedia entry.

      Virtual memory size in windows can be adjusted from the system settings. Right click on the my computer icon and go to the advanced settings tab in Vista. I am sure that it is similar in XP.

    42. Re:You mean physical memory right :-) by petermgreen · · Score: 1

      This is a far better system, if you don't need a pagefile. There was a time when all OSs worked this way, and some still do. Programs are "relocated" at load, using a relocation table to correct any hard-coded addresses.
      If everything must be relocated on load that means you cant share anything between processes. That is pretty wastefull of ram and (perhaps more importantly) cache.

      Also there is the fragmentation issue, if an app wants a big block of ram under a paging based system it can get it because what looks like a contiguous block to the app doesn't have to be a contiguous block in physical memory. Under a physical address based system if there is no contiguous block of memory big enough for your request then your request will fail even if the total memory free is plenty.

      (a) you can't have a pagefault, which just simplifies kernel code all around,
      Afaict if you want memory protection (and IMO memory protection is a VERY good thing) you would still need to use the page tables and deal with pagefaults.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    43. Re:You mean physical memory right :-) by ChrisA90278 · · Score: 4, Informative

      "I've been running without a pagefile, in all versions of Windows,..."

      Not really. On a modern OS when executable code is loaded from disk to RAM. It isn't really loaded. What they do is map the file that holds the code into virtual memory. So in effect when you run a program called "foobar.exe" you have made that file a swap file. It gets better. The OS never has to copy pages out of ram because the data is already in foobar.exe. When the OS needs space it can re-use the pages without need to write them to a swap file because it knows where to get the data.

      So yu are in effect using as many swap files as programs you are running

    44. Re:You mean physical memory right :-) by Bert64 · · Score: 3, Informative

      AmigaOS multitasked, and didn't use memory mapping like that...
      It had a flat memory model, and ran on processors which lacked the necessary memory management hardware.

      If you did have an upgraded cpu with MMU, then there were third party virtual memory addons.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    45. Re:You mean physical memory right :-) by Bert64 · · Score: 1

      Tried a 64bit version?
      I had a few machines that had major troubles running 32bit, but ran fine with 64... I can only imagine these modern machines are not well tested for running 32bit stuff.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    46. Re:You mean physical memory right :-) by Sj0 · · Score: 0, Offtopic

      Oh, great swami, please enlighten us fools.

      You install windows, then the drivers. Next, you time the boot. After that, you time the boot with swap disabled. Why, oh sawmi, is it slower?

      --
      It's been a long time.
    47. Re:You mean physical memory right :-) by lgw · · Score: 1

      An access violation is different from a pagefault. Kernel code doesn't get access violations - it can destroy any processes memory.

      Pagefaults are a pain because they can cause unexpected priority inversions - you're running at an interrupt level (dispatch level, whatever) too high (or low, whatever) to do disk I/O, so if you accidentally access a page that's paged out (either through explict memory access, or just executing the next instruction), things fail in creative ways. It's not a big deal to prevent this - that's what non-paged pool is for - but overall it's a hassle to even need the *concept* of non-paged pool, as well as worrying about whether or not every single system call is safe.

      The point on memory fragmentation is a good one, though. An even better point is that all heap memory, stack addresses, and program load addresses need to be randomized within a 64-bit address space for security reasons. Fortunately we can junk the idea of a page file (and pagefaults) without losing the handy aspects of virtual memory. You'll still want to relocate progams (to a randomly chosen start address) on load, however.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    48. Re:You mean physical memory right :-) by Sj0 · · Score: 1

      Why do you frequently have problems of the sort that a memory dump is created?

      --
      It's been a long time.
    49. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      This is true, but Windows isn't referring to Virtual Memory like that, it's simply referring to a swap file.

    50. Re:You mean physical memory right :-) by belg4mit · · Score: 2, Informative

      >The confusion of the terms started when naive programmers at the UI level called that swap
      >file "virtual memory".
      No, the confusion started before that when someone thought it was a good idea to use the
      term virtual to apply to something real. In colloquial English virtual is synonymous
      with pseudo. Obviously a swap-file is "pseudo memory" and not real RAM. A more accurate
      term for "virtual memory" would be "remapped" or even (though less informative) "aliased."

      On a related note, it wouldn't surprise me if swap-files played into the luser tendency to
      call disks "memory."

      --
      Were that I say, pancakes?
    51. Re:You mean physical memory right :-) by Sj0 · · Score: 1

      Windows won't brick if you run out of physical memory. At worst, it'll throw an error message to the program when it tries to allocate memory. If the program ignores the error message, at worst that program will crash.

      It won't brick, however.

      --
      It's been a long time.
    52. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 1, Insightful

      I think that "Virtual memory" is a correct designation for the swap file. Don't confuse with "virtual address space".

      If you think this through, it's simple and logical; real memory is RAM, of course, and *virtual* memory must be something that acts as RAM, but it's not. The virtual address space is NOT memory, it's just a location where real (RAM) or virtual (disk) memory is mapped to.

    53. Re:You mean physical memory right :-) by blincoln · · Score: 4, Insightful

      What you do realize is 99% of the human population is dumber than headless chickens.

      Most people are not incredibly knowledgeable about computers. There's a big difference. Pretty much everyone is very good at something. That's why some people get paid to sell merchandise, design hardware, repair engines, cook food, synthesize chemicals, or perform surgery, and others get paid to solve computer problems.

      --
      "...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
    54. Re:You mean physical memory right :-) by blincoln · · Score: 2, Informative

      In colloquial English virtual is synonymous with pseudo.

      That's how it's being used here too. A program thinks it's reading and writing to a contiguous block of memory at a particular address. That continuous block of memory doesn't really exist, and if it's being paged then there isn't even physical memory being accessed.
      Would you argue that VMWare's name is a misnomer just because real electronic computer hardware is involved and not some bizarre substitute like hydraulic logic?

      --
      "...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
    55. Re:You mean physical memory right :-) by Digital+Vomit · · Score: 4, Funny

      When I read this story my knee jerk reaction was "please be gentle." And thankfully the first +5 post on this story is informative and helpful and relatively kind.

      It's a Christmas miracle!

      --
      Modern copyright is theft of culture from everyone and it retards the progress of the useful arts and sciences.
    56. Re:You mean physical memory right :-) by qw0ntum · · Score: 5, Informative

      I know it was a joke but actually, in an oversimplified sense, yes. A main point of virtual memory in its true sense is to abstract the limitations of your amount of physical memory away from user programs, and instead present them with an effectively limitless virtual address space with which to work with. When the program says, "read from memory address 0x(some huge number)", the OS/memory management unit will translate that address request from a virtual page address to a physical frame via the page table. If there is no frame in memory that contains the data pointed to by the requested address, that's when you have a page fault. Then the operating goes to disk and fetches the data you requested.

      Your performance would be abysmally slow, and obviously probably wouldn't work at all with modern operating systems (just a theoretical point here!), but assuming a good implementation of virtual memory you should be able to run everything just fine. Of course, if you don't have enough disk space for your address space, you'll run into problems. :)

      --
      'Every story, if continued long enough, ends in death.' --Ernest Hemingway
    57. Re:You mean physical memory right :-) by condition-label-red · · Score: 1

      From Mark Russinovich's blog (SysInternals.com) -- an excellent description of Windows memory categories and their limitations; and tips on sizing the page file:

      --
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    58. Re:You mean physical memory right :-) by mikael_j · · Score: 5, Informative

      Clearly someone has never done tech support, and I don't mean "helped friends/relatives fix something" I mean in the trenches, taking calls all day long, every day.

      Trust me on this one, there are lots of really stupid people out there, and sadly tech support is a great place to find out that being intelligent and friendly don't help when you're faced with some guy with a "fancy" last name, an e-mail address that indicates that he is a partner at a well-known law firm and serious entitlement issues ("I WANT THIS FIXED NOW YOU GOD DAMN MOTHERFUCKING HIGH SCHOOL DROPOUT LOSER PUNK DO YOU HAVE ANY IDEA HOW MUCH MONEY I'M LOSING EVERY HOUR THAT MY (residential $15/month DSL) BROADBAND ISN'T WORKING I'M GONNA FILE A FUCKING LAWSUIT I WANT A FUCKING SUPERVISOR RIGHT GOD DAMN NOW YOU SHITHEAD LAZY KNOW-NOTHIN....", well you get the point). Also, when there's an outage these are the people who make you aware of the outage before the NOC calls to tell you about it because within 30 seconds of their DSL going down there's going to be about 50 of these people waiting to yell at you for the DSLAM getting destroyed by a direct lightning strike (and yeah, I've had to deal with something like 50% of the idiots who called about that particular outage demanding to speak to a supervisor because they felt I wasn't doing my job when I explained that it would take several days to repair the building the DSLAM was housed in before a replacement DSLAM could be installed. Also, this is the kind of person who works as a lawyer while somehow being unaware of the term "force majeure").

      To sum it up: There are lots of stupid assholes out there, it's not just plain stupidity due to genetic factors, there's also the issue of people who simply choose to stay uneducated about even the most basic computer skills (while relying on their computer to do their job) like understanding the difference between "a program" and "a website" or how to find the start menu in WinXP/Vista...

      /Mikael

      --
      Greylisting is to SMTP as NAT is to IPv4
    59. Re:You mean physical memory right :-) by kaizokuace · · Score: 2, Funny

      I can do all those and more. Where do I fit in society?

      --
      Balderdash!
    60. Re:You mean physical memory right :-) by Siridar · · Score: 5, Insightful

      I'm fine with folks not knowing about computers. That's cool. The thing that annoys me, though, is that they're /proud/ of it. Its like its a badge of honor! Any sort of discussion about computer issues will always bring up some yahoo who says "Oh, I don't know a /thing/ about that! hur hur, in my day, all we had was pen and paper..." etc etc etc. The fact is, knowledge - basic knowledge - of computers is only going to get more important. Hiding your head under a rock isn't going to magically make it go away.

      And its not the age thing, either - I've got a friend who is in his 70's, and his knowledge of technical things is way up there - he's a pure linux guy, uses myth to serve TV content all around the house, and is a very active member in the local unix club. Some people just don't seem to want to learn the basics.

    61. Re:You mean physical memory right :-) by ncgnu08 · · Score: 0

      Gentle answers is what 6 years in customer support teaches you.

      That, or hating everyone ;-)

      That kind of attitude really pisses me off! ;-)

      I both agree and appreciate your answer houstonbofh. I worked in sales/design for a major computer company, and since we actually had a storefront, customers were constantly walking in for help. Learning to be simple, concise, and kind in your answers goes a long way. Plus, remaining calm reinforces the idea you are a "professional." Everyone wins; it does get very hard to do when you are answering a question for the 372nd time ;)

      --
      Member of American Sarcasm Society - Motto: "Like we need your help!"
    62. Re:You mean physical memory right :-) by dnoyeb · · Score: 1

      Virtual memory != virtual address space.

      I can understand calling a swap file, virtual RAM.

    63. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Funny, I get 3.5 GBs of RAM on both of my 32-bit machines.

    64. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      You must be confused about virtual vs. physical memory. In modern processors, there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

      So all the physical memory installed in your PC is used by the processor as one big pool of resources. Processes can think whatever they want and address huge memory spaces, that's all in virtual land. Virtual memory only starts impacting performance when pages are being swapped in and out, because all your processes need more resident memory than you actually have.

      Swapping means accessing the disk and freezing the requesting process until its page of memory has arrived from the disk, which takes millions of processor cycles (a lifetime from the processor's point of view). It's not so bad if you swap once, as the processor can work on other processes while waiting for the data to arrive, but if all your programs keep pushing each other out of physical memory, you get thrashing and consider yourself happy if the mouse pointer is still responsive!

      So you may want to change the title of your post to: "why use physical memory in modern systems?". I would point you to an article I wrote on that topic in 1990, but somehow I can't find a link to it on the web :-)

      fairsoftware.net - software developers share revenue from the apps they build

      You sir (the first reply), are confusing terms. Your discussing the benefits of Virtual Addressing vs. Physical Addressing. Which is butchering the meaning of the OP's question. The OP is simply refering to Paging out to disk (Windows calls it Virtual Memory), which is basically "Memory" that isn't physical RAM (Virtual)- hence the name. Stop confusing the OP with Addressing schemas- that you could certainly word better too.

    65. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      I know it wasn't intentional and you could proably care less (just like me and spelling) but way to double the karma by doubling your post

    66. Re:You mean physical memory right :-) by fractoid · · Score: 1

      You're right, in that the hardware does the work in accessing the actual bits for a given piece of virtual memory. I think what TFA is really asking is, "Why the hell does Windows keep more than half of my 2GB of memory free when it's grinding the hard drive paging things in and out?". I used to get this all the time in XP too - I have two windows open (IE and VC++ or whatever) and whenever I switch between them I have to wait for a second or so of furious disk activity. There's no reason to be paging out any of either of the running applications' address space given that I've got over 1GB of unused physical RAM just sitting there wasting electrons.

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    67. Re:You mean physical memory right :-) by Desert+Raven · · Score: 3, Informative

      Been there, feel your pain. But trust me, there's worse.

      If you REALLY want to lose faith in humanity, work in emergency services. I spent 6 years in medicine, and two years in law enforcement. You truly get to meet the scrapings of the gene pool that way.

    68. Re:You mean physical memory right :-) by Reziac · · Score: 2, Informative

      That's a unique perspective :)

      But I suppose technically correct, unless you load the entire image into memory, frex on a system with no hard disk, or with the current live CDs.

      Back in the early '90s, a friend's dad had such a system in his gov't job, as a security measure -- it had a gig of RAM (then worth somewhere over $25,000) and NO hard disk. He loaded the OS and apps from tape every time he used the machine.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    69. Re:You mean physical memory right :-) by LeadTech · · Score: 1

      I've been running without a pagefile, in all versions of Windows, for about 10 years now -- on any machine with more than 512mb.

      Just don't install Norton 360.

    70. Re:You mean physical memory right :-) by fractoid · · Score: 1

      Disk space IS "memory". It's even RAM (Random Access Memory, you can access it in any order). Just because it's not the particular type of memory that you think of when you say that doesn't mean that it's not memory.

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    71. Re:You mean physical memory right :-) by The+MAZZTer · · Score: 1

      Try making a blank C:\pagefile.sys file and see if that helps?

    72. Re:You mean physical memory right :-) by Reziac · · Score: 1

      I don't have any 64bit CPUs here (yep, I live in a cave :) -- and I thought that was required to run the 64bit version??

      My linux test machine is a P4-2GHz, 512mb RAM, Jetway mobo (very ordinary), 3dfx Voodoo 4500 video card -- I *think* that last is what it's hanging up on, per one of the few coherent error messages, but that doesn't explain why the disk partitioner throws up (it's only a 17GB HD, nothing special), or worse, goes thru the motions but nothing actually happens (except that it nukes the previous install, if any).

      Do have to say, Mandriva 2009 was sure sluggish on this machine.... Ubuntu 5 was too, but 6 and 7 were fine. And they all did whatever the hell they wanted with their swap space, I have no idea :)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    73. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Windows doesn't actually USE the page file during processing, it copies the contents of your RAM to the page file in small bits when it sees that the hard drive is idle as a preventative measure. This way if you run out of RAM and find yourself actually needing the page file, you don't need to wait for data to be copied from RAM to page file before loading the new data in, Windows can instantly declare whatever is in RAM that's already copied as available in one quick action.

      Linux and Unix on the other hand only use the page file when they need to. This leaves your hard drive idle, which if you've got an old system that requires the CPU to handle RAM->hard drive data transfer, will provide a performance boost, but leaves an unpleasant performance hit when new the page file is needed.

      There's undoubtedly an option in both OSes to let them operate like the other if you Google around enough.

    74. Re:You mean physical memory right :-) by Jonboy+X · · Score: 0, Offtopic

      As computers get more intuitive and easier to use there will be less need for tech support. Until then, all users have is experience to guide them.

      However, dumb and/or timid people *do* tend to shy away from computers in general, which only compounds the problem. Making fun of them sure can be fun though.

      --

      "In a 32-bit world, you're a 2-bit user. You've got your own newsgroup, alt.total.loser." -Weird Al
    75. Re:You mean physical memory right :-) by stinkbomb · · Score: 1

      Hey knob, I turned off sigs for a reason. Stop forcing your stupid ad on me.

    76. Re:You mean physical memory right :-) by Reziac · · Score: 1

      I wouldn't install Norton-anything on my worst enemy's machine... unless I couldn't find something worse :D

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    77. Re:You mean physical memory right :-) by ChangelingJane · · Score: 1

      The Cult of Stupid spreads far beyond computers, sadly. Nobody wants to be a nerd.

    78. Re:You mean physical memory right :-) by Reziac · · Score: 1

      Ha, that's a clever idea. It would need to be at least 25mb, tho, as I recall that's the minimum size that these old plugins look for. Anyway, I'll have to try it, what the hell... if they don't actually query Windows, it may be enough to fool 'em.

      Would sure be weird if for some unknown reason the plugins actually tried to make Windows write to it :)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    79. Re:You mean physical memory right :-) by ChangelingJane · · Score: 5, Insightful

      Part of it too is that *everybody* has their stupid moments. The kind where, afterward, you realize just how dumb you were. Some like to pretend they've never been guilty of it, but they're often the worst offenders. (Same goes for doing asinine things while driving.)

    80. Re:You mean physical memory right :-) by GeffDE · · Score: 1

      The Cult of Stupid spreads far beyond computers, sadly. Nobody wants to be a nerd seem like they know anything.

      There, FTFY.

      --
      It has been a nervous year, with people beginning to feel like Christian Scientists with appendicitis.
    81. Re:You mean physical memory right :-) by scumdamn · · Score: 1

      I loved it when they'd let us handle two calls at a time. Put user on hold, tell the other one to click next until the files start copying, go back, repeat. Hello 5 calls per hour!

    82. Re:You mean physical memory right :-) by Just+Some+Guy · · Score: 2, Insightful

      Most people are not incredibly knowledgeable about computers. There's a big difference.

      Well, when you work tech support for any length of time, you learn that many people utterly lack any problem-solving skills. Geeks often equate problem-solving skills with intelligence, hence the (not unreasonable) impression that many people are not very smart.

      Example: people calling to complain that the ISP I worked for sucked and was a pack of incompetent jackasses because they couldn't dial in. More specifically, they could not turn their computer on. This was because lightning had struck the house and destroyed the entertainment center and kitchen appliance, and presumably their computer as well. Their interpretation of events was that they couldn't turn on their computer because we ran a poor ISP.

      Granted, the perception is exacerbated because by definition you only get the people unable to fix their own problems. Still, it's hard to answer "do I have to plug in my CPU (modem) to check my email?" a few hundred times without losing a little faith in humanity.

      --
      Dewey, what part of this looks like authorities should be involved?
    83. Re:You mean physical memory right :-) by Mr+Z · · Score: 1

      I think the term "virtual memory" in this context is just referring to the fact that this dialog allows you to view and change virtual memory related settings. In this case, you only have control over your paging file, so that's the only available setting. If there were other virtual memory knobs, I can imagine them placing those under the virtual memory dialog.

    84. Re:You mean physical memory right :-) by shemp42 · · Score: 1

      I love your response man. Its not that they are stupid, its that they are stupid and demanding and demeaning to you. They dont know what the hell they are talking about and yet they tell you how to do your job. Its even better when the CEO wants to know why he cant have enterprise admin privledges. Try explaining that one!

    85. Re:You mean physical memory right :-) by Rary · · Score: 1

      That's not stupidity. You said it yourself, the problem is a sense of entitlement.

      Pretty much all of the world's problems can be traced back to that.

      --

      "You cannot simultaneously prevent and prepare for war." -- Albert Einstein

    86. Re:You mean physical memory right :-) by Mr.+Slippery · · Score: 3, Informative

      I spent 6 years in medicine, and two years in law enforcement. You truly get to meet the scrapings of the gene pool that way.

      Hmmm. Judging by what I've been seeing lately, I'm not sure if you're referring to suspects or to your law enforcement co-workers...

      Perhaps I'm unfairly projecting the situation in Baltimore. A friend of mine was recently beaten and arrested by Baltimore cops for participating in a nonviolent animal rights demonstration, and a few weeks later a friend of hers, an acquaintance of mine, was arrested for trying to film Baltimore cops threatening and harassing her boyfriend. I've seen Baltimore cops arrive on the scene of a disturbance, grab a guy who wasn't involved and slam him against the wall, assault another guy who was only involved peripherally, let the instigators go, and completely ignore a witness who attempted to tell them what was going on.

      No wonder that Baltimore citizens have no trust in their police force.

      I know there's at least one intelligent and decent human being serving on the BCPD, but the environment seems to be corroding his soul.

      I hope higher standards were in place where you served.

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    87. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Don't do it... You will get all those stupid nanny messages about your machine running low on virtual memory.

    88. Re:You mean physical memory right :-) by dadragon · · Score: 1

      The phone company I used to work for kept hot spares of DSLAMs available, I think it was two at any given time. I remember about 6 months ago a drunk driver smashed one to smithereens and they had it back up and running in under four hours. I was pretty impressed because it looked like the underground cable was damaged too.

      --
      God save our Queen, and Heaven bless The Maple Leaf Forever!
    89. Re:You mean physical memory right :-) by Stormie · · Score: 3, Informative

      AmigaOS multitasked, and didn't use memory mapping like that... It had a flat memory model, and ran on processors which lacked the necessary memory management hardware.

      And paid the price, in the form of one program being able to trample another's memory, or crash the whole system (hence the famous Guru Meditation).

      The Amiga was actually the first thing I thought of when I read this Ask Slashdot - you may recall the immense prejudice against virtual memory from a lot of Amiga users, who thought that virtual memory simply meant swapping to disk. They didn't realise that releasing a range of Amigas which all had MMUs (i.e. non-crippled 030+ CPUs) and a version of the OS with virtual memory would cure a number of ills completely unrelated to swapping, such as memory fragmentation and the aforementioned ability of one rogue program to bring down the system.

    90. Re:You mean physical memory right :-) by drachenstern · · Score: 1

      I sorely hope this were a joke....

      That would be at least three kinds of a bad idea

      --
      2^3 * 31 * 647
    91. Re:You mean physical memory right :-) by Fallingcow · · Score: 4, Informative

      Just haven't gotten the wifi to work yet (1 week).

      Have you tried NDISWrapper?

      You can install it through Synaptic, the graphical package installation program.

      You'll need a Windows XP driver (some others might work, too, but XP is the best one to try first, in my experience) for your wireless card, and it needs to be in a zip file or similar (that is, not a .exe installer, since you need access to the installation files).

      Unzip the drivers to a folder. Make sure there's at least one .inf file in it, and if there's more than one, figure out which one looks like it's for your card (sometimes they put drivers for several different ones in a single archive)

      Open a console. You will be typing just two commands:

      sudo ndiswrapper -i /path/to/the/driver.inf
      sudo ndiswrapper -m

      The first command installs the driver, the second sets it to start at boot.

      If it still doesn't work after a reboot, make sure you've got the right driver, and maybe try one for another version of Windows. Some just won't work period, but many (most?) will.

      You can look at the man page for ndiswrapper if you need more info.

      If you need extra info on your wireless card to help you find the Windows driver, try the command "lspci" at the command line, your card should be somewhere on the resulting list of hardware.

    92. Re:You mean physical memory right :-) by UnRDJ · · Score: 1

      Wouldn't it be more like "Why use swap space in modern systems?" then? Or where you trying to point out the fact that virtual memory references all physical memory and swap space, and therefore the title in that context sounds like "why use physical memory in modern systems?" I can't imagine that he was wondering why modern systems have physical RAM.

    93. Re:You mean physical memory right :-) by barrkel · · Score: 1

      In modern processors, there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

      That's not quite true; the CPU adjustments do have a cost, ameliorated by caches such as the TLB, but physical memory is so slow these days that you don't notice how slow virtual memory is.

      To get good performance, you have to hit L1/2[/3] cache; if you fall back to physical memory you've already lost, never mind the translation overhead.

    94. Re:You mean physical memory right :-) by MaxVT · · Score: 2, Funny

      Tell the CEO those privileges are intended for his admin assistants only. The CEO is rightfully entitled to "Power User".

    95. Re:You mean physical memory right :-) by psetzer · · Score: 1

      I figured they just kept one zeroed page and made it copy-on-write so that it's not actually cleared out until it's actually needed. That way if you decide that you want every program you run to have a 32 MB stack and they only use 128 kB on average, they've all got room to grow without using much real RAM. It also eliminates the need to handle a special zeroing operation since copy-on-write of a zero page would do the exact same thing.

      --
      "Anyone who attempts to generate random numbers by deterministic means is living in a state of sin." -- John von Neumann
    96. Re:You mean physical memory right :-) by spymagician · · Score: 1

      Most modern games will easily chew up the Video RAM, much of the system RAM and a large portion of any page file on the system. In practice, most load massive textural data to the pagefile, which is why many mid to low range systems experience "hitching" as you move through the game world. Hitching is the slight pause or stutter you experience as data is moved from the pagefile to RAM. In short, you simply cannot run most modern games from memory only. With the available address space of 64 bit processing and OSes this *could* change, but more than likely the same practice will continue.

    97. Re:You mean physical memory right :-) by beav007 · · Score: 1

      Strange. I do onsite tech support, and I'm an Ambulance Officer. Maybe we're just beggars for punishment?

    98. Re:You mean physical memory right :-) by mombodog · · Score: 5, Funny

      "two years in law enforcement.. You truly get to meet the scrapings of the gene pool that way "
      Hey, they gave you a gun and ammo to narrow the gene pool, what happened?

    99. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      So do I really only need 640k of physical memory if I have a modern system?

      Actually anything more than 128Kb is bloat.

      NASA Launched the Apollo Missions with a 16kb memory.

    100. Re:You mean physical memory right :-) by dalesmatrix · · Score: 1

      I was under the impression that even if you set the pagefile setting to 0 in XP that windows is still actually using a page file, just not in a set location (ie dynamically creates it). So it's actually slower as the pagefile isn't up the front of the drive and is fairly fragmented. Anyone in the know know if this is correct?

    101. Re:You mean physical memory right :-) by The+Mighty+Buzzard · · Score: 4, Insightful

      Never going to happen.

      When cars were first sold to the public, if you bought one you'd damned well better know how to fix it yourself. Fast forward to now. Plenty of idiots still buy cars and are completely fucked when it comes time to do something as minor as changing the oil or spark plugs. </gratuitous car analogy>

      That's around a hundred years of people refusing to learn really simple shit. What makes you think it will be different with computers over a shorter timespan?

      --
      Violence is like duct tape. If it doesn't solve the problem, you didn't use enough.
    102. Re:You mean physical memory right :-) by cyphercell · · Score: 1

      Well put, but you forgot to mention the psychosis some people get with computer problem stress.

      Personally, I think botnets are proof that people should be licensed before they are allowed to connect to the Internet by themselves. The whole industry seems to think it should cater to the lowest common denominator, I disagree. I say kick them the fuck out. Just like someone that drives like shit isn't allowed on the road.

      --
      Under the influence of Post-Cyberpunk Gonzo Journalism
    103. Re:You mean physical memory right :-) by Kaz+Kylheku · · Score: 1

      In modern processors, there is no penalty for using virtual memory

      This is incorrect. Virtual address translation imposes overheads, in some cases severe.

      The performance of virtual memory depends on the TLB. The TLB has a fixed size and can span only so much virtual memory. What's worse, TLB's are rarely fully associative. So certain patterns of page access can thrash a TLB entry. On some architectures, the TLB is direct mapped. This means that each page is assigned to a fixed position in the TLB cache. If some code alternately works with just two pages that map to the same TLB entry, there will a stream of TLB misses. E.g. a word-by-word memcpy from one page to the other will be orders of magnitude slower than a copy through a large temporary buffer.

      all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

      Notice the difference compared to what? When was the last time you were able to run a version of your operating system without virtual memory management enabled?

    104. Re:You mean physical memory right :-) by ozphx · · Score: 1

      Unfortunately on a multiuser system you don't want people allocing a bunch of ram and just reading everyone's data out of it.

      --
      3laws: No freebies, no backsies, GTFO.
    105. Re:You mean physical memory right :-) by Eskarel · · Score: 2, Interesting

      Yeah, and get the sack because you hung up on 90% of your callers.
      People treat tech support like shit. Sometimes it's because they're assholes and sometimes it's because the policies at the place they're calling mean you can't do anything else.
      I treated Dell tech support people like dirt not because I wanted to, but because it was the only way to bypass the "I'm paid to not send a tech out" policy Dell had put in place. I didn't want their help, or their support knowledge, I wanted them to send a tech out to replace the part that had broken, or to send me a new part so I can do it myself, I'd already done all the diagnostics.

    106. Re:You mean physical memory right :-) by Free+the+Cowards · · Score: 1

      Those network effects you look down on so much are probably responsible for far more than a 20% performance gain due to additional research dollars being available.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    107. Re:You mean physical memory right :-) by Hal_Porter · · Score: 1

      Does anyone else get the impression that Mark Russinovitch is being groomed to take over from David Cutler? He's like St Peter to Cutler's Jesus. And like Peter I think he will be much harder on the heretics, which is needed right now in these dark days of Vista underperforming and Ubuntu on netbooks. I guess they are similar of the Romans persecution of early Christians.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    108. Re:You mean physical memory right :-) by sjames · · Score: 1

      However incorrect, many people think that virtual memory is a synonym for swap.

      Perhaps the question would be more clear as "Why use swap in modern systems?".

    109. Re:You mean physical memory right :-) by Talon88 · · Score: 1

      Two as an EMT so far, and three as HelpDesk for a major university.

      I have a running tally on encounters with the dregs of humanity...and so far, I agree with you, EMS introduces you to those that computer-idiots have nothing on.

      But on the other hand, EMS also tends to be more fulfilling - 'I troubleshot his network issue' is not as feel-good as 'I saved her life'.

    110. Re:You mean physical memory right :-) by afidel · · Score: 1

      Do you drive? The reason I ask is you seem to think that there is someone actually getting the idiot drivers off the road! There isn't a week that goes by that I don't come into work and complain about the general stupidity of the people I share the roads with during my commute. By comparison the number of WTF moments I have with my userbase is probably more like 1-2 per month, but this company seems to be better than most I have worked at (or perhaps it's the fact that I don't field frontline calls anymore and so the things I work on are generally actually broken).

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    111. Re:You mean physical memory right :-) by Whiteox · · Score: 1

      I used to get away with it by creating a ram drive. It worked well on pre XP os'
      Much harder to do with XP though.

      --
      Don't be apathetic. Procrastinate!
    112. Re:You mean physical memory right :-) by sameerds · · Score: 1

      I highly recommend any Windows users or administrators read Mark Russinovich's latest blog entry Pushing the Limits of Windows: Virtual Memory . It goes over all these things and describes the difference between virtual memory, committed memory, and why it really is important to have a paging file, even on that system with 8GB of physical RAM.

      Ok, I decided to go and check out the linked article. Here's what he has to say (emphasis mine):

      Some feel having no paging file results in better performance, but in general, having a paging file means Windows can write pages on the modified list (which represent pages that aren't being accessed actively but have not been saved to disk) out to the paging file, thus making that memory available for more useful purposes (processes or file cache).

      I am not an expert at systems, but seems to me that he is saying that Windows tries to write disk buffers ("file cache"?) to the pagefile in order to make more space. That sounds quite stupid. Even if that is not the intended meaning, he still says that having a page file allows the system to swap out less actively accessed pages to the disk. But he misses the point then: people who disable page files for better performance want to disable exactly this behaviour. They don't want the system to swap out less active programs.

    113. Re:You mean physical memory right :-) by Metasquares · · Score: 1

      You don't. Change it.

    114. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      probably responsible for far more than a 20% performance gain due to additional research dollars being available.

      "Probably" != "measured". Performance loss from virtual memory was measured by experiment. You know, science. Computer science.

      "Network effects" would create performance gain whether they are locking you in to a VM-less or a VM-required system. The only difference is the VM-less one would end up being faster.

      The invisible hand of the free market is a differential equation... it does the best it can given where it is at the moment, but that does not always end up being optimal. Maybe when you get to college and take some 1000-level classes maybe you'll grok.

    115. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 1, Insightful

      In my case, it's both.

      Outwardly, I provide polite and gentle answers.

      Inwardly, I hate the user. A lot.

      I really wish I didn't feel this way. Intellectually I know that some people need a lot more hand-holding than others when it comes to computers and technology. But for some reason it completely and utterly infuriates me.

    116. Re:You mean physical memory right :-) by Free+the+Cowards · · Score: 1

      Right, I disagree with you therefore I must be stupid, uneducated, or both.

      I was going to argue against your point, but what the hell, why even bother.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    117. Re:You mean physical memory right :-) by Reziac · · Score: 1

      Ah, games. Not being a gamer, I don't suffer those consequences :) Seems it behooves gamers to not only have assloads of RAM and video capability, but to also stash the pagefile on the fastest available device.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    118. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      That's actually wrong... ahve you ever used an Amiga? it came with multitasking in 1985 and has never (or at least, not without heavy updating of hardware and software) used virtual memory.

      But even today, the Amiga A1200 is multitaksing better than Windows (IMO, of course ;) )

    119. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      "There is no reason to be cordial- dumb people that don't care about education and contributing the betterment of society and the human race (aren't even trying) should be shipped to a different planet."

      Well dumb people are more likely to be violent for no reason whatsoever.
      Either that or violent people are more likely to be dumb. (negative feedback anyone?)

      "Named must your fear be before banish it you can."- Yoda (sue me.)

      Personally, I've spent most of my life reading. If it wasn't for school nobody would know what was in my head. I'm thinking I'm going to go back to school until someone locks me in an ivory tower. Maybe when I'm old I'll bitterly lecture morons about how they should do stuff, but I generally feel they bring an amazing level of correlation to zombie movies.

      today I didn't make any friends because of a fear of:

      GTA anyone?
      How about a frivolous lawsuit?
      How about a car accident with a drunk?
      "Hi, I've got a contagious and dangerous disease, but I'm not accountable for my actions because I've got a forcefield of stupidity."
      Dealing with other people's intellectual and emotional bullshit.
      Having my time wasted
      Becoming the target of someone else's paranoia (even if mild).
      Having someone you barely know fall in love with you.
      Falling in love with an idiot.
      At work there's a huge fear of "discovering an idiot" yeah incompetent people are generally just acting at work (I don't even care anymore as long as I don't have to clean their messes up, but if they think you "know" they will try to attack you politically.)
      Lies, on top of lies, on top of lies, ...
      Rhetoric
      Propaganda
      Practically everyone is racist and if they aren't they are probably overly judgemental about any-damn-thing-they-can-think-of!
      JUDGEMENT (I'm reiterating.)
      Someone's looking for someone to blame for something
      greed
      jealousy
      pettyness
      Whining about things people bring upon themselves
      more lies
      oh, yea, violence...

    120. Re:You mean physical memory right :-) by Jstlook · · Score: 1

      I'll never forget the day I was someplace in California at a gas station, with a dead battery. I asked a guy for a jump, and he said "I don't have one." I couldn't argue.

      --
      ---jstlook ---For that is the way of Elves, for they say both yes AND no, and mean every word of it. --- J.R.R.T.
    121. Re:You mean physical memory right :-) by Eivind · · Score: 4, Insightful

      Actually, that may be politically correct, but it's not true.

      Sure, everyone has strong and weak sides, but nevertheless, the tendency is for some people to know a lot about a huge array of topics, and other people being pretty unknowledgeable about pretty much everything.

      That nobody can specialize in everything is however true.

      You do need one surgeon, and a different cryptographer, true. But still, the odds is that either of them will know more about the basics of the work of the other than a random person you ask on the street.

    122. Re:You mean physical memory right :-) by holophrastic · · Score: 0, Offtopic

      There's a big difference though. Most people are not incredibly knowledgeable about computers, but most people do use them daily.

      I'm not knowledgeable about my tax returns, but I don't need to care for 51 weeks of the year, and I can pay someone else to take care of it, review it myself for as long as it takes, get my father to look it over, and then not care about +/- 10% or a few dollars.

      But if I were doing taxes on a weekly, or even daily basis, you'd bet I'd spend some time learning.

      A lot of computer "users" see themselves as "users" are described as "users" and treat their computers the way they drive their cars. Which would be fine, except that they don't plan to have a mechanic available as needed. Oh yeah, and computers aren't quite as reliable as cars just yet. Well, my kiosks are, but they are hardly consumer devices.

    123. Re:You mean physical memory right :-) by cyphercell · · Score: 3, Funny

      hmm, maybe all IT people should be allowed to handout pills and carry guns.

      --
      Under the influence of Post-Cyberpunk Gonzo Journalism
    124. Re:You mean physical memory right :-) by Nefarious+Wheel · · Score: 1

      ...when you work tech support for any length of time, you learn that many people utterly lack any problem-solving skills.

      Which is complemented by their complete lack of patience in following the process of problem isolation.

      "It's broken."

      "Could you narrow that down a bit perhaps?"

      "It's broken again.

      --
      Do not mock my vision of impractical footwear
    125. Re:You mean physical memory right :-) by Nefarious+Wheel · · Score: 1

      I love your response man. Its not that they are stupid, its that they are stupid and demanding and demeaning to you.

      It's all about fear, Shemp. They're afraid of you, and they're trying to distract you from their weak spots by making the ugly monkey face.

      Oh, and give your CEO enterprise admin privileges. It can't hurt, he reboots his laptop by shaking it upside down anyway, and if something goes wrong practice the subtle art of rolling your eyes and whistling.

      --
      Do not mock my vision of impractical footwear
    126. Re:You mean physical memory right :-) by Nefarious+Wheel · · Score: 1

      Does anyone else get the impression that Mark Russinovitch is being groomed to take over from David Cutler? He's like St Peter to Cutler's Jesus.

      IMHO you have just demoted them both.

      I miss SYSGEN.

      --
      Do not mock my vision of impractical footwear
    127. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      The last line was my thought exactly: I've reading those topic since 256MB of ram where common. Even back then, there was lot of arguing that swapples was the way to go.

    128. Re:You mean physical memory right :-) by Corporate+Troll · · Score: 1

      Funny, I get 3.5 GBs of RAM on both of my 32-bit machines.

      So do I, but the memory "lost" is used for memory mapping of your devices. So, the more memory they need, the more you will lose... Imagine having someone with two 512Meg video cards.... There you go! You just lost a full Gig.

      I think the architecture itself reserves 512Meg by default, regardless what the actual needs are.

    129. Re:You mean physical memory right :-) by mathew7 · · Score: 2, Insightful

      I am not an expert at systems, but seems to me that he is saying that Windows tries to write disk buffers ("file cache"?) to the pagefile in order to make more space.

      Well, you did get this idea wrong. Disk cache is treated differently and IS NEVER swapped out (MS is not THAT stupid). However, the kernel may swap an application which you just minimized in order to increase the cache size.
      My main frustration with NT-based kernels is that you cannot limit the cache size. At my work a virus scanner runs weekly. Working during scanning is murder, because windows grows the cache size to the whole physical memory and swaps out everything, except maybe the current application, but I always use 3-4 applications which require real-time response. I heard they changed this behavior in Vista but I have not tested it. At least in Win98 I could (and always did) limit the cache to 1/4 of physical RAM and it worked perfectly.
      As a comparison, in linux you barely get any swapping to disk if you use up to 80% (estimation, no hard evidence) of your physical RAM. I always have 784MB of swap partition regardless of RAM (512MB-4GB). The swap size is because of partition alignment. I always align to multiple of 1000 cyclinders, but I give 100 cylinders from the linux partition to swap space. This is because if a HDD failiure occurs (SW of HW), I know where to look for partitions.

    130. Re:You mean physical memory right :-) by jozmala · · Score: 1

      Just have standard answer, if YOU cannot turn on your computer please contact the computer supplier we cannot do anything about it.

      --
      ©God :Copyright is exclusive right for creator to determine the use of his creation.
    131. Re:You mean physical memory right :-) by mathew7 · · Score: 1

      Actually I would call Virtual Memory whatever the application(s) can allocate. So once you run out of virtual memory, you used up RAM and paging file. But since you will not use all the pages at the same time, the OS will save the least used ones in swap and restore the needed ones.
      So (Virtual memory)=(physical memory)+(sum of page files).
      Since the DOS extender time, this was the term usage. Virtual address space is the memory 1 application sees. Although the application knows that it's continuous and not shared with other applications (unless specifically requested), the reality is that it can be spread between physical memory and swap. But this is how the OS+CPU present it to the app.

    132. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Sorry, you're wrong, both about the term "virtual memory" (which you think is virtual address space), and that it's necessary in all multitasking operating systems. AmigaOS is single address space OS and multitasks better than most. Also, back in 1991-1992 there were virtual memory managers (hdmem, vmem, vmm) for AmigaOS that let you use swap files/partitions as system memory on amigas with MMU. This was long before linux and win9x.

    133. Re:You mean physical memory right :-) by ta+bu+shi+da+yu · · Score: 1

      I think the question is "why should I use the swap file"?

      --
      XML is like violence. If it doesn't solve the problem, use more.
    134. Re:You mean physical memory right :-) by mosquito1 · · Score: 1

      You actually need enough physical memory for the page swap and interrupt handler routines. If you don't have enough memory for that, then you end up trying to swap in and out the routines that are doing the swapping, and bad things happen. So, technically, the minimum amount of physical memory you would need would be the size of those routines and the vector section, plus whatever size you want to run code out of. So probably something like a couple times the size of an instruction. Of course, that is all dependent upon the fact that the OS was linked with this in mind during the build process. Which I'm very sure none of them major OSes are pre-built to do this. Even with Linux you'd have to do some customization.

    135. Re:You mean physical memory right :-) by zoefff · · Score: 1

      please, don't mix stupid or dumb with a bad TINMP attitude (this/that is not my problem)

    136. Re:You mean physical memory right :-) by raynet · · Score: 1

      What are Kelvin bits? And Apollo Missions did have more than 2 kilobytes of memory, 36864 words of ROM and 2048 words of RAM, 15bits per word, thus 67.5kB ROM and 3.75kB of RAM.

      --
      - Raynet --> .
    137. Re:You mean physical memory right :-) by Orlando · · Score: 1

      I was told never to mix law and medicine in my work, it tries your patients.

      Ha, ha.

      Orlando..

      --
      -= This is a self-referential sig =-
    138. Re:You mean physical memory right :-) by EmotionToilet · · Score: 1

      When I used to run Win 2000 I would disable all of the paging files so it forced Windows to put everything on the RAM. This was actually considered a "trick/tip" to get Windows to run faster, and it worked great for me. As long as I had enough RAM to handle what I was doing I never had any problems.

    139. Re:You mean physical memory right :-) by flnca · · Score: 1

      Have a look at the descriptions of the VirtualAlloc(), MapViewOfFile() and CreateFileMapping() API calls, which are used for virtual memory and shared memory, resp.; Shared memory on Windows is always backed by a file. Virtual memory is automatically backed by the paging file if pages are committed (so that's programmer-dependent). This means Windows has to access the DISK to allocate committed virtual memory or shared memory pages. That's one of the prime reasons why Windows is so slow (another reason is the lazy task switcher which can switch away from a process for 50 msecs or more, which is an eternity to modern CPUs). So, the OP is correct: If Windows was written properly, it would not stuff in the virtual memory statistics when there's still enough physical RAM available, no matter if the virtual memory is currently allocated in RAM; It means there's also space allocated on disk!

    140. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      You need virtual memory for process protection. It makes sure that a high memory game, for instance doesn't screw up your word processor's memory.

    141. Re:You mean physical memory right :-) by flnca · · Score: 1

      I too have seen Windows 2000 and XP just love to make heavy use of the paging file even though there is clearly enough physical memory available.

      The reason is there are various design problems in Windows. One is that shared memory and committed virtual memory are always backed by a file. On Windows and OS/2, virtual memory disk allocation and deallocation is excruciatingly slow. I once wrote a software virtual memory system for OS/2 that was about 10 times faster than the built-in system (just using regular OS/2 I/O calls). Windows is extremely slow, not just because of its virtual memory system, but also because of its task scheduler, which can switch away from a process for over 50 msecs (which is an eternity for modern processors). The Linux multitasking throughput is at least 1000 times higher than that of Windows (XP vs. an early Linux 2.6.x). Modern Linux systems are probably 5000-10000 times faster than Windows when multitasking throughput is concerned. The Windows loader maps all DLLs into memory whether they're currently used or not (b/c of the DllMain() function which must be executed for many DLLs). One giant bug in Windows is still that it's impossible to kill a process without messing up the DLL states, because TerminateProcess() does not execute DLL cleanup code and does not update DLL reference counters. That's why Windows is a poorly written OS and often called a toy OS, because of its unprofessional implementation. (HAHA sorry that had to be said -- I've programmed on Windows for 16 years, and I know why it sucks! ;-) )

    142. Re:You mean physical memory right :-) by Guido+del+Confuso · · Score: 3, Insightful

      Uh, no. When cars were FIRST sold to the public, if you bought one you could afford to pay one of your servants to maintain it.

      Besides, that's still a bad analogy, because it's not that most people couldn't change the oil or spark plugs on a car, it's just that it's too much of a pain in the ass for people to do it. I could teach anyone how to do it in theory. You just follow a few simple steps. But it's much easier to simply pay a guy 25 bucks every couple of months than have to crawl under the car, muck around with dirty oil, figure out where to dispose the old stuff, and so on. Given that, there's not really any real need for me to know how to do it, any more than I need to know how to perform surgery or cook escargot. Although in point of fact I do know how to change the oil on my car (having changed the oil on numerous motorcycles purely for the fun of it), I see no reason to call anyone who didn't have a clue how to do it an idiot.

      Computers are getting simpler. They are getting to the point where it makes sense to learn how to use them and how to fix them when something minor goes wrong. This is the standard level for computer literacy. A better car analogy would be to observe that when cars were first sold to the public, they were complicated to operate, difficult to start, and not many people saw the use of them. Over time, however, they became simpler and simpler, to the point where it is reasonably expected that any given adult will be able to drive a car. This is what is increasingly happening with computers. Some from the older generations will learn to adapt to the new technology, and some will not. But within our lifetimes, computer competence will be expected of people, especially when computers have become simple and ubiquitous. To an extent, this is already the case. However, the general expectation is not that anybody could write software (i.e. design a car part) or be able to fix computers that have suffered a serious malfunction (i.e. replace the cooling system). It's not even be that most people are expected to be able to handle routine maintenance on their own, hence the need for automatic software updates--you don't need to understand the details, just that you need to do it every so often. Just like changing your car's oil.

    143. Re:You mean physical memory right :-) by Jedi+Alec · · Score: 1

      As someone who has been in the trenches, both on the phone and as a supervisor, I'm sorry to see your experiences haven't taught you the differences between people being stupid, people being assholes and people simply having no idea what they're talking about. Each requires different approaches, and it takes a very long time, especially for most techheads, to learn how to deal with the various stereotypes.

      For the record, whether or not people act like total assholes depends largely on their culture. Dutch people are total pricks(yay for my countrymen), folks from the latin countries tend to be more laid back, the Brits are as painfully correct as they can be sarcastic, and the Germans are your worst nightmare since they know *too much* about what they're talking about. As for american stereotypes...you summed that one up quite nicely ;-)

      --

      People replying to my sig annoy me. That's why I change it all the time.
    144. Re:You mean physical memory right :-) by Supergibbs · · Score: 1

      Yes the translation of addresses isn't a big deal but page swapping off the hard drive is the slow down. I also run x64 Vista and recently upgraded to 8GB of RAM (it's so damn cheap nowadays!). I turned off virtual memory and haven't had any problems. I've always heard that Windows pre-caches data based on how much memory you have so I figured disabling virtual memory would prevent any hard faults and 8GB should be plenty for what I do.

      --
      First post! (just in case I am...)
    145. Re:You mean physical memory right :-) by unlametheweak · · Score: 1

      there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

      Nope. Virtual memory is (almost) always associated with paging files on a hard disk drive (and hence thrashing issues may occur). In fact you can't have paging without virtual memory. These things are not mutually exclusive. You actually contradict yourself further down, "Virtual memory only starts impacting performance when pages are being swapped in and out, because all your processes need more resident memory than you actually have." The author should look at Paged Virtual (in Sysinternals' System Explorer) to see the actual paging use.

      So you may want to change the title of your post to: "why use physical memory in modern systems?".

      I would suggest that the author probably meant to state his question as "Why use paging files in modern systems?"

    146. Re:You mean physical memory right :-) by jilles · · Score: 1

      On most windows PCs you are better off maxing out the memory on the motherboard (which you can do quite cheaply) and telling windows to never ever waste your time copying bits back and forth between the paging file and RAM (which it will happily do for no good reason at all otherwise). Think PC with 1.5GB, 1 GB free and the damn OS swapping your applications to disk so that each alt tab results in lots of disk activity, especially painful on otherwise fast and capable laptops with slow disks. 1.5 GB is plenty for Java development using Eclipse and running Firefox and a few office applications all at the same time.

      It depends on your usage pattern but I've done this on a laptop with 1.5 GB and got a huge performance boost. The flipside is that the OS will get a bit more rude when you run out of memory. But on the other hand that saves you some time as well because the alternative is that it gets very very slow. Just keep an eye on your memory usage and close some applications when you are closing in on the upper limit.

      Macs are different. I have 4 GB in mine and the OS is generally very well behaved with the page file. I guess with linux it depends. Basically if you run a server, a page file is a waste of time (either you have enough ram or you don't, when you don't you are in trouble).

      --

      Jilles
    147. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      This kind of reactionary getting pissed off attitude is just what we need, well done mug.

    148. Re:You mean physical memory right :-) by mr_gorkajuice · · Score: 1

      I find it kind of amusing that your illustrative example is actually NOT about stupid customers. Sure, it may show them off as assholes... but an end customer has absolutely no chance in hell at figuring that his connection is down because you need to construct a new house for your DSLAM, and even with all the qualifications in the world and a 210 IQ, he has no chance at fixing the issue himself - and he shouldn't.

      Let's distinguish between assholes and retards now, shall we.

    149. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Well, when you work tech support for any length of time, you learn that many people utterly lack any problem-solving skills. Geeks often equate problem-solving skills with intelligence, hence the (not unreasonable) impression that many people are not very smart.

      Unfortunately when you ever have to phone tech support, you learn that many tech support people also utterly lack any problem-solving skills, only they also carry a bad attitude that everyone else in the world is dumb. And so you find yourself dealing with tech support people that are not only barely-competent, dumbly reading out phone scripts and unable to cope with any fault the phone script does not cover, but are also patronising and unpleasant while they are at it.

    150. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 1, Funny

      "two years in law enforcement.. You truly get to meet the scrapings of the gene pool that way "

      Hey, they gave you a gun and ammo to narrow the gene pool, what happened?

      That's like trying to empty the Pacific Ocean with a teaspoon.

    151. Re:You mean physical memory right :-) by kasperd · · Score: 1

      Have you tried NDISWrapper?

      I tried it. It turned out to be lacking a few important features. I could not configure it to run in master mode. And it could not be configured to be part of a bridge. And when upgrading from 2.6.23.14-115.fc8 to 2.6.24.3-34.fc8 it just stopped working.

      --

      Do you care about the security of your wireless mouse?
    152. Re:You mean physical memory right :-) by sepelester · · Score: 1

      Haha, ex TRANSCOM employee perhaps?

    153. Re:You mean physical memory right :-) by electrofelix · · Score: 1

      "As computers get more intuitive and easier to use, more people will find ways to break them and look stupid"

      There, corrected that one for ya.

    154. Re:You mean physical memory right :-) by kasperd · · Score: 1

      That's not quite true actually. Microsoft measured the overhead of doing page table translations and kernel mode switching at about 30%.

      I suppose that is not overhead of the translation, but rather overhead of reading page tables whenever there is a TLB miss. If that's the case, the percentage would depend a lot on the workload. And the optimizations you'd do to reduce the performance hit from TLB misses would then be the same optimizations you'd do to improve cache hit ratio. I find it hard to believe that an optimized algorithm would take a 30% performance hit from TLB misses. Of course flushing the TLB on context switches have a cost, but how large a percentage of a time slice can you spend filling up the TLB again?

      --

      Do you care about the security of your wireless mouse?
    155. Re:You mean physical memory right :-) by jadel · · Score: 1
      I just finished a sizable essay on this for my operating systems class, so its fairly fresh in my memory.

      In modern processors, there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

      No quite - Your thinking of the Translation Lookaside Buffer, it can do the conversion from real to virtual address within a clock cycle, but has a limited capacity. When an address is requested to a page not contained in the TLB a much longer operation is required to convert the address from scratch. Further requests to that page will be fast until it drops out again.
      Many CPUs can populate the TLB in hardware, but no operating system seems to use this support - doing the conversion in software. The TLB works well right up until there is a context shift that requires the entire contents to be flushed. Then memory performance will be poor until the TLB is repopulated.

    156. Re:You mean physical memory right :-) by TheThiefMaster · · Score: 2, Informative

      Modern cpus support virtual memory in hardware, meaning it causes no slowdown at all (unless the referenced page isn't in ram of course).
      AMD's prototypes even support the nested virtual memory layout used by virtual machines.

    157. Re:You mean physical memory right :-) by jadel · · Score: 1

      Those are two slightly different costs though - you can have virtual memory without necessarily using context switching and vice versa.

    158. Re:You mean physical memory right :-) by theaveng · · Score: 1

      I don't understand this part:

      >>>there is no penalty for using virtual memory

      Virtual memory, since it's really just hard drive storage, is about 1/100th as fast as RAM. How can you say there's no penalty? I certainly notice a slowdown when I move my Firefox browser from minimized to maximized, and it has to load its cached webpage from my c: drive. The screen freezes for about 30 seconds.

      I call that a penalty - one that could be avoided by not using hard-drive-based virtual memory.

       

      --
      FOX NEWS.com should be BANNED from television and internet. Have the Congress take it over and give us Truespeak.
    159. Re:You mean physical memory right :-) by theaveng · · Score: 1

      >>>"Oh, I don't know a /thing/ about that! hur hur, in my day, all we had was pen and paper..." etc etc etc.

      That sounds a lot like me, but the difference is I follow it up with, "Please explain it to me." You see I can't be bothered to know all the details of how, for example, an Ipod works because I don't own one, but I'm certainly willing to learn if I can find someone who is PATIENT AND A GOOD TEACHER rather than a condescending asshole.

      Which one are you?

      --
      FOX NEWS.com should be BANNED from television and internet. Have the Congress take it over and give us Truespeak.
    160. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      And it's one of the seven cardinal sins

    161. Re:You mean physical memory right :-) by Tomsk70 · · Score: 0

      I had an Amiga 1200 with a full 68030 in it, and used Virtual Memory with it. Unlike Windows 3.1, I could do 3D ray-tracing with 128Mb of RAM (remember this is when 10Mb was considered massive) and *not notice any slowdown*.

      I've had to wait 15 years, and only now is Vista even approaching the power I had back then - albeit once it has 80 time the memory and 100 times the hard drive space, with more memory on the gfx card alone than my Amiga had in total. Makes me weep, it really does.

    162. Re:You mean physical memory right :-) by theaveng · · Score: 1

      What if I have 1024 gigabytes of RAM?

      Do I still need to use virtual memory, or can I just get by with 100% physical memory?

      --
      FOX NEWS.com should be BANNED from television and internet. Have the Congress take it over and give us Truespeak.
    163. Re:You mean physical memory right :-) by robthebloke · · Score: 1

      you've got a virus from downloading pron, this pill will help.... ?

    164. Re:You mean physical memory right :-) by theaveng · · Score: 1

      >>>This trick is necessary in all multitasking operating systems.

      Funny. My 1 megabyte Commodore Amiga never used virtual memory or pagefiles, and yet it multitasked just fine. I recall one time, just for fun, I had ~50 tetris games open all at the same time and they all fit into real physical RAM.

      You don't have to have VM to multitask.

      --
      FOX NEWS.com should be BANNED from television and internet. Have the Congress take it over and give us Truespeak.
    165. Re:You mean physical memory right :-) by crmarvin42 · · Score: 2, Insightful

      I'm in a similar boat with comcast. They keep charging me a rental fee for a modem that I PURCHASED 3 years ago. Every time I call they say that the office capable of checking the MAC ID against a list of their own to verify that it's mine and not theirs is closed and that they'll get back to me by the end of the next business day. Well it's been about a month now, another bill has arrived with the rental fee, and I'm still having zero luck getting ahold of anyone to address the issue.

      My only recourse now is to be the biggest A-Hole I can to get the attention of Higher-Up's, or cancel my service and switch to DSL for an extra $30/month.

      I've had similar problems with my credit card company trying to double my APR despite my reducing my overall balance, & never missing a payment with them or anyone else. Acted like a total jerk on the phone at it was taken care of with 15min. of my becoming a jerk.

      Being an a$$ may not be good karma, but it is more effective than being nice and taking it up the tail pipe.

      --
      Bureaucracy expands to meet the needs of the expanding bureaucracy.-Oscar Wilde
    166. Re:You mean physical memory right :-) by Anonymous+Brave+Guy · · Score: 1

      While I don't doubt your anecdote, I think it's a little unfair to label those who ask to speak to a supervisor by default as idiots just for that. Making that request is a natural reaction to the fact that first line support for most places really are both incompetent and impotent to do anything about typical customer problems. I'm sure we could discuss the arms race between call centres and customers who want useful service, but this doesn't seem to be the right place for it...

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    167. Re:You mean physical memory right :-) by qw0ntum · · Score: 2, Informative

      You mean to say "page file" rather than "virtual memory". Calling it "virtual memory" is something of a misnomer... virtual memory is a scheme for hiding the details of physical memory from user programs and providing protection between programs; it can also be used for implementing shared memory. Go read your textbook from your OS course for more info.

      Assuming you mean "page file", the question is "will you ever use more than 1024gb worth of memory at any one time?" Chances are you won't, so you'd probably be fine, assuming no developers of any software you are running made bad assumptions about your configuration. And if you ever used more than 1024gb, you'd hit an out of memory exception when you went over, which the page file would prevent. Potentially, you'd have a lot of old "junk" in memory that you probably don't need to use that can be swapped out to disk.

      You have to remember that if your machine is using 32 bit addresses, the virtual address space for each process is 4gb: conceivably, each process can address up to that amount of memory to hold its code, stack, and data (execution data). For the vast, vast majority of programs all of these are on the order of MB (even Firefox sometimes!), but theoretically it would be possible for all your processes to request 4gb of data.

      --
      'Every story, if continued long enough, ends in death.' --Ernest Hemingway
    168. Re:You mean physical memory right :-) by rjstegbauer · · Score: 1

      That would be at least three kinds of a bad idea

      OK. I'll bite.

      What are they?

      Randy

    169. Re:You mean physical memory right :-) by mjjw · · Score: 1

      Windows will use idle time to copy your physical memory to your page file. This means that a lot of the time (especially the first time in a session you run out of physical memory) the page-out operation is free.

      --
      If you aren't far left by the age of 18 you have no heart. If you aren't far right by 30 you have no brain.
    170. Re:You mean physical memory right :-) by rjstegbauer · · Score: 2, Interesting

      We should all be glad that those days are far behind us.

      I would disagree.

      For the time that there was a 640K limit, software designers for just about *every* application had to worry about size and performance.

      Now with 4GB memories and 500 GB disks and 3GHz dual core processors, *anyone* can write an application that works without worry about efficiencies.

      I kinda wish we would hit another brick wall like that so designers have to actually architect what they are building.

      I think it would be good for the software engineering discipline.

      Randy

    171. Re:You mean physical memory right :-) by kramulous · · Score: 1

      Whoa! You mean you have to clck "advanced" twce? 'm gonna have to try out ths wndows os sometme.

      Ponts for guessng whch key splt wne on and ddn't get back together properly.

      --
      .
    172. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      So you have a .2M margin there before you hit the physical limits of windows :)

    173. Re:You mean physical memory right :-) by rarity · · Score: 1

      "Their interpretation of events was that they couldn't turn on their computer because we ran a poor ISP."

      Sounds about right. I'm guessing that after chewing you out about their PC, they called their cable company to complain about their TV breaking in protest at the sheer awfulness of their programming...

    174. Re:You mean physical memory right :-) by theaveng · · Score: 1

      Enlightening. Thanks.

      Well if I had over 1000 gig of RAM, I don't really need to worry about data/programs just sitting "idle", because I have plenty of RAM to waste.

      --
      FOX NEWS.com should be BANNED from television and internet. Have the Congress take it over and give us Truespeak.
    175. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Maybe you do only need 640k. That depends on whether your virutal memory uses swapping or paging. If it uses swapping then you need enough physical memory to hold your operating system plus the largest program you will ever run. The unit of swapping is the whole program.

      If your OS uses paging then you can get away with less physical memory as only the *active* parts of your code and data need to be in physical memory. Mind you, your program may run like a three legged dog as other bits are paged in and out all the time. But it will work - only slowly.

      Linux and most Unix versions use paging. Older versions of 'doze used swapping. I can't say what the new versions of Windows do; I don't use them.

    176. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      To say virtual memory has no cost is not quite right. Page translation can be quite expensive, especially when switching address spaces frequency (Full or partial TLB invalidation on every task switch). I'm sure a memory subsystem guy could pipe up and explain in 100% detail.

    177. Re:You mean physical memory right :-) by dziban303 · · Score: 1

      Indeed, I think everyone up to this post completely missed the point. Typical "experts."

    178. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      take it easy, and find a way to get off the phones, my man.

      it's not that everyone's a hateful idiot, it's that everyone is a badass on the phone (or in email).

      Find a job where you can show up in person. It's much harder to be an asshole at that scale to an actual human in the room.

    179. Re:You mean physical memory right :-) by Jamey · · Score: 1

      Once upon a time, virtual memory meant *specifically* memory that was simulated by use of other resources, such as swap space on a hard drive, or even occasionally on tape. Perhaps we need a better term than "virtual" here, as apparently we're using it in several senses.

      Then again, the OS courses I took were in the 1980s, so that's probably in the ancient history course of today's CompSci curriculum.

      Memory that was addressed somewhere other than sequentially was "remapped memory".

    180. Re:You mean physical memory right :-) by ghoul · · Score: 1

      I guess you never had an intro to comp sci class where it was taught that RAM and ROM are primary memory, disks are secondary MEMORY and tape backups are tertiary MEMORY. All RAM is memory but all memory is not RAM.

      --
      **Life is too short to be serious**
    181. Re:You mean physical memory right :-) by wvmarle · · Score: 1

      On a related note, it wouldn't surprise me if swap-files played into the luser tendency to call disks "memory."

      Which is definitely not luser speak: not so long ago (10-15 years) I recall it to be very very common to talk about "internal" memory and "external" memory in computer literature and advertisements and so. The first is what is nowadays commonly called "memory" or "RAM" (volatile: gone when the power is off), the second is the hard disk (for non-volatile storage, surviving power off). This is from the time that even "cache" memory was external, I recall myself plugging extra SDRAM chips in my 386 motherboard to increase the cache memory.

      In Dutch it is still very common to talk about "intern geheugen" (=internal memory) when talking about the RAM.

    182. Re:You mean physical memory right :-) by Kelbear · · Score: 1

      The footpedal is a new one on me, are they putting the mouse on the floor and stepping on it or something?

    183. Re:You mean physical memory right :-) by pisymbol · · Score: 1

      This is a far better system,

      Its a far simpler system, "better" is up for debate...

      if you don't need a pagefile. There was a time when all OSs worked this way, and some still do. Programs are "relocated" at load, using a relocation table to correct any hard-coded addresses. This still happens for Windows DLLs, and on a modern system it's a trivial processing cost.

      You are talking more about PIC than virtual memory vs non virtualized address spaces. All modern binary containers like ELF provide ways to relocate text and more importantly data. Remember, architectures like Intel are almost by definition position independent since address are offset based.

      But even today, your application specifies hard-coded addresses, you will break something and its obviously not portable across systems.

      The payoff for not using virtual addressing is that (a) you can't have a pagefault, which just simplifies kernel code all around,

      In the other *better* world you spoke you may have it worst where you have to relocate text and data because processes are competing for the same hard-coded physical address space.

        and (b) generally when you pass a pointer to a kernel routine (e.g, I/O operations), the kernel has to translate the memory address form virtual to physical, which gets messy sometimes.

      Messy? I have never seen translation as the messy part. In fact that's the easiest part. Its managing virtual address space that is messy.

    184. Re:You mean physical memory right :-) by Larryish · · Score: 1

      Give your used oil to me.

      It makes excellent bar oil in my chainsaws.

    185. Re:You mean physical memory right :-) by Just+Some+Guy · · Score: 1

      Which is complemented by their complete lack of patience in following the process of problem isolation.

      Oh, ain't that the truth.

      Tech: OK, let's try it again so that I can watch it fail and get the same error message.
      User: But I want you to fix it!

      --
      Dewey, what part of this looks like authorities should be involved?
    186. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Wow.. Idiot I should say. Get off of Linux/Mac and read what Windows offers in terminology.

      Virtual means not real, therefore not real means hard drive space being used as RAM. Swap space = Virtual Memory when comparing Linux vs Windows.

      And since you KNEW what he was talking about, answer the question.
      What a dick/moron/uninformed user.

      Peace.

    187. Re:You mean physical memory right :-) by Scoth · · Score: 2, Interesting

      Uhg, you bring back bad memories for me. I was working DSL support at Earthlink when 9/11 happened, and there was a lot of telco equipment in/around the WTC. I had people who lived in NYC on the phone while the buildings were still burning wanting to know why their DSL was down and when it'd be back up. A couple even complained that they had trouble getting through. Completely shocked me.

    188. Re:You mean physical memory right :-) by HalifaxRage · · Score: 1

      When I read this story my knee jerk reaction was "please be gentle." And thankfully the first +5 post on this story is informative and helpful and relatively kind.

      It's a Christmas miracle!

      --
      bomb the us up set someone
    189. Re:You mean physical memory right :-) by elrous0 · · Score: 1

      Now get me the largest Christmas goose you can find and I'll give you a shilling!

      --
      SJW: Someone who has run out of real oppression, and has to fake it.
    190. Re:You mean physical memory right :-) by Snaller · · Score: 1

      But virtual memory IS stuff swapped out on disk, otherwise its real memory.

      And i have 4gb, and seeing a terrible performance while stuff has to load back and forth, even for simple things like world of warcraft.

      --
      If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
    191. Re:You mean physical memory right :-) by Just+Some+Guy · · Score: 1

      And the standard response: "they'll just say it's your fault. Why won't you just make it work?"

      --
      Dewey, what part of this looks like authorities should be involved?
    192. Re:You mean physical memory right :-) by Siridar · · Score: 1

      Well, obviously, i'd like to think i'm patient, and a good teacher. Like most people think they're good drivers. (yay, a car analogy!)

      I have to say, though, that I believe your attitude is quite rare - most people take pride in their lack of knowledge, and won't ask for more info. They shelter their ignorance, and act as if the world will stop changing if they just cover their eyes and wish it away. I was talking to my sisters boyfriend the other day - now this is someone who strikes me as pretty bright about most things, and pretty curious about the unknown - but when it came to computers? Not a clue. No interest. The distinct impression I got was that somehow, he was just that little bit better than the rest of us for being ignorant about the whole thing. Never mind that this meant the people around him had a much higher workload, to do the data entry/timekeeping/bookkeeping stuff that he should have been doing himself. I just don't get it. *shrug*

    193. Re:You mean physical memory right :-) by Snaller · · Score: 1

      Doesn't make much sense though. I've never met anyone who by "virtual memory" doesn't mean "data written to the harddrive (to pretend you have more memory than you do)" - and yes, there clearly is a penalty for doing this.

      And certainly for Windows XP, you get a large swapfile, even if you have more memory that you actually use.

      --
      If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
    194. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Yep. I actually called Dell to find out why my Remote Access Card on a new server wasn't working. I had plugged in the network cable to the extra NIC I had ordered but forgotten about. I'm not stupid, but I still sometimes do stupid things.

    195. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      wtf does this have to do with the topic?

    196. Re:You mean physical memory right :-) by Just+Some+Guy · · Score: 1

      When the program says, "read from memory address 0x(some huge number)"

      I haven't messed with this since college where we had to write a VM simulator for an OS class. In our project, each program had an address space that started at 0x0 and worked its way up. The VM would map "process 1, address 0x0" to "physical address 0xFOO" and "process 2, address 0x0" to "physical address 0xBAR".

      How does this actually work in current OSes? If I malloc() some RAM, does the address I get actually refer to something tangible (if only momentarily before the program is swapped out and back in at a different physical range)? Do programs have their own virtual address space, or do they generally start at some fixed address and grow from there (regardless of where they actually live in RAM)?

      --
      Dewey, what part of this looks like authorities should be involved?
    197. Re:You mean physical memory right :-) by Snaller · · Score: 1

      Ah, that explains why so many support people are aggressive and condescending towards you when you need some assistance.

      --
      If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
    198. Re:You mean physical memory right :-) by david+duncan+scott · · Score: 1

      I've got a friend who is in his 70's, and his knowledge of technical things is way up there

      And how is Professor Knuth these days?

      --

      This next song is very sad. Please clap along. -- Robin Zander

    199. Re:You mean physical memory right :-) by Just+Some+Guy · · Score: 1

      The problem with a strongly isolating VM system on Amiga was that it would have basically broken message passing. If program Foo wanted to send a request to program Bar, it would write the request directly into Bar's memory at a specific address. Bar would check for requests by reading it's own memory and acting depending on what it found there. I wish your idea of using the MMU to fix fragmentation was used, though. It was incredibly annoying to have 127MB free but no contiguous block larger than 2MB available.

      --
      Dewey, what part of this looks like authorities should be involved?
    200. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      So you may want to change the title of your post to: "why use physical memory in modern systems?". I would point you to an article I wrote on that topic in 1990, but somehow I can't find a link to it on the web :-)

      So how much physical RAM does your personal system have?

    201. Re:You mean physical memory right :-) by Snaller · · Score: 1

      It seems illogical to remap memory to other physical memory, hence files is virtual memory.

      --
      If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
    202. Re:You mean physical memory right :-) by qw0ntum · · Score: 1

      Likewise, the last time I dealt with this was while I was in college in my OS class, which was yesterday (final exam in OS tomorrow, my time on /. is being productive!). But, according to what we've studied, the program never gets a physical address, ever, only virtual addresses which are translated by the MMU at runtime into physical frames, and that's still the way that modern OSes actually work. The page table keeps track of a "resident bit" to record whether the frame referred to by the page is actually present in memory or not. Actually, the way it works is the high order bits (page number) go into the page table, which returns another set of high order bits which correspond to a frame number. The low order bits are the frame offset, which come directly from your program. Each program has its own virtual address space, and the page table for each is stored in the program's context.

      --
      'Every story, if continued long enough, ends in death.' --Ernest Hemingway
    203. Re:You mean physical memory right :-) by hesiod · · Score: 2, Informative

      he/she (wait, this is /.) thinks "Virtual Memory" is the same thing as paging

      I will refer you to Windows XP's "Performance Options", section "Virtual Memory" which states out "A paging file is an area on the hard disk that Windows uses as if it were RAM." That would probably cause this "confusion".

    204. Re:You mean physical memory right :-) by conureman · · Score: 1

      Yes, I too have met these scrapings. The local P.D. is recruiting now, so at least they have jobs.

      --
      The cost of that cleanup, of course, will be borne by taxpayers, not industry.
    205. Re:You mean physical memory right :-) by Zero__Kelvin · · Score: 1

      As hardburn has pointed out, the definition of virtual memory never changed, the number of people who throw the term around without knowing what it means just increased drastically with the advent of Window$. When you listen to Microsoft, you lose. It is that simple. So yes, the world is full of misinformed people, courtesy of the great visionary (ROTFLMAO) Bill Gates.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    206. Re:You mean physical memory right :-) by Snaller · · Score: 1

      Hear hear!

      --
      If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
    207. Re:You mean physical memory right :-) by pancur · · Score: 1

      I do it with 2GB of memory on Windows XP (please accept my apologies for being a Windows user)... It's even worth a crash every once in a while - swapping for no reason makes me go nuts. I hate it when my running prorgams get swapped just because they weren't in focus for a while. Anyways, if I check the "task manager" every once in a while to see how I'm doing memory wise and restart the memory leaking apps or services, it's quite stable...

    208. Re:You mean physical memory right :-) by Siridar · · Score: 1

      He's doing great!

      Actually, the guy I know is way more interesting than ol' Donald. He's into homebrew, distilling, winemaking, beekeping, linux, and hydroponics. (so far, at least.)

      Every so often he'll combine two or three, and make beer with honey as the sugar source, or a computer-controlled flame for his still. All I can say is, his wife is a /very/ tolerant lady.

    209. Re:You mean physical memory right :-) by Firethorn · · Score: 1

      To be fair, spark plugs can now last 100k miles, and changing the oil of a car is fairly dirty work unless you have the right tools - it's easier to simply pay the $30 to have a service station do it, what with their lift or access tunnel, not to mention a full selection of oil wrenches from hell.

      --
      I don't read AC A human right
    210. Re:You mean physical memory right :-) by boyko.at.netqos · · Score: 2, Funny

      So that when things get bad, they can administer themselves morphine to stop the pain, and when things get REALLY bad, they can end their suffering permanently?

      --
      I used to work for NetQoS. I no longer do, but want to keep the excellent karma attached to this account.
    211. Re:You mean physical memory right :-) by VeNoM0619 · · Score: 1

      I worked customer support (for like 2-3 months) and only had a few harsh calls. But for some reason I am able to tune all the negativity out (being in the younger 'lazy/uncaring/emo' generation might help). The way I see it, you can yell all you like, it won't change anything. There's very little they can actually do that would upset me. Swearing and calling me names, only makes me more happier to not be as helpful. If by the time you reach a mature adulthood, you haven't figured that out, then your life really does suck.

      Guess this is why I wouldn't fit in the army, not to mention I would probably be the parent in the shopping center with the kid screaming and not responding to them until they stop screaming. Life is meant to be happy. You can be serious and happy at the same time though, which some people still can't grasp the concept of though.

      --
      Disclaimer: I am not god.
      We may not be created equal
      But we can be treated equal.
    212. Re:You mean physical memory right :-) by boyko.at.netqos · · Score: 1

      Plus, it's REAL hard to be polite to Dell Tech Support after having to wait on hold 10 minutes after having to go through a very, very confusing submenu that takes another 10 minutes to go through.

      --
      I used to work for NetQoS. I no longer do, but want to keep the excellent karma attached to this account.
    213. Re:You mean physical memory right :-) by Scootin159 · · Score: 1

      My racing instructor once gave this timeline to learning:

      Stage 1) unconscious incompetence
      Stage 2) conscious incompetence
      Stage 3) conscious competence
      Stage 4) unconscious competence

    214. Re:You mean physical memory right :-) by Hordeking · · Score: 1

      Been there, feel your pain. But trust me, there's worse.

      If you REALLY want to lose faith in humanity, work in emergency services. I spent 6 years in medicine, and two years in law enforcement. You truly get to meet the scrapings of the gene pool that way.

      Well, given that a lot of cops are usually just adult bullies on a power trip, this doesn't shock me. Not sure about the medical folks...medical insurance doctors, however are mostly there to deny.

      --
      Disclaimer: The opinions and actions of the US Gov't are in no way representative of those held by this author or its ci
    215. Re:You mean physical memory right :-) by cyphercell · · Score: 1

      take this valium and shut up, open your mouth again and I'll shoot

      --
      Under the influence of Post-Cyberpunk Gonzo Journalism
    216. Re:You mean physical memory right :-) by volpe · · Score: 1

      Gee, I didn't find the GP post to be all that informative. He deliberately misinterpreted the story-poster's blatantly obvious point (that why should he bother having a pagefile when 4GB should be enough for anything he needs to do) and then proceeds to tell us what everybody already knows about virtual memory. The story poster is *clearly* talking about the difference between physical RAM and the disk, and is *not* talking about the difference between direct physical *addressing* versus page-table address translation. And why exactly should the more-appropriate question be "why use physical memory in modern systems"? Is there some alternative to physical memory that I'm not aware of? (I.e., something that *replaces* physical memory rather than augments it.)

    217. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Hiding your head under a rock isn't going to magically make it go away.

      I agree that heads should not be hidden under rocks, but you have too much faith in the permanence of computing. Two hundred years from now, there will be a rich collection of myths based on the writings of the Computing Age, just as we now have myths about Babylon and the Mayans and the Atlanteans.

      Ours is not a universe of permanence but of flux.

    218. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Your argument, which was 'you hate network effects and my hunch is you're wrong', is a way to not start a discussion. If you wanted an actual discussion, you could have started one.

    219. Re:You mean physical memory right :-) by Cornflake917 · · Score: 1

      When cars were first sold to the public, if you bought one you'd damned well better know how to fix it yourself. Fast forward to now. Plenty of idiots still buy cars and are completely fucked when it comes time to do something as minor as changing the oil or spark plugs.

      But is it really because people are stupid that they can't change a spark plug or oil, or is it because that knowledge is really no longer a necessity for some people? I know how to change a tire and to jump start a car because it is knowledge I have needed and will probably need in the future. However I've never changed my oil or a spark plug because those are things that I consider maintenance. I make enough money where I can pay professionals to maintain my car. Unless people stop providing car maintenance service and reasonable price, there is no necessity for me to learn such things. The extra cost I pay is soaked up by the time and hassle I save. To you, I guess I'm stupid. But to me, I'm just allowing myself more free time to do what I want.

    220. Re:You mean physical memory right :-) by 0xABADC0DA · · Score: 1

      Microsoft Reasearch and others tested Singularity with different memory protection use on modern hardware. VM costs ~6% performance just to use on hardware optimized for VM use. The real cost is even much higher than this, since some delays are imposed by having the cache and lookups support virtual addresses in the first place and can't be 'turned off' by systems like Singularity or JavaOS that do not require it.

      The CPU doesn't have the entire page table within itself, it has a cache of some kind (a TLB for instance), and it takes time to update this. So, when VM is 'turned off' essentially all address mappings are found in the TLB cache and no extra performance penalty is imposed. This is the 6% or so that Singularity team measured.

    221. Re:You mean physical memory right :-) by bugnuts · · Score: 2, Informative

      "why use physical memory in modern systems"

      Obviously, all computers use physical memory... duh :)
      The question should be "why swap memory to disk in modern systems?"

      The answer is that pretty much ALL performance-based systems (such as everything in the top 500 supercomputers, do not page. It is a performance versus convenience issue. Swapping is a huge convenience for most users, which allows large programs to load and run, yet not monopolize limited resources such as physical memory. If you do very little wrt running memory hog applications, then swapping will not be done, and will hardly affect you.

      Nevertheless, equating virtual memory to page swapping on the front page of a geek journal was plainly wrong and should've been addressed.

    222. Re:You mean physical memory right :-) by Avatar8 · · Score: 1
      Meanwhile my 24 years in IT, all involving user support, has turned me into a jaded, twisted, malevolent IT professional with nothing but contempt and ill-boding for any issue that could be resolved by a first level tech with an A+ certification.

      Thank goodness for /. as an outlet for hostility and bile that might otherwise be blasted onto customers.

      I really miss the days of optimism where I felt that what I did mattered and I could fix all the problems I encountered.

    223. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      i hate everyone

    224. Re:You mean physical memory right :-) by slashdotjunker · · Score: 1

      Almost, but your use of the term "virtual memory" is ambiguous. There is actually a dual paging system underlying all modern computers. To prevent exactly the kind of confusion we are seeing in this thread we call one kind of paging "memory" and the second kind "addressing".

      Physical memory = the storage area of your RAM
      Virtual memory = a storage area set aside on your hard disk

      Physical addressing = a global shared map which converts an index into a location in physical memory.
      Virtual addressing = a per-process map which converts an index into a location in physical memory.

      Virtual memory is a technique used to increase the amount of memory storage available at the cost of performance. Virtual addressing is a technique used to simplify some of the housekeeping that the OS performs and to prevent applications from corrupting each other's memory spaces.

      A modern OS will use virtual addressing to assign every user process a private memory space. These spaces do not overlap. By changing the virtual address map, an OS can move around physical memory and assign it to different processes. This is one kind of paging. A modern OS can also use virtual memory to store some memory pages to disk. This is a second kind of paging.

      Modern CPUs support virtual addressing in hardware so there is very little performance penalty. The advantage of safer memory spaces far outweigh the performance loss. I doubt anybody is still using physical addressing for user processes today.

      However, since disk access is much slower than memory access, there is a significant penalty for using virtual memory. Recently, memory access speed has grown much faster than disk access. So the relative performance of virtual memory has fallen.

      http://en.wikipedia.org/wiki/Page_table>
      http://en.wikipedia.org/wiki/Virtual_memory>

    225. Re:You mean physical memory right :-) by powerlord · · Score: 1

      I had an Amiga 1200 with a full 68030 in it, and used Virtual Memory with it. Unlike Windows 3.1, I could do 3D ray-tracing with 128Mb of RAM (remember this is when 10Mb was considered massive) and *not notice any slowdown*.

      I've had to wait 15 years, and only now is Vista even approaching the power I had back then - albeit once it has 80 time the memory and 100 times the hard drive space, with more memory on the gfx card alone than my Amiga had in total. Makes me weep, it really does.

      Had an A1000 w/the 512K add-on (had a full 1MB of RAM :P ). I remember how incredible the graphics for some of those floppy games were compared to anything else at the time. (Defender of the Crown comes to mind for some reason :) )

      --
      This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
    226. Re:You mean physical memory right :-) by hardburn · · Score: 1

      What you get with that remapping is that you can write programs as if you're the only one using the RAM. In other words, you can start accessing memory address f00000000 and never have to worry about another program using the same (physical) address.

      Many in this thread have mentioned the Amiga as having multitasking without virtual memory (which makes my earlier statement techinically wrong), but this case demonstrates the very problem with that technique. You have to be very careful to never step on the memory that another program is using. You can go through all sorts of contortions to try to get around this, but the ultimate solution is to just implement virtual memory and be done with it.

      TSR programs on DOS had much the same problems as the above. Most BSoDs of the Win95 through ME days were due to a bad VM implementation that often had programs stepping on each other's memory. The relatively low ocurrance of BSoDs on modern Windows is largely due to Microsoft finally learning to do VM right (more specifically, getting NT into a home OS instead of just servers and workstations).

      --
      Not a typewriter
    227. Re:You mean physical memory right :-) by hardburn · · Score: 2, Informative

      Using up the extra power gets us programmers who can worry about solving the actual problem, rather than hand optimizing their assembler to execute in less than 50 clock cycles. We may not be technically accomplishing more computer work per clock cycle, but we're definately accomplishing more programmer work per wallclock hour.

      --
      Not a typewriter
    228. Re:You mean physical memory right :-) by KlomDark · · Score: 1

      Yes, generally new users with a lot of sewing machine experience. It's semi-intuitive if you're used to having a foot pedal to control the sewing speed. (But still really stupid, only people living under a rock for the last 25 years haven't seen someone else use a mouse before.)

    229. Re:You mean physical memory right :-) by rjstegbauer · · Score: 1

      I understand your point.

      However, I feel that *never* having to worry about efficiencies causes bloated and slow applications like MS Word and Eclipse, since no one makes any money creating the next version that's only faster or small or uses less memory.

      If there were a brick wall, then at some point you would be *forced* to make your application smaller, faster, or use less memory just to *add* that new wiz-bang feature.

      Just my opinion,
      Randy

    230. Re:You mean physical memory right :-) by mpeskett · · Score: 1

      It's the same with maths - "I'm no good with numbers" seems to be a perfectly acceptable way to wave off having to do any maths involving numbers of more than one digit.

      Contrast against "I'm no good with letters" - being illiterate when you had perfectly good opportunities for education would mark you out as a fucking moron. Being mathematically or technologically illiterate is just normal it seems.

      I can forgive people not knowing their way around a computer if they're old and unlikely to have had to use one ever, or if the technology in question is legitimately complex, but the stupidity exhibited by some people really is beyond the pale.

    231. Re:You mean physical memory right :-) by FredFredrickson · · Score: 1

      Yeah, being nice to tech support allows them to continue reading their scripts. The problem with scripts is that the tech didn't listen to me, and is asking the same questions I just answered.

      I just want someone who speaks english please!

      --
      Belief? Hope? Preference?The Existential Vortex
    232. Re:You mean physical memory right :-) by FredFredrickson · · Score: 2, Informative

      I'd say problem solving skills, at the basic level, is a very accurate indication of overall intelligence.

      Being able to read, memorize, and recite stupid facts from a book does not require intelligence. Being able to read, understand, and utilize concepts- that's intelligence.

      Same goes for computers.

      --
      Belief? Hope? Preference?The Existential Vortex
    233. Re:You mean physical memory right :-) by dhasenan · · Score: 1

      By "virtual memory" we mean "non-shared address spaces". For example: let's say you have a web browser and a text editor open. They both allocate a chunk of memory. The pointers they get back both happen to be 0xDEADBEEF. These pointers point to different sections of memory.

      It just so happens that, with virtual memory, I can allocate more memory than I have RAM for. If I try accessing memory that doesn't have RAM backing it, the OS gets called. It will either swap out memory from other applications, get rid of caches that it controls, or kill some random process and steal its memory.

      Your complaint is not about virtual memory -- it's about swapping to disk.

    234. Re:You mean physical memory right :-) by silvertree · · Score: 1

      Gentle answers is what 6 years in customer support teaches you.

      That, or hating everyone ;-)

      omg yes, i do hate everyone

    235. Re:You mean physical memory right :-) by howlingfrog · · Score: 2, Insightful

      Geeks often equate problem-solving skills with intelligence,

      It's certainly an oversimplification to say that problem-solving skills are equivalent to general intelligence, but it's also an oversimplification--a much more misleading one, in my opinion--to say that they're only one component of general intelligence, no more or less important than any other.

      There are a lot of different types and components of intelligence. Some of them work in parallel--if you have weak analytical skills but strong emotional intelligence, the former won't interfere much with the latter, and the latter won't make up for the former. Some of them work in series, though, and a chain is only as strong as its weakest link. Problem-solving in particular can be a bottleneck for many, maybe all, other components of intelligence. Imagine using a map to drive around an unfamiliar city. If you have strong spacial awareness but weak problem-solving skills, you're not going to have any more success than someone with the same problem-solving ability and much weaker spacial intelligence.

      If Alice has equally low abilities in all forms of intelligence, including problem-solving, and Bob has moderate to high ability in all forms of intelligence except that he's no better at problem-solving than Alice, then functionally, there will be very little difference between them. Improving their problem-solving skills by equal amounts would result in Bob being smarter than Alice, but I don't think it's accurate to say that he already is.

      The good news is that problem-solving is a learned skill, so it can be improved at any stage of life. The bad news is that the culture of the industrialized West over the last 50-60 years is uniquely awful at teaching problem-solving. Almost all of our entertainment is intellectually passive. We read books and watch TV and movies instead of telling stories; we listen to music instead of singing or learning to play an instrument; we watch other people playing sports instead of playing them ourselves; we go to museums instead of doing research. The only major form of entertainment that involves problem-solving is game-playing. Board games, card games, etc., are shrinking in popularity. Nearly everyone still engages in them sometimes, but the amount of time the average person spends with them is plummeting. Video games may be starting to pick up the slack, but the sorts of games where problem-solving is a major component are a minority. Guitar Hero and Madden are fun, but there's no problem-solving involved. The games that really have problems to solve are popular only within a small, slow-growing subculture.

      Even outside entertainment, we have little opportunity to improve our problem-solving skills. We work for mega-corporations where our jobs are designed to involve as little creativity and flexibility as possible. Decision-makers and problem-solvers are presented as elites who must be consulted whenever anything unusual happens. And as much good as ultra-specialization has done for the world, it has resulted in a situation where people believe that anything outside their own specialty is completely inaccessible--any time we have a problem that we haven't already memorized a solution to, we go immediately to an expert. We never try to solve any problems outside our own specialty, so we never learn how to apply existing skills to new situations.

      --
      The original Howling Frog is a fictional character and has no UID.
    236. Re:You mean physical memory right :-) by Chelloveck · · Score: 1

      It's not so bad if you swap once, as the processor can work on other processes while waiting for the data to arrive, but if all your programs keep pushing each other out of physical memory, you get thrashing and consider yourself happy if the mouse pointer is still responsive!

      That's why I always put my swap file on a RAM drive. Swapping happens a lot, but it's really fast!

      --
      Chelloveck
      I give up on debugging. From now on, SIGSEGV is a feature.
    237. Re:You mean physical memory right :-) by krenshala · · Score: 1

      I've taken a similiar call when I worked for an ISP here in Austin.

      A car dealership was complaining because it was going to be "up to 72 hours" for the phone company to roll out and check the line. He started bitching because he was losing "hundreds of dollars per hour" while the connection was out ($30/month ADSL). I explained he had, basically, a home DSL connection and that was how it was handled. I also explained that if the line was that important, he should probably look into getting the $600/month fractional T1 with an 8hr response guarantee instead. Once he stopped and thought about it, he calmed down (he was still unhappy, but he calmed down).

      What it comes down to is that there are a great many users that don't bother getting what they need, but instead get what they want to pay. In the end they get what they pay for. The hard part for me was not rubbing their noses in it when I had the opportunity (its one thing to laugh about it after the call, its unprofessional to do so while talking to the customer ;).

      --

      krenshala

    238. Re:You mean physical memory right :-) by Blkdeath · · Score: 1

      But is it really because people are stupid that they can't change a spark plug or oil, or is it because that knowledge is really no longer a necessity for some people? I know how to change a tire and to jump start a car because it is knowledge I have needed and will probably need in the future. However I've never changed my oil or a spark plug because those are things that I consider maintenance. I make enough money where I can pay professionals to maintain my car. Unless people stop providing car maintenance service and reasonable price, there is no necessity for me to learn such things. The extra cost I pay is soaked up by the time and hassle I save. To you, I guess I'm stupid. But to me, I'm just allowing myself more free time to do what I want.

      I learned this lesson a long time ago. There are many things I'm capable of doing but that no longer make sense. Moreover, I'd rather support the person/people who "make the sandwiches" or change my oil or detail my car. My goal in life at this point is to make things simple for myself so I can enjoy life.

      I'm perfectly capable of changing out a flat tire, however I have roadside assistance on speed dial and my phone has voice recognition. I simply press a button, instruct my phone to "Call Roadside Assistance" and give the respondant my VIN, plate number and location. Hey, it justifies their job as well as that of the dispatcher and the tow truck driver that's sent to change my tire.

      --
      BD Phone Home!

      Shameless plug. Like you weren't expecting it.

    239. Re:You mean physical memory right :-) by brkello · · Score: 1

      A car isn't going to drive itself to a mechanic. A computer can download patches or have built in software to prevent or repair issues. And why learn...you can't learn everything. Everyone knows someone who can help them when they have trouble.

      --
      Support a great indie game: http://www.abaddon360.com
    240. Re:You mean physical memory right :-) by defaria · · Score: 1

      Clearly someone has never done tech support, and I don't mean "helped friends/relatives fix something" I mean in the trenches, taking calls all day long, every day. Trust me on this one, there are lots of really stupid people out there, and sadly tech support is a great place to find out that being intelligent and friendly don't help

      I'm on the other side of the fence here. Being in the business for some 30 years it's suffice to say that I know technology. Granted I know there are many people who are computer illiterate however from my vantage point I'm often dealing with a tech support person who doesn't know his ass from his elbow. He has a script of common problems with common solutions and he attempts to match up the two and if the match is close enough he fires back the common solution as the solution. He doesn't attempt to really understand the problem nor listen to the description of the problem as the customer is describing it. His goal seems to be to pattern match buzzwords up with the common problem and then shoot the common solution back and hang up.

      when you're faced with some guy with a "fancy" last name, an e-mail address that indicates that he is a partner at a well-known law firm and serious entitlement issues ("I WANT THIS FIXED NOW YOU GOD DAMN MOTHERFUCKING HIGH SCHOOL DROPOUT LOSER PUNK DO YOU HAVE ANY IDEA HOW MUCH MONEY I'M LOSING EVERY HOUR THAT MY (residential $15/month DSL) BROADBAND ISN'T WORKING I'M GONNA FILE A FUCKING LAWSUIT I WANT A FUCKING SUPERVISOR RIGHT GOD DAMN NOW YOU SHITHEAD LAZY KNOW-NOTHIN....", well you get the point).

      You forget the following point: THE CUSTOMER IS ALWAYS RIGHT!!!, secondly without the customer you're without a job and without a business!!! Listen I make good money in my consulting business and yes when that DSL service is down (and I'm paying closer to $55/month because I have a static IP and run my web site and email servers locally) yes I AM losing money, big time money, for every hour that I have to waste dealing with incompetent and know nothing tech support people! I've often spend several months worth of DSL service just dealing with tech support. Granted there are many customers who don't know shit, but there are customers who do know shit. Tech support people are generally somewhere inbetween and more on the low end of the scale than the upper end. Occasionally there are really sharp tech support reps. Generally I get along swimingly with those and generally I tell them "You did a good job!". I fully believe in giving credit where credit is due but I likewise believe in giving blame where blame is due - it's only fair.

      Also, when there's an outage these are the people who make you aware of the outage before the NOC calls to tell you about it because within 30 seconds of their DSL going down there's going to be about 50 of these people waiting to yell at you for the DSLAM getting destroyed by a direct lightning strike (and yeah, I've had to deal with something like 50% of the idiots who called about that particular outage demanding to speak to a supervisor because they felt I wasn't doing my job when I explained that it would take several days to repair the building the DSLAM was housed in before a replacement DSLAM could be installed. Also, this is the kind of person who works as a lawyer while somehow being unaware of the term "force majeure").

      The way I see it is that that is YOUR problem, not MY problem! I'm paying for the service. I want the service. If I don't get the service then I should be entitled to a refund. Again, that's only fair.

      To sum it up: There are lots of stupid assholes out there, it's not just plain stupidity due to genetic factors, there's also the issue of people who simply choose to stay uneducated about even the most basic computer skills (while relying on their computer to do their job) like understanding the difference between "a program" and "a website" or how to find the start menu in WinXP/Vista...

      You mean like the tech support people who when asked for an email address give you a web site instead?

    241. Re:You mean physical memory right :-) by Progman3K · · Score: 1

      Still, it's hard to answer "do I have to plug in my CPU (modem) to check my email?" a few hundred times without losing a little faith in humanity.

      Ah, but then you come to Slashdot and read the posts of your fellow geeks and are re-assured...

      never mind...

      --
      I don't know the meaning of the word 'don't' - J
    242. Re:You mean physical memory right :-) by krenshala · · Score: 1

      /hands Avatar8 a beer

      Yeah, now we're (18 years for me) reduced to thinking we can fix any problem we encounter, and wishing other people didn't agree so they would stop coming to us for a solution they should already know ...

      --

      krenshala

    243. Re:You mean physical memory right :-) by skeeto · · Score: 1

      Right on.

      There is also the issue that car maintenance requires the facilities to do it. I live in an apartment and if I wanted to change the oil myself I would have to do it in a parking lot, which isn't reasonable or safe (I don't want to be under my car with strangers driving around me!). Or worse, parking at my last apartment was in a parking garbage. It is simply not possible for me to do car maintenance. I have changed the oil + filter myself before when I had the proper facilities (i.e. in a garage), but it is simply not possible now. Also the fact, as you said, that I would much rather just pay someone 25 bucks to deal with it for me anyway while I read a book. This is extremely convenient.

      Computer maintenance requires, at most, a screwdriver and a few extra square feet of space around the computer, assuming you are even dealing with hardware.

    244. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      I was very happy to use Windows 3.1 with the "real-mode" switch which was basically the equivalent of not using swapped RAM at the time.

      There was just one limitation (cannot remember which one now) compared to the normal mode, but worth the speed difference...

      And for those who doubt that fully working in RAM vs swapping, just consider that the former is an order of time faster (meaning 10 times faster).

    245. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      I was calling that morning to complain about a credit card problem. The lady I was talking to handed me over to another person. The second person giving the reason "because what's happening in NYC." I asked what was happening, and she said, "You don't know?" So, then I turned on the tv and decided fark was providing better coverage, heh.

    246. Re:You mean physical memory right :-) by anexkahn · · Score: 1

      I work with a lot of older systems (NT 4 and Windows 2000) on aging hardware. These systems can be temperamental, and blue screen on occasion. Frequently was not really the best word, but, when you have an important server with crashing problems, you will want a Dump file to go through. It takes some of the guess work out of solving the problem. When you reduce the windows paging file on the system drive below a certain threshold, windows will no longer create dmp files.

      --
      Curious about Storage and Virtualization? Check out
    247. Re:You mean physical memory right :-) by empaler · · Score: 1

      Last time we had a base station destroyed (torched), we had a temporary base station up and running within two days. The local subcontractor worked almost around the clock to get it up, even though he in no way was demanded nor expected this. We got mails from customers praising the hard work done by the people involved. Of course, that mail made its round the same day it came in :)

    248. Re:You mean physical memory right :-) by empaler · · Score: 1

      Actually, when I called the (Danish) Dell Tech Support, I was very well treated. I thought the SLA on our desktops prohibited me from breaking them open without speaking to them first, but they told me to rock rock on, and took my word for concrete problems.
      Then again, buying in bulk will do that to support.

    249. Re:You mean physical memory right :-) by empaler · · Score: 1

      "I assure you sir, I am as American as you, and my name is Billy". Said with a very convincing tone - with an Indian inflection.

    250. Re:You mean physical memory right :-) by swilver · · Score: 1

      Yeah... such a great idea that is... no wonder half the programs crash that I run from a network share when it goes away.

    251. Re:You mean physical memory right :-) by swilver · · Score: 1

      Oh please, since a single process is limited to LESS memory than you can actually stick into a 32-bit system this claim of yours is utter bullshit. Put enough RAM in, kill swap, and there will be no more hitching (once everything is loaded of course).

    252. Re:You mean physical memory right :-) by belphegore · · Score: 1

      Geeks often equate problem-solving skills with intelligence, hence the (not unreasonable) impression that many people are not very smart.

      Well geeks are also occasionally OK at mathematics, and realize that somewhere around 50% of the population is of below average intelligence.

    253. Re:You mean physical memory right :-) by swilver · · Score: 1

      Try the option "No page file". You can set it to 0 as well (or to some other low number), just make sure you set the same value in the min and the max field. I always run Windows with no page file or only a tiny one (16 MB orso) to soothe badly written software (ie, Adobe's trash).

    254. Re:You mean physical memory right :-) by belphegore · · Score: 1

      This trick is necessary in all multitasking operating systems.

      No, only ones which have isolated memory maps per process. You could certainly have a multitasking OS which didn't use virtual memory if you didn't care about different processes being able to access each others' memory.

    255. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Yes there is a penalty for using virtual memory.
      You have to use a bigger, slower, power wasting,
      more expensive processor/memory-managing system.

      I use plain text for most of my computer work.
      With 4GB of RAM I can do fine with no virtual
      memory or even without any hard disk at all.
      If you read or write 10 characters per second,
      4GB corresponds to about 13 years of continuous
      reading/writing.

    256. Re:You mean physical memory right :-) by j-pimp · · Score: 1

      Tell the CEO those privileges are intended for his admin assistants only. The CEO is rightfully entitled to "Power User".

      Ok so he can only screw up his own machine royally.

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
    257. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      No, but you only need 640k of physical memory if you have a 1980's system. I remember we used to timeshare 100 people on half that on our DEC-20. And we *liked* it, dang-nabbit!

      -e

    258. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Yeah, being nice to tech support allows them to continue reading their scripts. The problem with scripts is that the tech didn't listen to me, and is asking the same questions I just answered.

      What, you mean we get scripts?
      This is news to me.
      Really.

      I just want someone who speaks english please!

      I've had over 20 years to practice my English speaking skills.
      I'd like to think I'm somewhat proficient at it.

      Also, that line gets bloody old after a while, when all you hear at the beginning of a call is

      I just want someone who speaks english please!

      Jerks.

    259. Re:You mean physical memory right :-) by Gazzonyx · · Score: 1

      Never heard that before, but it makes sense. What about dynamic libraries? If the program in virtual memory (on disk) uses a dynamic library, is the whole thing actually loaded, or just the functions that the one program needs?

      --

      If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

    260. Re:You mean physical memory right :-) by pugugly · · Score: 1

      As someone that currently does tech support, on the two occasions in the last few years that that happened, one was resolved by explaining, "Sir, if you yell or use foul language again, I will hang up. Then I will call my supervisor and explain why so he can pull the call for when you call back to complain about my hanging up."

      The other, was *not* resolved when I said that. So I hung up and called my supervisor and explained why.

      Most people just want to get help and not feel stupid when it's done. Because people hate feeling stupid when it's done. Heck, my IQ is sufficiently high that there's a limit on the size of the room before it's no longer possible for me to be the dumbest person in it (I won't claim it's a *small* room - {G}), and *I* hate feeling stupid when it's done.

      If you can do that, you can generally resolve the issue and have them feel good about it.

      Pug

      --
      An Invisible Entity of Vast Power whose existence must be taken on faith alone: Liberal Media
    261. Re:You mean physical memory right :-) by Orbijx · · Score: 1

      "I assure you sir, I am as American as you, and my name is Billy". Said with a very convincing tone - with an Indian inflection.

      Unfortunately, this happens to a few of my coworkers down here in the sunny dangly parts of the USA.

      They've got their citizenship. They have an accent, just like we all do, depending on our region and upbringing.

      The guy you're referencing really might be sitting in an American call center on American soil, trying his hardest to not get handle time raped by jerks who want to spend 15 minutes pretending they can't understand them, even though he's quite understandable.

      --
      One of these days, I am going to flip out. When I flip out, I'll be back in five minutes.
    262. Re:You mean physical memory right :-) by ErkDemon · · Score: 1
      Then I guess that you've never had a job in tech support that dealt with Windows systems?

      Windows uses the term "virtual memory" to refer to memory held in paging files on a hard-drive (the distinction being between physical RAM (the actual memory chips installed in your machine), and "virtual" RAM (the additional swapfile contents on HD).

      On XP, and as far back as I can remember on earlier versions of Windows (in other words back to Win3.1), these have always been referred to as the Windows "Virtual memory" settings, and on the current XP system settings dialog box, "Advanced" tab, the "Virtual memory" pane helpfully explains that the settings affect, ".. an area on the hard disk that Windows uses as RAM".

      Since the OP was specifically talking about Windows, his use of the Windows terminology was appropriate. The OP seemed to know what he was talking about. The first responder (rated +5) was the one that was actually confused by the terminology, and didn't understand the question.

    263. Re:You mean physical memory right :-) by TapeCutter · · Score: 1

      "Yeah, and get the sack because you hung up on 90% of your callers. People treat tech support like shit."

      But they only get away with it when YOU let them. Have you ever thought about why you get 90% abuse? Do you work for scammers? Is it becuase the abusers keep ringing and everyone else but you hangs up? Is it because you are ineffective in 90% of calls?

      Disclaimer: No flame intended, just that introspection is preferable to feeling like shit. It's a given that most helpdesk people are paid like shit but that is no reason to allow yourself or others to treat you like shit. If your boss would rather have you constantly abused than stand up to a few bulling, blowhard customers then getting the sack is a blessing.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    264. Re:You mean physical memory right :-) by Isvara · · Score: 1

      There's something different about computers, though. Never before in the history of mankind has something so complex been so ubiquitous. To make it worse, a lot of computer software is quite badly designed.

    265. Re:You mean physical memory right :-) by Isvara · · Score: 1

      Your analogy fails because you made a completely erroneous assertion: > Computers are getting simpler. They're getting more complex, with an ever-increasing number of ways to fail or act unexpectedly.

    266. Re:You mean physical memory right :-) by mikael_j · · Score: 1

      You forget the following point: THE CUSTOMER IS ALWAYS RIGHT!!!

      No, the customer is paying for a service and if that service is a cheap residential DSL service then most likely the contract (which the customer signed) states quite clearly what the user can expect when it comes to getting his/her problems fixed (this is commonly something like "no compensation at all if the problem was fixed within five business days of the customer reporting the problem, weekends and bank holidays are NOT counted").

      The way I see it is that that is YOUR problem, not MY problem! I'm paying for the service. I want the service. If I don't get the service then I should be entitled to a refund. Again, that's only fair.

      "Force majeure", it tends to have its own section in the contract for a reason, the provider can generally not be held liable for lightning strikes, earthquakes, wars and other things that are way beyond their control, and if you can't see why this is reasonable then you need to pull your head out of your ass.

      /Mikael

      --
      Greylisting is to SMTP as NAT is to IPv4
    267. Re:You mean physical memory right :-) by Snaller · · Score: 1

      Ah yes I remember the Amiga, the compiler generated an index to all memory references in the code and adjusted the values as it loaded it into memory, so referred to the correct addressees. And if you needed memory buffers you asked the system to allocate memory and got a point which was valid at the time of allocation, but then i guess that bit still is fairly normal.

      --
      If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
    268. Re:You mean physical memory right :-) by Guido+del+Confuso · · Score: 1

      Actually, my analogy is even more apt for you pointing that out. When cars were first manufactured, they were remarkably simple devices compared to today. A carburetor, for example, is quite unsophisticated compared to a fuel injection system. Modern cars have air conditioning, power steering, cruise control, emissions control systems, entertainment systems, and dozens of other functions that could fail. Yet, thanks to things like automatic transmissions, traction control systems, safety lights, and so on, cars have become simpler to operate, even as they have become more technically complicated.

      So too with computers. Yes, there are more ways in which they could fail compared to the computers of yesteryear. But you can't seriously argue that a modern Macintosh, for example, is more difficult for the average person to use than a 286 running DOS, notwithstanding the fact that the newer computer is orders of magnitude more powerful, has advanced graphics, sound, networking functionality, etc.

      From the user's perspective, computers are indeed getting simpler.

    269. Re:You mean physical memory right :-) by Isvara · · Score: 1

      But you can't seriously argue that a modern Macintosh, for example, is more difficult for the average person to use than a 286 running DOS

      I can and I will! So you can click on things instead of typing them. Sure, I'll give you that. But say I want to watch a video. Oh, odd, it won't play. Something about a "codec". What the hell is a codec? I've just created a diagram, and I want to save it. Hmm... it's asking me what format. WMF? SVG? JPEG? PNG? GIF? I just want to save it! Now, my wife has saved some of our photos that I want to use. I'll just copy them from her folder. Permission denied? What the hell? They're our photos!

      Superficially, computers are simpler, but as soon as you start to do real tasks with them, the underlying complexity soon leaks through. It's just not possible to add all those useful features and protection mechanisms while keeping the simplicity of a 286 running DOS.

    270. Re:You mean physical memory right :-) by Guido+del+Confuso · · Score: 1

      You must be joking. Or do you seriously have problems on a daily basis watching videos, saving documents, copying photos, and so on? If you really do, then I feel sorry for you and you should take a computer class, because the rest of us don't regularly struggle with doing simple tasks like you've described. Sure, things go wrong, but software is getting better and better and handling problems automatically (Quicktime will attempt to download missing codecs for you, for example). And when things go really wrong, that's why we have tech support, because not everybody has to be a computer expert just to use the system.

      By the way--in case you haven't realized--you can't do many of those things at all on a DOS computer, at least not without in depth knowledge of how the system works. Photos? Not in a text interface, maybe if you have a helper program and know how to use it. Videos? Forget it. In fact, most people who sat down at DOS computer would have no idea what to do with it, whereas the majority of people can figure out how to operate a Mac (or Windows, or really practically any modern computer) more or less on their own.

      Do you have trouble driving a car because you can't figure out how to operate the stereo? I certainly hope not. For the tasks most people want to do, computers are vastly simpler today than they have ever been. Nobody is claiming they are perfectly intuitive, but even as they become more technically complex, they are becoming more user friendly (i.e. less complicated to operate).

    271. Re:You mean physical memory right :-) by Isvara · · Score: 1

      > Or do you seriously have problems on a daily basis

      Why does it matter whether it happens daily, monthly or yearly? The fact that it happens is the point, so leave the pointless hyperbole out of it.

      > watching videos

      Yes, I've had trouble watching videos on several occasions. I've had to download a third party piece of software (GSpot) to find out which codecs some videos use so I can find and download the appropriate ones. I can do that. Some people would just give up when they see the cryptic error message from Windows Media Player (the default player in Windows).

      > saving documents

      No, but then I understand the differences between various file formats. Many people don't.

      > copying photos

      If I want to, say, upload photos to Facebook I have to log in to my wife's account, find the photos I want, export them into the shared user folder, log out, log back into my account and open them from there. Not as simple as if there were no file permissions.

      > the rest of us don't struggle with doing simple tasks

      I don't struggle with them. I know perfectly well how to deal with them. But I'm an advanced user, not a typical one.

      > By the way--in case you haven't realized--you can't do many of those things at all on a DOS computer

      Y'know, if you turn around and start running now, you might just be able to catch up with the point that flew over your head.

      It's *because* you can do many more things with computers now that they're more complex, not simpler. Go look up function point analysis or something and learn how you can actually put numbers on these things.

      > whereas the majority of people can figure out how to operate a Mac (or Windows, or really practically any modern computer) more or less on their own

      So they're more intuitive, yes. That doesn't make them less complex.

      > For the tasks most people want to do, computers are vastly simpler today than they have ever been.

      Perhaps by 'simpler' you mean 'easier to use'.

    272. Re:You mean physical memory right :-) by Guido+del+Confuso · · Score: 1

      Why does it matter whether it happens daily, monthly or yearly? The fact that it happens is the point, so leave the pointless hyperbole out of it.

      What? Your original statement was,

      But say I want to watch a video.

      Okay, we're saying you want to watch a video.

      Oh, odd, it won't play. Something about a "codec". What the hell is a codec?

      The implication there is that it happens whenever you try to watch a video. But now you claim you didn't mean what you literally said (if we're watching a video, it won't play). So okay, if it only happens occasionally, you call tech support and let a professional deal with it, much like you do when your car breaks down. The car analogy still stands. What is so hard to understand about this for you?

      Perhaps by 'simpler' you mean 'easier to use'.

      Well, yeah, I would pretty much be using the generally accepted definition of the word "simple" there.

      1. easy to understand, deal with, use, etc.: a simple matter; simple tools.

      I'm not exactly sure what you think the word should mean, but if you look at the context of my posts, it should be fairly obvious what I'm talking about. Read the part where I explicitly said they are getting more technically complex, but easier to operate, thus defining exactly what I meant by "simple", and not what you wanted me to mean.

      Of course computers today can do more than those of yesterday. I stated that computers, like cars, have gotten simpler and so more people are able to use them than they were before. And when both cars and computers require maintenance, as they invariably do, there is nothing wrong with not doing it yourself. You responded by saying my analogy was bad, because computers are not getting simpler. I pointed out that just as cars have become simpler, computers have too, so the analogy was perfectly valid. Even if you believe "simple" means something other than what I defined it to mean, the analogy is still valid because cars and computers have gotten "simpler" in the exact same way (more technically complex, yet easier to use). Then you seemed to state that modern computers are somehow harder to use than the computers of 20 years ago, a claim that is laughable on its face.

      Y'know, if you turn around and start running now, you might just be able to catch up with the point that flew over your head.

      Y'know, I honestly don't think you have a point. You just want to quibble about a dictionary definition. Unfortunately, it turns out you're flat out wrong about that. Sorry.

    273. Re:You mean physical memory right :-) by HexOxide · · Score: 1

      Hey, sometimes being and asshole also WORKS.

      Recently here in New Zealand with our ISP Snap (Which is actually really very good the majority of the time, and far far better than every other ISP available) we had our internet go down, and it was because they kept insisting on us to pay for the month in advance.

      (This wasn't the first time we'd be disconnected for this reason.)

      So we ring the up and tell them our connection was down, they explain to us that our bill for the next month was over due and they had cut us off and we needed to make our next advance payment. So we hang up on the guy and go to do that...

      Oh...

      Wait...

      Can't internet bank, without...

      Y'know...

      The internet

      So we ring them back up, and after half an hour of arguing with a couple of the techs, a guy from accounting and their manager over whether or not we could access the bank's website even though we'd been cut off, they realise their filter is broken, so they actually manage to get that working, so we hang up, and go to make the payment...

      Oh...

      Wait

      It's the WEEKEND, the money isn't going to go through until MONDAY, it's saturday morning. So we ring them back up and point this out to them, and so after about another hour arguing with the techs etc over why these policies were dumb, asking why we got cut off on a WEEKEND when we couldn't make a payment, and why we never recieved any notification that we were going to be cut off, and how we were running a business and in the middle of a couple of court cases and not very happy at all that we had no internet when we really needed to send and recieve crucial emails, one of the techies rings, and wakes up a director, who then gets in touch with the CEO, who supposedly came in to personally re-enable our connection, and abolish these new policies which were obviously garbage.

      So I felt really bad for getting impatient, and frustrated with these techies and treating them kinda crappily, specially since they were just doing their job, and following the new policies etc, ontop of that Snap hire REAL qualified tech support, who tend to know what they're talking about, get on top of the problem, and not dick you around, as oposed to Telecom and Orcon's Asian/Indian thick accented script readers...
      But hey, it got everything sorted out right?

      --
      Can I leave this box empty?
    274. Re:You mean physical memory right :-) by mgiuca · · Score: 1

      Sure. But one is not an "idiot" for confusing virtual and physical memory.

      Also, in this crazy day and age, I have difficulty understanding the difference between "a program" and "a website" ;)

    275. Re:You mean physical memory right :-) by qoncept · · Score: 1

      1) Asshole is not the same as stupid 2) You said it yourself -- choose to remain uneducated, because they do what they do, and its not computers 3) The post you reply to mentioned that people are good at OTHER things -- you didn't mention how good of a lawyer guy X was 4) Your example isn't tech support, it's "fix your shit." His knowledge wouldn't matter.

      --
      Whale
    276. Re:You mean physical memory right :-) by jon3k · · Score: 1

      "You might think well they said paging file not virtual memory, well click on Change button and you'll see the dialog pop up named "Virtual Memory" of which you can specify multiple paging files on multiple drives if you wanted to."

      The title of the window is Virtual Memory because the disk paging file is a feature of the virtual memory subsystem.

      For example in windows explorer if you open folder options, the title of the window is "Folder Options" but you can set file type associations. That doesn't mean that file type associations and folder options are interchangeable, just that it's a feature of the folder options section.

      Why do people struggle with this concept? My computer has memory, if I replace the memory I didn't replace the whole computer. It's a subsystem inside of a larger system.

      Ugh, I'm out of analogies.

    277. Re:You mean physical memory right :-) by shentino · · Score: 1

      The 3-4G hole is the 32-bit analogue of the 640k-1M hole on 16-bit systems.

    278. Re:You mean physical memory right :-) by mysidia · · Score: 1

      Turn off your new 4gb computer, put it in a box, and send it to me.

    279. Re:You mean physical memory right :-) by Anonymous Coward · · Score: 0

      Out of pure curiosity

      aren't you mixing virtual address space with virtual memory?

      by 'virtual' i always understood 'something that appears but physically does not exist' (there's even a note what's the difference between 'virtual' and 'invisible' - second 'physically exists but does not appear')..

      so basically virtual ADDRESS SPACE is allocated by CPU and translated to physical address space.

      virtual MEMORY is a memory chunk that is simulated by swapping data to other medium and back.

    280. Re:You mean physical memory right :-) by omfglearntoplay · · Score: 1

      I'm not sure if it is fair or not, but if you get Gold Support with Dell, you can usually skip at least a decent portion of the "don't want to send a tech out" people. There is still some red tape, but way way less.

      And go figure, it costs money because it pays someone's salary in the US who is actually a knowledgeable "computer person", not a voice on the phone.

      My gold support has always been with the server guys, so ymmv.

    281. Re:You mean physical memory right :-) by QuietObserver · · Score: 1

      Curious point.

      I work in tech support, and just the other day one of my co-workers had a call from someone who apparently didn't even know what a mouse was; she spent at least fifteen minutes trying to get the customer to understand what he needed to do to right-click. I don't believe he was using the mouse as a foot pedal, but that is still an extremely amusing anecdote, in my opinion.

    282. Re:You mean physical memory right :-) by yoda-dono · · Score: 1

      "Han and Chewie? It's a Life Day Miracle!"

  2. Memory exists to be used by Alereon · · Score: 5, Insightful

    Memory exists to be used. If memory is not in use, you are wasting it. The reality is that your system will operate with higher performance if unused data is paged out of RAM to disk and the newly freed memory is used for additional disk caching. Vista's memory manager is actually reasonably smart and will only page data out to disk when it really won't be used, or you experience an actual low-memory condition.

    1. Re:Memory exists to be used by etymxris · · Score: 5, Interesting

      I've known this argument for many years, I just don't think it applies anymore. The extra disk cache doesn't really help much, and what ends up happening is that I come in to work in the morning, unlock my work XP PC, and I sit there for 30 seconds while everything gets slowly pulled of the disk. XP thought it would be wise to page all that stuff out to disk, after all, I wasn't using it. But why would I care about the performance of the PC when I'm not actually using it?

      At the very least, the amount of swap should be easily configurable like it is in Linux. I haven't actually used a swap partition in Linux for years, preferring instead to have 6 or 8gb of RAM, which is now cheap.

    2. Re:Memory exists to be used by ivan256 · · Score: 3, Insightful

      What you're actually complaining about is that Windows did a poor job of deciding what to page out. Sure, you could "turn off swap" if you have enough memory, and you won't ever have to wait for anything to be paged in.. But your system would be faster if you had a good paging algorithm and could use unaccessed memory pages for disk cache instead.

    3. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      That's pretty shortsighted. It's like saying if your hard drives aren't all completely filled to the brim, then you are wasting it.

      The reason I don't want all of my RAM being used is because I know much further in advance than the computer does about when more RAM will be needed and by which specific applications. If that memory is being hoarded by unneeded crap, then my important tasks suffer.

    4. Re:Memory exists to be used by Timothy+Brownawell · · Score: 4, Informative

      At the very least, the amount of swap should be easily configurable like it is in Linux. I haven't actually used a swap partition in Linux for years, preferring instead to have 6 or 8gb of RAM, which is now cheap.

      It is, (Right-click "My Computer")->Properties, "Advanced" tab, "Settings" under Performance, "Advanced" tab, "Change" under "Virtual memory". Almost as easy as "dd if=/dev/zero of=swapfile bs=1G count=1; swapon swapfile", spclly if u cant spel cuz u txt 2 much.

    5. Re:Memory exists to be used by etymxris · · Score: 1

      To do it well, Windows would have to know what I was going to use before I started using it. I'd rather just use the extra physical memory than have my operating system try to figure when I'm going to come in in the morning or when I'll decide to hit the IDE or email client again.

    6. Re:Memory exists to be used by SnarfQuest · · Score: 1

      Another thing to consider. When you start a program using virtual memory, only the pages of the program that get executed are pulled off the disk. This reduces disk accesses, and leaves more memory available for caching.

      Also, if several instances of a program are being executed, or several references to a library, the common code between them is not duplicated in memory. The virtual memory system just points the processes to the same binary code. This causes even more memory savings and disk access reductions.

      --
      Who would win this election: Andrew Weiner vs Andrew Weiner's weiner.
    7. Re:Memory exists to be used by aliquis · · Score: 1

      Exactly, you want virtual memory because you want you ram available / usable by the applications which would benefit the most from it and not by whatever happened to allocate it first.

    8. Re:Memory exists to be used by amliebsch · · Score: 2, Informative

      Are you sure? I was under the impression that Vista aggressively pages out when it thinks it can do it without impacting system performance, but will utill keep the page in RAM. That way the RAM can be quickly freed and used for other processes if needed (i.e., large programs can start quickly), and the disk page ignored and overwritten (ultimately never helping but never hurting much either) if it is ultimately never used.

      --
      If you don't know where you are going, you will wind up somewhere else.
    9. Re:Memory exists to be used by mea37 · · Score: 2, Interesting

      I think you might have awfully high expectations of the paging algorithm, if you think it's "bad" because it paged out data that wasn't being used for something like 16 hours.

      Perhaps the problem is that the cost/benefit values of "keep an app that isn't being touched in RAM" vs. "increase the available memory for disk caching", while they may be appropriate when the computer is actually being used, are not optimal for a computer left idle overnight. The idle computer has a higher-than-expected cost (in terms of user experience) associated with paging the idle app, and a lower-than-expected benefit to increasing the cache size.

    10. Re:Memory exists to be used by Alereon · · Score: 1

      The reason I don't want all of my RAM being used is because I know much further in advance than the computer does about when more RAM will be needed and by which specific applications. If that memory is being hoarded by unneeded crap, then my important tasks suffer.

      The Windows memory manager knows far more than you do about your system's memory utilization and how to optimally allocate the available physical memory. The disk cache data can be purged without delay if that memory is needed by an application, so it's not like you have to wait for memory to be freed up before it can be used. The only case in which there can be a negative performance impact is if the system does end up paging out data an application needs, which is rather unlikely. The only way I've been able to cause a performance problem with the Windows XP memory manager was with heavy Bittorrent seeding over a period of hours, the system would see the constant disk I/O and prioritize more RAM for the disk cache. I used a third party program to modify the disk caching settings to prevent this problem. Alternatively, I could have not been seeding a hundred Linux ISOs. I haven't been able to reproduce this performance loss in Vista.

    11. Re:Memory exists to be used by SiChemist · · Score: 4, Informative

      You can also adjust the "swappiness" of a computer running linux. I've set my desktop to have a swappiness of 10 (in a scale of 0 to 100 where 0 means don't swap at all). In Ubuntu, you can do sudo sysctl vm.swappiness=10 to set the swappiness until next boot or edit /etc/sysctl.conf and add vm.swappiness=10 to the bottom of the file to make it permanent.

      The default swappiness level is 60.

    12. Re:Memory exists to be used by Cramer · · Score: 2, Informative

      if you decide to hibernate

      If I decide anything, it will have to wake up, pull everything back off disk, to do anything. If your power settings lead to hibernation after some (long) idle time, then it doesn't f'ing matter if it's already pushed everything to disk hours previous.

      it helps with crash recovery

      BULL! When the system restarts, it does not care one bit what's in the pagefile. All the work you had open and unsaved is still gone. All of the filesystem delayed writes will be completed after just a few minutes of idle time, so pushing everything to the pagefile is nothing but a waste of time. And if you're on a laptop, your system very likely had to spin the drive back up to write all that crap.

    13. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      No, it doesn't. Windows doesn't know I plan to stop using Photoshop for the next 7.5 minutes, fire up a VirtualDub batch, browse for 5 minutes then resume using Photoshop for a memory intensive operation.

      And I beg to differ. It DOES take time to empty out RAM. I have to sit there and wait for it to swap things out to the hard drive. If I already have available RAM, then I know exactly how much and how much I'll need.

    14. Re:Memory exists to be used by Eil · · Score: 1

      Memory exists to be used. If memory is not in use, you are wasting it.

      If you swapped "memory" for "disk space", I might agree with you. However, modern operating systems are very good at using whatever amount of memory you throw at them. Whatever isn't used by applications is allocated as disk cache by the kernel, meaning you get better performance overall simply by adding more memory because the kernel doesn't have to go to disk as often for data. The only problem is that as the amount of memory rises, the likelihood of actually being able to perceive a performance improvement declines.

      On a desktop system or lightweight server, it's usually not worth it to have more than twice as much memory as your applications actually consume. But on a server running 20 virtual machines, I've documented a huge performance difference between 8GB of memory and 12GB of memory on systems where total memory being used by all VMs is less than 4GB.

    15. Re:Memory exists to be used by hey! · · Score: 3, Interesting

      Memory exists to be used. If memory is not in use, you are wasting it.

      While I grant this statement is in a sense true, a system designer would do well to ponder the distinction between "not used" and "freely available".

      RAM that is not currently being used, but which will be required for the next operation is not "wasted"; it is being held in reserve for future use. So when you put that "unused" RAM to use, the remaining unused RAM, plus the RAM you can release quickly, has to be greater than the amount of physical RAM the user is likely to need on short notice. Guess wrong, and you've done him no favors.

      I'm not sure what benchmark you are using to say Vista's vm manager is "reasonably smart"; so far as I know no sensible vm scheme flushes swaps out pages if there is enough RAM to go around.

      My own experience with Vista over about eighteen months was that it is fine as long as you don't do anything out of the ordinary, but if you suddenly needed a very large chunk of virtual memory, say a GB or so, Vista would be caught flat footed with a ton of pages it needed to get onto disk. Thereafter, it apparently never had much use for those pages, because you can release the memory you asked for and allocate it again without any fuss. It's just that first time. What was worse was that apparently Vista tried to (a) grow the page file in little chunks and (b) put those little chunks in the smallest stretch of free disk it could find. I had really mediocre performance with my workloads which required swapping with only 2-3GB of RAM, and I finally discovered that the pagefile had been split into tens of thousands of fragments! Deleting the page file, then manually creating a 2GB pagefile, brought performance back up to reasonable.

      One of the lessons of this story is to beware of assuming "unused" is the same as "available", when it comes to resources. Another is not to take any drastic steps when it comes to using resources that you can't undo quickly. Another is that local optimizations don't always add up to global optimizations. Finally, don't assume too much about a user.

      If I may wax philosophical here, one thing I've observed is that most problems we have in business, or as engineers, doesn't come from what we don't know, or even the things we believe that aren't true. It's the things we know but don't pay attention to. A lot of that is, in my experience, fixing something in front of us that is a problem, without any thought of the other things that might be connected to it. Everybody knows that grabbing resources you don't strictly need is a bad thing, but it is a kind of shotgun optimization where you don't have to know exactly where the problem is.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    16. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      Unlock? I hope your employer takes your overnight power usage out of your wages. Ever heard of "Off"?

      "Oh noes, it took 100 seconds to boot, I could never make that time back!

      <sip>"

    17. Re:Memory exists to be used by Trailer+Trash · · Score: 1

      What you're actually complaining about is that Windows did a poor job of deciding what to page out.

      I hate to stand up for Windows, but "this process has been idle for 16 hours" is hardly a "poor job of deciding what to page".

    18. Re:Memory exists to be used by Bill,+Shooter+of+Bul · · Score: 1

      Here's the thing though: Every version of windows has promised better virtual memory management, faster application load times, and better performance. To a casual observer, they seem to be doing the exact opposite.

      They could improve customer satisfaction by having more options available. Even if the other algorithms wouldn't be best for most usage scenarios, simply having options would satisfy many people. Most people wouldn't' change from the default, but those that complained about the default could see how bad it would be if it were not as good. Maybe some people complaining about it would realize that its for the best, maybe others would actually find one that was optimal for their usage.

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    19. Re:Memory exists to be used by Anonymous Coward · · Score: 1, Interesting

      Vista's memory manager is actually reasonably smart

      We must be using different Vista implementations. I have VU64 with 2GB of memory on a dual core. I had better performance in OS/2 with 16MB on a 386/20. As far as I can tell Vista takes the least used stuff and keeps it in RAM paging out executables that are running, so switching to another application is abysmally slow, how about 30+ seconds to get the lock menu from C-A-D or the fingerprint scanner taking a similar amount of time before it will wake up and recognize a swipe at the login. Just now coming back to edit from preview I had to wait over 15 seconds to get the Firefox RCLICK spellcheck up that I used less than 60 seconds ago! What the heck is it doing that these frequently accessed tasks have such low priority, aside from looking for copyright infringement on my unsupported sound-card (both the Lenovo integrated chipset and an add-in card that claimed Vista compatibility.) Vista paging/caching/drivers has a LONG way to go to even be useful, let alone smart.

    20. Re:Memory exists to be used by jguthrie · · Score: 1

      The Windows memory manager knows far more than you do...

      That reminds me of the oven in my house that apparently knows far more than I do about whether or not I want to bake anything. My intention is to replace it as soon as the repairs to fix the damage from hurricane Ike are complete, and I'm going to replace it with the dumbest appliance I can find.

      Look, I know the logic that that says that since RAM is a scarce resource a virtual memory manager must be running at all times to properly manage that scarce resource. I read about it the last time it came up on Slashdot, and, well, I didn't believe it then, either. Oh, I believe the assertion that a scarce resource must be carefully managed. It's just that I no longer believe that semiconductor RAM is particularly scarce. I mean, if I could demonstrate that all of my programs' working sets and all of the file data that they're going to access can all fit in RAM at once, then wouldn't you agree that virtual memory management is unnecessary?

      Of course, demonstrating that everything is going to fit in semiconductor RAM is not a trivial task, but I can't help but think that caching a lot of most large files is pretty useless. I mean, if you're streaming a video of a movie, you need to prefetch enough of it that you don't have to worry about underruns and once you've played a frame there's no point in keeping it around any longer, so I would think that 100 MB of buffer would suffice for videos that are gigabytes long and 100 MB is 2.5% of the memory in a computer that has 4G of semiconductor RAM. That implies that the bulk of the benefit of caching comes from caching small files, like the intermediate files generated when compiling or processing email or stuff like that.

      Of course, my not believing something doesn't make it false, but I'd still like to see some more effort placed into demonstrating that semiconductor RAM remains a scarce resource. I'm afraid that your bittorrent seeding example suggests to me rather the opposite: RAM on your machine is so plentiful that you have to seed a hundred Linux ISOs to make it scarce.

    21. Re:Memory exists to be used by jmorris42 · · Score: 1

      > ...and I finally discovered that the pagefile had been split into tens of thousands of fragments!

      And that is why most Linux systems are setup to swap to a seperate partition. Yes we could just use a swapfile like Windows does, but the folks putting together OUR distributions have a little more clue than Balmer's Monkeys. It's still handy though to be able to throw an extra gig or two of swap at a problem with a quick dd and swapon.

      But really, these days swap is a relic of a day when RAM was expensive. Don't think any of the SSD based netbooks use swap at all and they get along just fine.

      On the other hand the Windows folk are currently stuck with a 3-3.5GB max ram limit on most machines so they have some serious limits of just how much they can overkill the memory load.

      --
      Democrat delenda est
    22. Re:Memory exists to be used by dgatwood · · Score: 1

      You don't really want data in two places (one in physical memory and one copy on the disk VM), since by definition, one copy is "dirty".

      I agreed with you up until that point. There's nothing wrong with having copies in two places at once. Applications and memory-mapped file data are in two places pretty much all the time. A page doesn't become dirty until an application writes to it, and as long as the kernel knows that the page has been written to disk and flags that page as read-only (so that a write to the page traps into the kernel), the kernel could invalidate the on-disk copy if it ever changed. This is essentially the same basic technique that OSes use for copy-on-write page sharing, just reapplied to sharing between the swap file and RAM.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    23. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      I'm not sure if it's true anymore, but classic OS design textbooks like to talk about simple, low-overhead page eviction strategies. Given that modern CPUs spend a lot of their time just waiting for IO, with a high cost for swapping out the wrong page, it might make sense to use a smarter page eviction algorithm.

    24. Re:Memory exists to be used by dgatwood · · Score: 1

      If I decide anything, it will have to wake up, pull everything back off disk, to do anything. If your power settings lead to hibernation after some (long) idle time, then it doesn't f'ing matter if it's already pushed everything to disk hours previous.

      I think you misunderstood. If you close your laptop or select "Hibernate" from the appropriate menu, the amount of time you have to wait before the hard drive spins down and it is safe to move your machine is directly proportional to the number of dirty pages in RAM that must be written out to a hibernation file. Paging mostly-idle pages out to disk can significantly reduce that delay. The GP was very much correct in that statement.

      BULL! When the system restarts, it does not care one bit what's in the pagefile. All the work you had open and unsaved is still gone. All of the filesystem delayed writes will be completed after just a few minutes of idle time, so pushing everything to the pagefile is nothing but a waste of time. And if you're on a laptop, your system very likely had to spin the drive back up to write all that crap.

      Some OSes write panic backtrace information into the swap file, which is then retrieved and copied to a file on disk after a reboot. It doesn't aid in recovering data (unless you are a l33t haxxor), but it does help developers diagnose what happened in the event of a crash and prevent it from happening in the future. I assume that's what was meant. Also, if your power runs low enough, cutting the seconds-to-hibernate time by even a couple of seconds can mean the difference between getting your RAM paged to disk successfully and losing everything.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    25. Re:Memory exists to be used by dgatwood · · Score: 1

      And I beg to differ. It DOES take time to empty out RAM. I have to sit there and wait for it to swap things out to the hard drive. If I already have available RAM, then I know exactly how much and how much I'll need.

      Reread the GP. The post said that it doesn't take time to empty out "clean" RAM pages (e.g. disk cache pages). That is effectively a correct statement, discounting the time needed to zero-fill the page. Disk cache pages are never paged out to disk in a proper OS; their contents are already on disk. Pages that have to be pushed out to disk are a different matter entirely.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    26. Re:Memory exists to be used by chill · · Score: 1

      A matter of opinion.

      It should also note that the entire system has been idle for 16 hours, so don't bother paging out those idle apps because EVERYTHING is idle.

      --
      Learning HOW to think is more important than learning WHAT to think.
    27. Re:Memory exists to be used by uhmmmm · · Score: 2, Informative

      What could be done, and I believe Linux can do, is write the pages out to swap space, but as long as there's no reason not to, keep the copies in RAM as well.

      If you need the RAM for disk cache, the RAM copy can be dropped since it already exists on disk. If the program needs to access memory, it's already there and doesn't need swapped back in.

      If the claim that windows swapped out everything when the computer was left idle overnight is correct, then it is indeed a suboptimal paging algorithm. An idle computer has no reason to remove things from RAM, as there's nothing it needs the space for.

    28. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      "turn off your computer, put it in a box and mail it back to the manufacturer"

    29. Re:Memory exists to be used by Fulcrum+of+Evil · · Score: 2, Insightful

      I think you might have awfully high expectations of the paging algorithm

      Can you blame him? Linux does a far better job, so you'd think the biggest software company in the world could put in a good show.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    30. Re:Memory exists to be used by Jeremi · · Score: 1

      An idle computer has no reason to remove things from RAM, as there's nothing it needs the space for.

      The thing is, it probably wasn't idle for 18 hours. It probably did a disk index or something in the middle of the night, which had the side effect of paging out all of the user's GUI data and replacing it with cached disk data. That would explain why the GUI stuff gets paged back in when he sits down to use the machine.

      I suppose a really clever OS might note what times of day its user usually resumes using it, and could then for a re-page-in of all the user's data a few minutes before then....

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    31. Re:Memory exists to be used by Fulcrum+of+Evil · · Score: 1

      If the windows swapper knows so much, why does it suck so bad?

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    32. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      This is a very good point. The "free memory" you see is not actually free; it's used as a huge filesystem cache. This speeds up your apps a heck of a lot more than keeping all of them in memory with a small filesystem cache.

      On a related note, I really hate Windows' handling of the filesystem cache. This is one of the reasons I uninstalled TortoiseSVN and went back to command line; whenever I'd browse around a large repository, Windows would wait until the absolute last moment it could, then stall the system for two seconds while it flushed the entire damn cache. I just couldn't stand it anymore.

    33. Re:Memory exists to be used by Alereon · · Score: 1

      Here's the thing though: Every version of windows has promised better virtual memory management, faster application load times, and better performance. To a casual observer, they seem to be doing the exact opposite.

      In my experience, they've delivered on this. Even though Vista is much maligned, my experience is that it's noticeably faster than XP when running on capable hardware. This is due to the improved disk caching, prefetching, and hardware-accelerated UI. I noticed a similar improvement with Windows XP. It is definitely NOT intended that a new version of Windows run as well on the same hardware as the previous version did, so expecting that you can do an OS upgrade and get significant gains is a little unrealistic.

      They could improve customer satisfaction by having more options available. Even if the other algorithms wouldn't be best for most usage scenarios, simply having options would satisfy many people. Most people wouldn't' change from the default, but those that complained about the default could see how bad it would be if it were not as good. Maybe some people complaining about it would realize that its for the best, maybe others would actually find one that was optimal for their usage.

      This is actually already available. Control Panel, System, Advanced, Performance Settings. You can change scheduler and memory management modes. Further low-level options are available in the registry. You can also use third-party programs to manage these settings in real-time. I've used O&O Software's CleverCache Pro to pretty good effect on XP, though I think it only provided benefits because my usage was an edge-case that the default settings didn't cope well with. While I'm pimping O&O Software, I'll note that I love the hell out of O&O Defrag in XP and Vista.

    34. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      Windows XP (and probably prior versions, I think they fixed it up in Vista) considers an application that has been minimised for a second to be 'a good thing to swap out'. This is clearly *bad* and leads many of us to completely disable the Windows swap file to regain snappy performance.

    35. Re:Memory exists to be used by gr8_phk · · Score: 1

      It's one thing to write pages to disk before necessary (which I do question). It's entirely another story to invalidate the memory pages when someone isn't doing anything and then have to read them back in off the disk. You can have valid data in BOTH places. The bottom line is that Windows is just stupid in this regard. My Linux box has 1GB of RAM and 4GB of swap and it generally uses 1/2 the RAM and none of the swap. And yes, that means I've allocated way more swap than I need.

    36. Re:Memory exists to be used by localman · · Score: 1

      The reality is a bit more variable. While it may sometimes be better to page out program data for disk caching, this is certainly not always true. A large DB system I used to administer performed much better without doing so. Luckily Linux supports a "swappiness" variable in /proc, which we turned way down. That prevented some major memory problems we were running into.

      This was probably related to the fact that the DB software was doing some of it's own higher level data caching, so the OS level disk caching was redundant, but in any case the system ran measurably better over time with low swappiness. I have heard that for most desktop systems it's the other way around, as you say.

      Cheers.

    37. Re:Memory exists to be used by Cramer · · Score: 1

      Closing your laptop is an immediate action, so there is no "idle time" for the system to decide to swap out everything. If you leave your laptop sitting for an hour and then close the lid, it will do the exact same thing as clicking "hibernate". To click "hibernate" manually requires a great deal of swaped-out-because-it-was-idle crap to be swapped back in. Even pressing the power button to effect hibernation (by default or by the popup) requires de-swapping. And hibernation copies out the entire contents of ram -- all of it, not just the "dirty pages".

      The windows crash backtrace information is not created until the system crashes. At that point, protected code fills the pagefile with the contents of ram (or the info for the minidump.) On the next startup, the system sees the pagefile contains crash info and copies it. (I know the process far, FAR too well from debugging screwed up windows drivers.) This has nothing to do with what the poster was saying... paging ram to disk does f*** all to protect anything. A crash -- power failure, whatever -- is a crash; your unsaved work is gone. period.

    38. Re:Memory exists to be used by Carnildo · · Score: 1

      Memory exists to be used. If memory is not in use, you are wasting it. The reality is that your system will operate with higher performance if unused data is paged out of RAM to disk and the newly freed memory is used for additional disk caching.

      This does not apply any more. My (Linux) system has 8GB of RAM. That's enough to have every program I routinely use running (2.5GB), and store every other program I might use in a ramdisk (3GB), while leaving 3.5 GB available to cache data files. If it weren't for my desire to protect against random hardware failures, my computer could go weeks without accessing the hard drive.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    39. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      Why the hell aren't you shutting your computer down at night? There's just no excuse for wasting all that energy.

    40. Re:Memory exists to be used by Culture20 · · Score: 1

      Not sure, but you might be able to do similar adjustments on Windows in the registry:
      "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"

    41. Re:Memory exists to be used by celtic_hackr · · Score: 1

      What you're actually complaining about is that Windows did a poor job of deciding what to page out.

      Isn't that kind of the entire point of the original question? If Windows does a crappy job in deciding what to swap out, and when, then is there really any good reason to use the crappy Windows caching software. Or wouldn't it be better to simply cripple the swap feature. I think in Windows, it is inadvisable to completely disable it, and Windows internals depend on it being there and several tools and apps malfunction (ie Blue Screen) if it is turned off. Sure Windows caching software works fine in certain very limited usage patterns. Once you stray outside of the types of usage the Windows engineers anticipated, the algorithm's usefulness tanks. As is true with any algorithm. No algorithm is a magic pill. That is not saying the Windows guys did a bad job, and I use crappy only as an example only (really they do know what they're doing). Everything is a trade-off.

      The best answer here, and I'm surprised I haven't seen it yet, is:
      1) turn off the cache,
      2) do some real world usage with the system and capture datapoints,
      3) turn on the cache, rinse and repeat,
      4) use the set up that works best for you.

      There are real reasons to have a cache, but depending on your situation, you may not need it.

    42. Re:Memory exists to be used by paganizer · · Score: 1

      I'm going to attempt not to use all caps, or otherwise excessively rant.
      First: It's obvious what the main problem is; the system is running Vista. XP Home 32 would be better. slightly. If you just have to have Aero, dual-boot to Linux and run Compiz Fusion.
      Second: the Memory thing. Dude. come on. I know Microsoft started preaching that "unused memory is wasted thing" when Vista came out, but seriously.
      If the only applications you are running are Integrated Vista apps, or Microsoft apps designed specifically to take advantage of Vista's memory management scheme, then you would have something resembling a point. But...if not... like you run an application from a 3rd party? free memory. the more free memory, the better. Even better, maybe you can have an operating system that doesn't grow and expand and glut to take up every bit available, maybe even one that takes up a small tiny footprint, both in CPU use and RAM, leaving the majority of system resources for applications! What a concept!
      If you have to have Vista because there are no XP or win2k drivers for the hardware you are running, I can see it. I would definitely get better hardware personally, but I can see it. But if your hardware will run on Win2k or XP, it'll run BETTER on Win2k or XP; faster, more stable, better in all ways. Without a doubt.
      And, like I said, if you just have to have eye candy, Compiz fusion blows everything else away.

      --
      Why, yes, I AM a Pagan Libertarian.
    43. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      dd if=/dev/zero of=swapfile bs=1G count=1;

      I think if you can run that command successfully, you aren't in need of swap :)

    44. Re:Memory exists to be used by jpmorgan · · Score: 1

      I suppose a really clever OS might note what times of day its user usually resumes using it, and could then for a re-page-in of all the user's data a few minutes before then....

      You mean, what Vista does? :-)

    45. Re:Memory exists to be used by joelleo · · Score: 1

      "... but I'd still like to see some more effort placed into demonstrating that semiconductor RAM remains a scarce resource."

      Well, considering in 32 bit Windows-land each process is allocated 4GB of "virtual address space" (the set of virtual memory addresses the process has available to it; 2GB for user and 2GB for kernel by default) you can quickly demonstrate that ram is a scarce resource. Multiply the # of processes running on your system by 4GB and you'll see the exact amount of virtual address space windows is allocating :)

      64 bit Windows-land allocates 8TB per 64 bit process, fwiw.

      reference:

      http://msdn.microsoft.com/en-us/library/aa366778.aspx

      --
      "In the end, there is simply no weapon more devastating than the truth, delivered in just the right way." - tnk1
    46. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      "dd if=/dev/zero bs=1M count=1 seek=1023 of=swapfile" is a lot faster though.

    47. Re:Memory exists to be used by PitaBred · · Score: 1

      Where's the "echo 20 > /proc/sys/vm/swappiness"?

    48. Re:Memory exists to be used by vidnet · · Score: 1

      dd bs=1M seek=1024 count=0 of=swapfile is even faster, but Linux at least refuses to use sparse files for swap.

    49. Re:Memory exists to be used by uassholes · · Score: 1

      "Funny" would be better than "Informative". The post is a contrast of the ease of use of the command line ("dd" command) with all of the tortuous pointy-clicky drudgery of Windows.

    50. Re:Memory exists to be used by Ciaran+Power · · Score: 1

      you left out 'mkswap swapfile'

    51. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      A really clever OS whould have a way for the disk indexer to say do not cache this data as I am doing sequential i/o like the madvise system call under Linux/Unix - http://linux.die.net/man/2/madvise

      "MADV_SEQUENTIAL
      Expect page references in sequential order. (Hence, pages in the given range can be aggressively read ahead, and may be freed soon after they are accessed.) "

    52. Re:Memory exists to be used by eta526 · · Score: 1

      Yes the apps hadn't been used in 16 hours, but what was the system doing with all that memory for those 16 hours? More likely than not, letting it sit unused is what. Why would you not want to leave the data where it can be accessed quickly? (This is NOT a rhetorical question; if there is a good answer, I want to know it.)

    53. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      He's saying it's easier to TURN OFF, not to turn on, probably because most linux distributions have the same virus as Windows and practically force you to add swap during install. To turn it off in linux, just type swapoff -a (and/or comment out the swap line in /etc/fstab so your changes are permanent.)

    54. Re:Memory exists to be used by dgatwood · · Score: 1

      Closing your laptop is an immediate action, so there is no "idle time" for the system to decide to swap out everything. If you leave your laptop sitting for an hour and then close the lid, it will do the exact same thing as clicking "hibernate". To click "hibernate" manually requires a great deal of swaped-out-because-it-was-idle crap to be swapped back in.

      That's really beside the point.

      Even pressing the power button to effect hibernation (by default or by the popup) requires de-swapping. And hibernation copies out the entire contents of ram -- all of it, not just the "dirty pages".

      If hibernation copies out all of the contents of RAM, then the hibernation code is fundamentally broken. No VM system in the world pages out dirty pages to disk, so there's no good reason for the hibernation code to do so, either.

      The windows crash backtrace information is not created until the system crashes. At that point, protected code fills the pagefile with the contents of ram (or the info for the minidump.) On the next startup, the system sees the pagefile contains crash info and copies it. (I know the process far, FAR too well from debugging screwed up windows drivers.) This has nothing to do with what the poster was saying... paging ram to disk does f*** all to protect anything. A crash -- power failure, whatever -- is a crash; your unsaved work is gone. period.

      That's true, but if you don't have a paging file at all, that crash dump info is lost entirely, which was my point. I'm giving the O.P. the benefit of the doubt.

      For that matter, there's no reason an OS couldn't checkpoint/freeze-dry application state in such a way that you could do crash recovery using the previous paging file; they just don't do so currently. I considered writing such code a few years ago. You'd lose networking state, so all your kernel sockets would have to be closed, but it is at least possible. That said, I was contemplating it more from the angle of writing rollback points every few minutes so that if an application crashed, you wouldn't lose data. Still, it is the same idea, faces the same problems, and would use the same basic design. (The biggest problem would be the need to simultaneously checkpoint any apps that share data pages with each other.)

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    55. Re:Memory exists to be used by mea37 · · Score: 1

      That depends on a lot of things, but the basic question is: is the computer really idle? What if it runs an AV scan overnight? Unless there's some way for a process to hint the OS as to what it's doing, suddenly it's going to seem like you need all the disk cache you can get.

    56. Re:Memory exists to be used by Bert64 · · Score: 1

      That is really a poor decision tho, everything has been idle for 16 hours suggesting that the user has gone away and will eventually be back and want to use his apps.
      Interactive desktop apps should not get swapped out unless it's absolutely necessary...
      Also, apps which read files that are unlikely to be read again any time soon should bypass the caching system... as someone pointed out earlier, antivirus will read every file once, spooling a video off disk is only likely to be done once etc.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    57. Re:Memory exists to be used by Abcd1234 · · Score: 1

      I hate to stand up for Windows, but "this process has been idle for 16 hours" is hardly a "poor job of deciding what to page".

      Yeah, but if the machine was just sitting their idle overnight, why the hell was anything paged out in the first place?

    58. Re:Memory exists to be used by swilver · · Score: 1

      It looks like a solid argument, but it really only applies to certain environments.

      From a user's perspective, there's only one time when performance matters: When they're at the keyboard.

      I don't care if my system runs 0.0001% better when I'm NOT at the keyboard... I don't give a damn what the reasons are that my programs don't work snappy anymore when I get back to the system, when I get back to the system I expect my programs to work as they did before I left it. These days, that is EASILY possible, so why doesn't Windows care about the user experience?

    59. Re:Memory exists to be used by swilver · · Score: 1

      Unfortunately, there's no paging algorithm that is smart enough to do this. It would need to be able to predict when I intend to do something before I know I wanted to do it (yes I know Vista is trying to do that.. emphasis on "trying"). It would need to predict that I got home at 3 am on a thursday night, and instead of going straight to bed would realize I wanted to check my mail first (and swap it back in before I click it). It would need to predict that after leaving the machine untouched for a week, I suddenly VNC to it from my holiday to check on my torrents progress. In short, it would need to be able to predict the future.

      Until this is possible, the next best thing is to stick enough RAM in and disable swap completely, it is far more optimal than the current algorithm.

    60. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      "Memory exist to be consumed, and consumed it will be, if not by this generation then by some future. By what right this forgotten future seek to deny our birth right? None I say." :)

    61. Re:Memory exists to be used by Anonymous Coward · · Score: 0

      Why would you care about the performance of the PC when you're not actually using it?

      How about, why would you leave it consuming energy when you're not actually using it?

    62. Re:Memory exists to be used by lamapper · · Score: 1

      ...Don't think any of the SSD based netbooks use swap at all and they get along just fine...

      What is the best way to configure Linux on a sub 512MB RAM box, sub notebook, etc..., so that no matter how much you load (application wise) it will not die, although it might run slower should swapping occur? (The system seems to stop swapping as well when Free Memory falls below 10MB and really poorly when it falls below 5 MB. Ideally I would like to maintain 10 - 15 MB of Free RAM Memory available at all times.)

      I know Linux can be configured to run in 128MB of RAM and love that...actually have a PC that I would like to configure and use with that low of RAM. (Intuitively I understand that if I can run with less RAM, when I purchase newer boxes with more RAM I should be able to run, much, much faster...the idea that a system for a normal Power user would ever get sluggish with over 1 GB of RAM is ridiculous in my opinion. If I purchase more RAM, I want my apps to benefit from that, not be required to have it just to function, but than my first work computer was an IBM mainframe with 32KB of RAM, an IBM 360.

      My first desktop was the Radio Shack Model III, (4K RAM, Floppy drives, 12 inch B/W Monitor, keyboard, BASIC in ROM, TRS-DOS on disk, between $700 - $2,500 depending on config)my first IBM PC had either 16kB of RAM, 4.77 MHz Intel 8088, Floppy Disk Drive (credited with its business success per the wiki, aah the power of the floppy), 5 Bus slots (w/Expander in 1 of 5 - 8 more Bus Slots, slots used by Monitor, Hard Disk (if you had one, my first did not), I/O adapters, 3278/3279 Adapter - for moving up to 2 MB files to/from mainframe.), No hard disk for around $3,000. My first lug gable the IBM P70, OS/2 1.2 Extended Edition, MSDOS, Windows 3.1, Microsoft Word, Intel 9600 EX Modem, Hyper Access software, Token Ring Built in, slot for Ethernet, external monitor port (dual monitor mode), 8512 Color Monitor, floppy drive and hard disk (120 MB I believe) cost over $5,000. Made well over $15,000 working out of a hotel room on a consulting contract in a few weeks with that sexy heavy beast which was state of the art at the time. so was well worth the purchase.

      A Intel Celeron M running at 900 MHz sub notebook, 512MB of RAM, 4GB SSD drive, 10/100 & WiFi built in; Web Cam, Audio and Mic ports, 3 USB ports, MMC.SD slot, external monitor port for $300 - $400 is something else... warning...slow loading flash; wiki page.

      I could probably fit 9+ sub Notebooks the size of the Asus Eee PC in the IBM P70 leather carrying case, lol.

      Thanks to the many great posts here I am learning this is a bit art as it is science and I do not mind experimenting with different configurations...

      Read on if you need specifics about my configurations and PCs to help me...honestly looking for the right answers. I too would love to be able to set a MIN and MAX memory point (as another poster mentioned above) to begin swapping IN/OUT only allowing the swap if it is honestly required. Sounds like that is NOT possible at this time, though I sneakingly expect there might be a way...one day as I learn more...might be time to pick up programming in C again.

      On my Asus EeePC I have noticed that my free memory continues to shrink, down to around 4 - 6KB free, at which point my performance suffers greatly. If an app fails or my Network Adapter hic ups when it is this low it can cause a lockup situation for me. I thought about swap space, but based on reading about hard disk performance issues, that does not sound like a good solution. ( Or is it?)

      Now I do this to myself, I will often have

      --
      Is your Internet Throttled? Install DD-Wrt, OpenWRT or Tomato to learn the truth! Google: 1Gbps/1Gbps: 5 Communities
    63. Re:Memory exists to be used by ivan256 · · Score: 1

      It wouldn't have to do that at all. It would simply need to know that there are certain things that shouldn't get swapped out during an idle period. Or better, if the system is idle in general, don't count that time towards the decision of whether or not a page is idle enough to swap out. Or not to swap out idle pages when there's no IO...

      All of these types of algorithms exist already... Just not in your operating system of choice.

    64. Re:Memory exists to be used by ta+bu+shi+da+yu · · Score: 1

      Sigh. I'm afraid that's just not true.

      Each process can access the lower 2GB of the virtual memory address space. Each process does not get a seperate 4GB address space.

      You'd be better of reading the following Microsoft technical article.

      "Windows NT provides a page-based virtual memory management scheme that allows applications to realize a 32-bit linear address space for 4 gigabytes (GB) of memory. As a result, each application has its own private address space from which it can use the lower 2 GB--the system reserves the upper 2 GB of every process's address space for its own use."

      While the article speaks of Windows NT, things haven't really changed that much behind the scenes - the basic algorithm remains the same in all the later Windows operating systems.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    65. Re:Memory exists to be used by joelleo · · Score: 1

      "As a result, each application has its own private address space from which it can use the lower 2 GB--the system reserves the upper 2 GB of every process's address space for its own use"

      um, 2GB for the process + "the upper 2GB of every process's address space for its own use" for the system = 4GB _per_process_. It says so even in the part you quoted :)

      --
      "In the end, there is simply no weapon more devastating than the truth, delivered in just the right way." - tnk1
    66. Re:Memory exists to be used by ta+bu+shi+da+yu · · Score: 1

      Uh, no it doesn't actually say that. It says that each app has "its own private address space from which it can use the lower 2 GB". In other words, you have 2GB of address space available for all processes, and any process can use any part of that. Go reread that article again.

      --
      XML is like violence. If it doesn't solve the problem, use more.
  3. Virtual Memory or Paging by Anonymous Coward · · Score: 4, Informative
    Virtual memory is very useful.

    Note that "virtual memory" is not just "using disk space to extend physical memory size".

    1. Re:Virtual Memory or Paging by Dadoo · · Score: 3, Informative

      I think I'm going to need to add a comment to that Wikipedia page. I'm not sure when the definition changed, but a long time ago (mid 80s), "virtual memory" did mean "making a program believe it had more memory than there was on the system". At least three different vendors defined it that way: Motorola, Data General, and DEC. I still have the Motorola and DG manuals that say so.

      --
      Sit, Ubuntu, sit. Good dog.
    2. Re:Virtual Memory or Paging by LordOfTheNoobs · · Score: 1

      Just because a system presents more memory than it has available in RAM doesn't mean it needs a swap. Empty pages don't need to be stored anywhere.

      Thus Disk Space isn't required for virtual memory.

      However, without disk space, once the running programs actually use all of the available memory pages, the system will have to implement its emergency out of memory conditions.

      --
      They're there affecting their effect.
    3. Re:Virtual Memory or Paging by DaveAtFraud · · Score: 1

      I remember when my university (Ohio State - Go Bucks!) switched their instructional computer (IBM S/370) to running MVS in the late 1970s. That was about the time many of the non-Unix vendors started offering a virtual address operating system (e.g., DEC with the VAX and VMS). The consistent explanation at the time was to allow programs to swap to some form of less expensive, non-RAM storage. On Ohio State's system, this was drum memory at that time.

      Translating appropriate acronyms:

      MVS - Machine Virtual System
      VAX - Virtual Address eXtension
      VMS - Virtual Memory System

      Having worked on a number of different hardware platforms over the years (the above mentioned IBM S/370 running MVS, CDCs running NOS, DEC VAXen running VMS, HP/9000s running HP-UX, a number of different SUN platforms running SUNOS and Solaris, Windoze starting with Windows/386, OS/2 and now Linux), I have always referred to swapping and "virtual memory" synonymously.

      Back to the original question: it depends on how gracefully your operating system handles an out of memory situation. I look at it that having swap is like having a parachute on an airplane or a lifeboat on a ship. You hope you never have to use it but it's nice to know it's there given the alternative. If your OS handles out of memory gracefully or you don't mind if it doesn't, go ahead an run without swap. IF your OS doesn't handle the situation gracefully or you can't afford to find out how badly it does due to the up time requirements of the system, allocate some disk space to swap.

      Cheers,
      Dave

      --
      They that can give up essential liberty to obtain a little temporary safety deserve neither safety nor liberty.
      Ben
    4. Re:Virtual Memory or Paging by bored · · Score: 1

      Well, then I guess the Mac OS people had it wrong along with a number of other systems. The mac had "virtual memory" in a single address space shared between processes equal to the size of ram (early on, without an MMU). Quite a number of other systems whose manufactures had virtual memory don't conform to the modern definition either.

    5. Re:Virtual Memory or Paging by LordOfTheNoobs · · Score: 1

      What was virtual about it? I am genuinely curious what. A single address space the size of RAM sounds like direct memory access to me.

      --
      They're there affecting their effect.
    6. Re:Virtual Memory or Paging by bored · · Score: 1

      It was "virtual memory" because the working set size of all the "processes" could exceed the physical memory size. Basically, memory was allocated and you were given a "handle" to it. When you wanted to use the memory, you made a call to start referencing the memory. This allowed the system to perform heap compaction, and swap memory regions that weren't currently active. So, these regions could be "virtual" because they didn't really exist in the address space until they were used. The point is, "virtual memory" didn't require virtual address spaces, unless you consider the implicit idea that the region handles were some kind of addressing range. This is similar to the way many other machines worked including the B5000 which had hardware assistance for this kind of model, and managed it in a more elegant way (because you didn't have to worry about swapping or moving active regions, the hardware would fault and allow fix-ups if a region that wasn't active got referenced).

      That said, there are a lot of really smart people, who understand this model, and bemoan the current C/unix/windows model. With proper hardware assistance, there isn't any need for complex heap management and security is much easier to manage when the OS has fine grained control over individual data structures. I would also agree its a better model simply on the fact that heap fragmentation doesn't exist.

  4. The real answer is by Ethanol-fueled · · Score: 5, Funny

    Virtual memory and pagefiles still exist so that there will be persistent, recoverable storage of your browsing and search history, illegally downloaded music, and furrie porn should anybody come a-knockin after you hit the power switch.

    [/tinfoil hat]

    1. Re:The real answer is by eldavojohn · · Score: 2, Funny

      Virtual memory and pagefiles still exist so that there will be persistent, recoverable storage of your browsing and search history, illegally downloaded music, and furrie porn should anybody come a-knockin after you hit the power switch. [/tinfoil hat]

      </worrying> You're close but do you know why I only drink rain memory and grain memory, Mandrake? It's because virtual memory and pagefiles are the greatest Communist conspiracy to sap and impurify our precious computerly processes. <love the bomb>

      --
      My work here is dung.
    2. Re:The real answer is by croddy · · Score: 1

      Dammit, I must be doing it wrong. My swap partition is assigned its encryption key from /dev/random at boot time -- maybe I should switch to a passphrase?

    3. Re:The real answer is by Anonymous Coward · · Score: 0

      That's why you use encrypted swap.

    4. Re:The real answer is by Anonymous Coward · · Score: 0

      That's a very good point that is sometimes overlooked, first thing law enforcement will do with your computer is go through the contents of the page file. So, to safely use a page file, it should be on an encrypted drive.

    5. Re:The real answer is by freakrot · · Score: 1

      Use an encrypted disk! I have my laptop hard drive encrypted with TrueCrypt.

  5. Only 4 GB? by spaceyhackerlady · · Score: 2, Funny

    Vista boots in 4 GB? I'm impressed!

    :-)

    ...laura

    1. Re:Only 4 GB? by Cerberus7 · · Score: 1

      Yeah, and the Millennium Falcon made the Kessel Run in less than 12 parsecs.

      --
      I don't know about you, but my servers run on the power of cotton candy and happy thoughts. -Anonymous Coward
    2. Re:Only 4 GB? by sexconker · · Score: 1, Insightful

      I'm all for shitting on FF's memory bloat, but you clearly have 5 tabs open in that one FF window (doing who knows what), and are clearly having the installing of the skype plugin.

    3. Re:Only 4 GB? by Anonymous Coward · · Score: 0

      I'll have your baby! ...jake

    4. Re:Only 4 GB? by sexconker · · Score: 5, Funny

      The Kessel Run is obviously a surviving salesman problem.

      The traveling salesman is selling zombie survival kits at the onset of the zombie apocalypse. He must sell $X worth of kits to afford his choppa ticket, and return to the evac zone. The evac choppa is waiting for him (or does continuous runs), so time is not an issue, and he can make long-winded sales pitches in safe houses.

      Distance traveled is an issue, because the horde is everywhere, and the best strategy is to minimize exposure and avoid detection.

      Quickness (acceleration, agility) is an issue because it helps you avoid detection, and when detected, you need to escape or hide quickly.

      Speed (top speed of your van) is an issue because you often need to make a beeline to the nearest safe house, or to the evac zone once you have met your quota.

      A surviving salesman is rated on his total distance traveled. A lower distance is indicative of a better salesman, and a better vehicle. Being able to zoom through the most dangerous areas will shorten your trip (path length) due to the increased demand and reduced supply of zombie survival kits in said areas.

      For the Millennium Falcon, the above applies with a few differences. Han Solo and Chewbaca are hiding from the Empire, not the zombie horde. Instead of selling survival kits, they're smuggling contraband. Instead of running to safe houses, they're running off to Mos Eisley or other fringe/pirate friendly planets the Empire doesn't have (complete) control over. The money gained isn't for a choppa ticket, but for the general livelihood of Han and Chewbaca.

    5. Re:Only 4 GB? by Anonymous Coward · · Score: 0

      but you clearly have 5 tabs open in that one FF window (doing who knows what)

      You clearly are a fuckin idiot for assuming that I have 5 tabs open.

      I had 4 tabs open: one for SlashDot, one for Gmail, one for the Mozilla forums where I was looking for similar reports, and one for about:cache.
      Hardly any of them would be cause for bloat, I imagine.

      Second, the Skype plugin was installed previously, and not in the process of being installed at the time of the screenshot.
      The Extensions window is open to show what extensions I had installed in Firefox, so that asswipes like yourself would not claim that I had a crapload of stuff causing the memory usage issue.

      Nice try, but Firefox is still full of FAIL when it comes to memory management.

    6. Re:Only 4 GB? by MobileTatsu-NJG · · Score: 1

      I'm all for shitting on FF's memory bloat, but you clearly have 5 tabs open in that one FF window (doing who knows what), and are clearly having the installing of the skype plugin.

      It raises doubts, but it does not adequately explain anything.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    7. Re:Only 4 GB? by Pinckney · · Score: 1

      I'm honestly confused by this. I'm barely breaking a tenth of that between Slashdot, Gmail, Pandora, Wikipedia, and three YouTube videos (it hit 153MiB a minute ago). What the hell are you doing wrong? Leaving it open for days? Sure it has memory leaks, but I'm not sure how they're bad enough to cause problems for you.

    8. Re:Only 4 GB? by Anonymous Coward · · Score: 0

      A lady? On /.? I'm impressed! :-)

    9. Re:Only 4 GB? by CptSkippy · · Score: 1

      Look it's a girl!

    10. Re:Only 4 GB? by jozmala · · Score: 1

      Oh. A woman who is easily impressed.
      What a rarity.

      --
      ©God :Copyright is exclusive right for creator to determine the use of his creation.
    11. Re:Only 4 GB? by NekoXP · · Score: 1

      The Kessel Run is George Lucas being an illiterate, uneducated moron. Nothing else.

      He wouldn't know what the surviving salesman problem was if it hit him in the head. All he knows is being a geek in the 1950's, his love of old cars, and basing every movie he has ever made off someone else's cinematography and work.

      Now, there is a market, and some good movies do come from the reinvention of other peoples' ideas - the homage movie, just like everything Tarantino ever did, but done cleverly or in parody or simply in awe of the originals - but Star Wars definitely wasn't one of them.

      It was an awesome movie but not from a writing standpoint. And when George manages to write 3 more movies to tell the back story and invalidates everything he wrote in the original, but doesn't tell the story any better or make any improvements? Come on. Turning The Force into a bloodwork story, making everything Obi-Wan said in the first movie a lie, this is just unforgivable screenplay writing. That a fan can come along and "explain" it away just means George didn't think about it enough.

    12. Re:Only 4 GB? by sexconker · · Score: 1

      Oh, I'm all for shitting on George Lucas.

      The above was a joke (including the "surviving salesman" problem).

    13. Re:Only 4 GB? by bruceslog · · Score: 1

      Whoa, Dude, easy on the Eggnog...

      --
      If it has tires or tits, it will give you problems.
  6. Modern Systems? by Anonymous Coward · · Score: 2, Funny

    Are you asking about modern systems or Windows?

    1. Re:Modern Systems? by PermanentMarker · · Score: 1

      Are there any other real systems ?

      nintendo perhaps ?, or what else ?

      --
      I know you're out there. I can feel you now. I know that you're afraid. You're afraid of us. You're afraid of change.
  7. Would it help if by Xerolooper · · Score: 5, Funny

    you could create a RAM Disk and set your page file to use that.
    Then all your virtual memory is in RAM.
    I'll leave it to someone else to explain why that isn't a good idea.

    --
    "The stupid neither forgive nor forget; the naive forgive and forget; the wise forgive but do not forget." -Thomas Szasz
    1. Re:Would it help if by Changa_MC · · Score: 5, Interesting

      I know it's not a good idea now, but this was seriously a great trick under win98. Win98 Recognized my full 1GB of RAM, but seemed to want to swap things to disk rather than use over 256MB of RAM. So I just created a RAM disk using the second 512MB of RAM, and voila! Everything ran much faster. When everything is broken, bad ideas become good again.

      --
      Changa hates change.
    2. Re:Would it help if by evanbd · · Score: 1

      Did you try simply turning off swap usage first?

    3. Re:Would it help if by Anonymous Coward · · Score: 0

      While funny, i also do this.

      Seems to work fine for me.

    4. Re:Would it help if by Changa_MC · · Score: 1

      As I recall win98 ran smoother with swap enabled, no matter how much RAM you had. This was a while ago, though.

      --
      Changa hates change.
    5. Re:Would it help if by Reziac · · Score: 1

      I'm sitting here in front of a Win98 machine that's been running without a swapfile for 7 or 8 years now... and it's WAY smoother than with a pagefile. This box has 1GB of RAM, but I've never seen W98 use over 450mb even when I've got a whole bunch of big apps running. Also, it's routinely had uptimes in excess of 8 weeks, so it's pretty clear the lack of a pagefile doesn't negatively impact stability :)

      However, the GP's DOS-style idea of using a RAMdisk for temp/paging space would be good for those stupid Photoshop plugins that if they don't see any pagefile, think there's "not enough memory" no matter how much RAM you have... might have to try that, since the machine has half a gig of RAM twiddling its digital thumbs.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    6. Re:Would it help if by DigiShaman · · Score: 1

      So I just created a RAM disk using the second 512MB of RAM, and voila! Everything ran much faster.

      I've never tried it myself, but somehow I doubt it was working. As I know, when Windows boots up it will create/access pagefile.sys before a RAM Disk is generated.

      How did you create your RAM disk? Was a line added in the config.sys file, or did you use a 3rd party program?

      --
      Life is not for the lazy.
    7. Re:Would it help if by Anonymous Coward · · Score: 0

      I had programs on Win98 that refused to even start installing if you didn't have a swapfile. Others refuse to run. I can't remember them, but I remember seeing the message soon enough after disabling swap. I think Microsoft's flight sim might have been one of them.

    8. Re:Would it help if by Anonymous Coward · · Score: 1, Funny

      you created a ram disk... to put the paging file on... ouch ouch ouch ouch my brain!

    9. Re:Would it help if by An+anonymous+Frank · · Score: 1

      The micsosoft-provided ramdrive only allows for something like 32 MB (I forget) so I'd given up on the idea, but I would really love to try it out, especially on my 8GB boxes; any insight on a product or driver that's meant to create large(r) drives?

    10. Re:Would it help if by Anonymous Coward · · Score: 0

      Actually, I think this is the "correct" way to run linux with no swap because (as has been mentioned already) the kernel is built on the assumption that there will be swap.

      I run linux without swap because my reasoning goes like this:

      - someone says, "it's good to have at least 2 GB of swap with the amount of RAM you have"
      - I say, "2 GB of extra RAM would be way faster"
      - I go out and buy 2 GB of extra RAM

      Now, the linux kernel people (if I interpret them right) would come along and say "well, now you should be running 4 GB more swap", which I think is pretty bonkers...

      I don't bother with this swap-to-ramdisk approach and instead have a custom version of the "free" command that flashes a warning if I'm almost out of RAM. Why? Because the kernel doesn't handle out-of-memory very well at all with no swap -- it tries to deal with it by totally emptying the file cache, which happens to contain the libraries everything is using.

      Cue 20 minutes of disk thrashing while linux basically runs applications directly off the hard disk...

    11. Re:Would it help if by jozmala · · Score: 1

      Paging file in packaged filesystem with diskcache, where diskcache is AFTER packaging.
      Used that to play some games which required more dram that I had. Back in dos days.

      --
      ©God :Copyright is exclusive right for creator to determine the use of his creation.
    12. Re:Would it help if by Zoxed · · Score: 1
    13. Re:Would it help if by Anonymous Coward · · Score: 0

      Why isn't it a good idea?

    14. Re:Would it help if by Anonymous Coward · · Score: 0

      Because the swap is cached ?

    15. Re:Would it help if by Anonymous Coward · · Score: 0

      Actually, that's a GREAT idea!

      so! you put your swap in RAM disk, say you have a 1GB ram.. this gives you extra gig for your ram disk so you can grow your swap to be 2GB... but then, this doubled swap gives you enough room for quadrupled swap that will be 8 times larger than previous, 16 times bigger ram disk.. this would give you 32 times more space than what you just saw previously, that is 64GB RAM.

      ohhhh i'm so excited i will try that myself!! :D

    16. Re:Would it help if by higuita · · Score: 1

      win98 run better with a FIXED size swap (disable that stupid auto-manage swap)

      win98, due a bug in the kernel, will never use more than 256Mb physical memory (not virtual memory)... so if you have 1Gb, you are wasting ram... if you saw 450Mb in use, it was probably some kind of cache or it was using in in the virtual memory (and so you are using some swap)

      --
      Higuita
    17. Re:Would it help if by Reziac · · Score: 1

      Are you referring to the 512mb bug, where Win98 throws up if it sees more than 512mb (unless a certain fix is applied)?? I never heard of and can't find any reference to the bug of which you speak (tho apparently there was such a bug in one incarnation of RedHat).

      The 512mb limit kicks in when the mainboard has three DIMM slots (which is seen as 2+2 with one slot overlapping). Two or four slot mobos are generally not affected.

      This mainboard has 4 slots. It has 1GB RAM because it was cheap that week, and needed a specific physical height (your RAM dealer looks at you funny when you specify sticks "no taller than [----]") so I just filled the slots, needed or not. $51 for all, no big deal.

      As I said, I have swap turned off entirely (yes, I DO know what I'm doing there), and my everyday Win98 box has been running that way for a lot of years. (My Win95 box ran without swap when it had 256mb physical RAM, too -- never saw Win95 go over 150mb total.) Gets rid of all those hitches in W98's getalong.

      My WinME box (its almost-twin brother, but 768mb RAM) runs without swap too, when it's up (not often anymore, as it's the alt-boot on my XP box). In case you're about to diss it... it hasn't crashed in 8 years now, and it ran 24/7 for a couple years. Turn off ME's busted incarnation of System Restore (I let XP handle that from its side; works fine), apply 98Lite in default mode, and all ME's stability problems go away.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
  8. Turn it off, then! by Jeppe+Salvesen · · Score: 5, Insightful

    We who know what we are doing are free to take the risk of running our computers without a swapfile.

    Most people are not in a position where they can be sure that they will never run out of physical memory. Because of that, all operating systems for personal computers set up a swapfile by default: It's better for joe average computer owner to complain about a slow system than for him to lose his document when the system crashes because he filled up the physical memory (and there is no swap file to fall back on).

    --

    Stop the brainwash

    1. Re:Turn it off, then! by Xerolooper · · Score: 3, Interesting

      Urg... must... not... feed... trolls...
      You can infer from the OP what he was talking about. Oh dammit!

      --
      "The stupid neither forgive nor forget; the naive forgive and forget; the wise forgive but do not forget." -Thomas Szasz
    2. Re:Turn it off, then! by Jeppe+Salvesen · · Score: 1

      I think it's pretty obvious the poster is a bit confused about the terms. I just went along with the poster's terminology in order to explain why rather than inform him he's an idiot. :)

      --

      Stop the brainwash

    3. Re:Turn it off, then! by Chemisor · · Score: 1

      > Most people are not in a position where they can be sure that they will never run out of physical memory.

      If you can fill 4GB of physical memory, you can fill your swap file just as quickly, and then your apps will crash anyway. So really, this is not a good argument. You can run out no matter how much you allocate. The right question to ask is what happens when you do, and that is that the process that is filling all that memory will be killed. Unless you are using OpenOffice, I highly doubt that that process will be your word processor.

    4. Re:Turn it off, then! by jon3k · · Score: 1

      If that was in fact the case, you might want to start the conversation by clearly defining the terms. Unless you were also confused about the difference between paging and virtual memory, but I'm sure that wasn't the case. ;)

    5. Re:Turn it off, then! by Anonymous Coward · · Score: 0

      Yeah, agreed, it is dangerous to be telling people to turn off their swapfile.

      Makes me wonder too why there isn't a feature where the O/S warns the user before the the available memory (RAM plus swap) is full (say 95%), and allows them eg to close an application. Bit late when the memory allocator actual fails. Wouldn't be easy to do (how to slow down the app that is running out the memory space, or even figure out which app is doing it?), but it seems in the realms of possibility.

    6. Re:Turn it off, then! by Anonymous Coward · · Score: 0

      A large part of this, I think, is Windows' approach - the most efficient paging and scheduling schemes can predict the future.

      But you can't predict the future. I'll take demand paging over complicated heuristics any day.

      I disable swap on Windows and keep it switched on for OS X and Linux machines.

    7. Re:Turn it off, then! by gillbates · · Score: 1

      So, we compensate for the fact that a generation of computer programmers never learned to check their mallocs or free their memory by making the OS slower?

      No wonder people hate Windows.

      The simple fact of the matter is that no matter how much virtual memory you have, it is a finite resource, and you really can run out of it. You simply can't access more than 4 GB of RAM with a 32 bit pointer, and while this seems like a lot, it is not much when doing something memory intensive such as video processing. If your app breaks when this happens, the fault lies with the programmer, not the operating system. If programmers had done their part, and handled out of memory conditions correctly, this problem would have taken care of itself. Instead, people blame Windows for being slow. While Windows may be slow, sloppy programmers haven't made things any better.

      --
      The society for a thought-free internet welcomes you.
    8. Re:Turn it off, then! by nprz · · Score: 1

      The system usually doesn't crash, but applications do and hard.
      I blame the applications for always assuming there will be memory.

      I run my WinXP in a VM without swap because I don't see the point in having 2 swaps (one for windows, one for the VM). I made the mistake of running 2 .NET apps with 384MB of RAM. The second one crashed itself and my IDE.

    9. Re:Turn it off, then! by LackThereof · · Score: 1

      This is especially important if you're running something with memory leaks for a long period of time. You can keep using the machine as normal, because all the wasted memory just gets swapped out and there is little slowdown.

      And there are a LOT of leaky programs out there for Windows. Keeping a swapfile/pagefile lets you use them.

      --
      Legalize recreational marijuana. Seriously.
  9. Why use a file system? by chrylis · · Score: 4, Interesting

    The other extreme point of view is that modern systems should only have virtual memory and, instead of having an explicit file system, treat mass storage as a level-4 cache. In fact, systems that support mmap(2) do this partially.

    The idea here is that modern memory management is actually pretty good, and that it's best to let the OS decide what to keep in RAM and what to swap out, so that issues like prefetching can be handled transparently.

    1. Re:Why use a file system? by MichaelSmith · · Score: 1

      Hmm thats interesting. Kind of a palm pilot way of doing things on a larger scale. I imagine you would need something like a file system (or the palmos database) in shared memory so that data could actually be moved around, but maybe that should be more of a distributed middleware layer.

    2. Re:Why use a file system? by Anonymous Coward · · Score: 3, Funny

      Modern like the IBM System 38 circa 1980?

    3. Re:Why use a file system? by mindstrm · · Score: 2, Interesting

      Because currently, modern systems leak. A cold re-start puts things back into a fresh state - and we need that.

      Modern memory management is fantastic - but I'll still arguet hat my workstations work better and smoother with swap disabled than without it - which is telling.

    4. Re:Why use a file system? by Just+Some+Guy · · Score: 1

      Because currently, modern systems leak. A cold re-start puts things back into a fresh state - and we need that.

      Since I've never seen a Unix system that had to be rebooted to free memory, and I've never heard anyone refer to Windows as a modern system, I'm not exactly sure what you're referring to.

      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:Why use a file system? by Anonymous Coward · · Score: 0

      The HiStar operating system does exactly that. You can install it in your computer and try it out.

    6. Re:Why use a file system? by Gat0r30y · · Score: 1

      With hybrid HDD's coming out, wouldn't the flash on the HDD act sort of like a l-4 cache? Already HDD's monitor usage and with NCQ try to behave intelligently. On a slightly more on topic note, that would be a Bad Idea. Access times for physical media aren't the same if you split things up, which wouldn't be a problem if you are just using a "level-4" cache because the cache doesn't especially care about where it actually is, but with seek times and real media, where it is matters.

      --
      Prediction: The real iPhone killer is going to be sex robots from Japan. Think about it.
    7. Re:Why use a file system? by Anonymous Coward · · Score: 0

      Yes, but the S/38 had an address space that took in all the DASD as well as Main Storage.

    8. Re:Why use a file system? by Anonymous Coward · · Score: 0

      I think this is how the IBM i5 (iSeries, AS/400, etc) handles the memory/swap/disk boundary (Ie. there isn't one).

    9. Re:Why use a file system? by lennier · · Score: 1

      And welcome back to , circa 1964.

      There were some great ideas in Multics which never made their way into Unix. Maybe in another 44 years we'll reinvent them.

      --
      You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
    10. Re:Why use a file system? by TeknoHog · · Score: 1

      Unix needs to be booted for a number of reasons, for example kernel upgrades and most hardware changes. There's a need for some well defined and controlled permanent storage that's not just cache.

      --
      Escher was the first MC and Giger invented the HR department.
    11. Re:Why use a file system? by Anonymous Coward · · Score: 0

      The concept is called a single level store. http://en.wikipedia.org/wiki/Single_level_store

    12. Re:Why use a file system? by chrylis · · Score: 1

      It could even be argued that there's no inherent reason why these should require a reboot, but as a pragmatic issue there does need to be some method of cleaning up running processes and the like, if only because real-world systems have bugs and give rise to things such as zombie processes.

      Reconciling these two is actually an open research question I'm working on; any insights are welcome. My current idea is to have a mechanism to wipe the process table on boot instead of restoring it, which should be about the same as a reboot on FS-based systems.

  10. Mental Note by jon3k · · Score: 0, Flamebait

    Mental Note: Slashdot Editor Timothy doesn't know the difference between paging memory to disk and virtual memory.

    1. Re:Mental Note by Anonymous Coward · · Score: 0

      Of course, your post will be modded down as flamebait or something -- but this kind of stuff is pretty important.

      Ask Slashdot is a cesspool nowadays. People ask questions that are either misleading, obvious, or just plain don't make sense. And somehow they get through the editors onto the front page.

      It's not really respectable IT journalism.

    2. Re:Mental Note by Anonymous Coward · · Score: 0

      It is sensationalist tripe.

      In this instance, you have one guy who knows a little too much and just found Task Manager, one of those "power users." You know, the type that guffaw-guffaw endlessly about Microsoft and how inept they are, the subtext being they could do better if they wanted to. But they never seem to realize they don't know what they're talking about oftentimes.

      This sort of ignorance shouldn't make it to the front page, it just validates it.

    3. Re:Mental Note by naturaverl · · Score: 1

      Not that we can blame him... Windows calls it "Virtual Memory" also.

    4. Re:Mental Note by Anonymous Coward · · Score: 0

      See comment above to bust your self-important blustering

      http://slashdot.org/comments.pl?sid=1051583&cid=25995255

    5. Re:Mental Note by Anonymous Coward · · Score: 0

      As noted in other posts, paging memory is referred to as virtual memory in Windows.

      "Virtual memory:
      A paging file is an area on the hard disk that Windows uses as if it were RAM."

      The window for changing the paging memory size is even titled "Virtual Memory". You should make a mental note about it.

    6. Re:Mental Note by jon3k · · Score: 1

      No, it doesn't. There is an option in a frame labeled "Virtual Memory" (System Properties -> Advanced -> Performance -> Advanced (tab)) that includes an option for disk paging. That doesn't mean that paging memory to disk and virtual memory are exactly the same thing, just that disk paging is an additional option for virtual memory settings.

    7. Re:Mental Note by oGMo · · Score: 1

      We can't? I'm pretty sure we should, if nothing else, be blaming him for using the MS definition and not even having the geek level to differentiate.

      --

      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage

    8. Re:Mental Note by treeves · · Score: 1

      If by "virtual memory", MS does *not* mean the page file size, what do they mean, given that I can set it (on XP at least) as low as 2MB?

      --
      ...the future crusty old bastards are already drinking the Kool-Aid.
    9. Re:Mental Note by naturaverl · · Score: 1

      Err, yes, it does, at least on XP. It's the ONLY option... And when you click this option (to change the total paging file size for all drives), the next window that comes up is titled "Virtual Memory"... Well then.

    10. Re:Mental Note by jon3k · · Score: 1

      You are setting the size of the disk paging file. The title of the window is "Virtual Memory", because disk paging is a feature of the virtual memory system. Read the text above the option you set: "Paging file size for selected drives"

    11. Re:Mental Note by jon3k · · Score: 1

      I don't know why I'm indulging this absurdity, but the easiest way to observe this for yourself is to open Performance Monitor:

      Start -> Run -> perfmon -> [Enter]

      Now add a counter for memory and add one for virtual memory. Now, change the size of your disk paging file and reboot.

      virtual memory != disk paging

  11. File - Save by Anonymous Coward · · Score: 4, Interesting

    For that matter, why do we even need to explicitely "save" anymore? Why does the fact that Notepad has 2KB of text to save prevent the shutdown of an entire computer? Just save the fecking thing anywhere and get on with it! Modern software is such a disorganized mess.

    1. Re:File - Save by Kral_Blbec · · Score: 1

      Might not be a bad idea, except that when you wanted to find it again you wouldnt have a clue. Okay, maybe YOU would. My mom and the zillion jillion other users like her wouldn't though. So its not just an issue of having enough space to save it, its also helping the user know where to look for it when they want it back next time.

    2. Re:File - Save by JSBiff · · Score: 3, Insightful

      What would you do instead of file save? Continuous save, where the file data is saved as you type? What if you decide the changes you made were a mistake? I think one of the basic premises, going a very long way back in the design of software, is that you don't immediately save changes, so that the user can make a choice whether to 'commit' the changes, or throw them away and revert back to the original state of the file. As far as I know, Notepad will only temporarily stop the shutdown of the computer, to ask you do you want to save the file - yes/no? I don't see how that is such a bad thing?

      Now, you might say that the solution for this is automatic file versioning. The problem is that if you have continuous save, you would either get a version for every single character typed, deleted, etc, or else you would get 'periodic' versions (like, a version from 30 seconds ago, a version from 30 seconds before that, etc) and pretty soon you'd have a ridiculous number of 'intermediate' versions. File versioning should, ideally, only be saving essentially 'completed' versions of the file (or at least, only such intermediate versions as the user chooses to save [because, if you are creating a large document, like a Master's Thesis, or book, you will probably not create it all in a single session, so in that case, you might have versions which don't correspond to completed 'final products', but you probably also don't want 1000 different versions either], instead of a large number of automatically created versions).

    3. Re:File - Save by mosb1000 · · Score: 3, Interesting

      Maybe they should have a "finalize" option, whereby you save a special, read-only file, and it saves a backup of each "finalized" version. There's really no reason you should lose what you are working on when your computer crashes. And having an unsaved file shouldn't hold up quitting applications. Just start where you left off when you resume the application.

    4. Re:File - Save by I'm+not+really+here · · Score: 1

      Well, the 100 or 200 or 1000 undo savings effectively are the "save every character" type of save... what's the issue with simply saving the undo data, along with each revision (a revision being a human initiated save, or a save due to shutdown, or the last undo piece saved just prior to a system dump - document recovery as an example).

      With the above system, you could have an "always saved" method that would not be insane to handle. Open the latest revision, decide the last 12 changes you made you didn't want? Undo them.

      If you save the file as a base record for each revision and a transactional record for each undo step saved between revisions, you have an economical method of file storage that does not require the user to do any sort of "saving" manually.

      --
      Before commenting on the Bible, please read it first
    5. Re:File - Save by DragonWriter · · Score: 1

      Might not be a bad idea, except that when you wanted to find it again you wouldnt have a clue. Okay, maybe YOU would. My mom and the zillion jillion other users like her wouldn't though. So its not just an issue of having enough space to save it, its also helping the user know where to look for it when they want it back next time.

      The problem is the default "Untitled" document. If you started without an open document, and created the file when you wanted to start working on it, then you'd know where to find it (particularly if the app or the OS or both has a recent documents list).

      Though this might be slightly dangerous unless either the app or the file system did versioning by default.

    6. Re:File - Save by Voyager529 · · Score: 1
      The solution to this would be to have the "save document" window come up before you could even type something, like Microsoft Access does. You first put a file name and save location, then you get to work. This way, Access can constantly save the data you're working on. It really isn't that bad of a model to work off of.

      Joey

    7. Re:File - Save by EvanED · · Score: 1

      Eclipse won't let you make an untitled document (at least that I saw), and it drives me mad. It means I can't just open a quick window for jotting something down temporarily, storing some text I've copied and pasted but will overwrite in the clipboard (standard clipboards need to be more like Emacs's kill ring, but that's another topic), etc. without giving that file a place in the file system, which means if I want it to be temporary, I have to go in and delete it.

      I agree with the poster who started this thread, but I think the right way to handle it is to have it transparently save the open untitled documents somewhere and reopen it the next time you start the program. Then if you close an untitled document explicitly, it kills the file for you.

    8. Re:File - Save by Prien715 · · Score: 1

      Actually, you'd save after every "major" revision...you know when you hit "undo" in MS Word and it thinks something needs to be undone (which is still something that escapes emacs...really every character I type I have to undo one by one?) Also, save on application exit.

      I actually write software with very expensive user data (i.e. the users of our software are paid more than the developers of it are...and I don't work in India;)) and we allow the user to choose between this and manually managing saving (since also, the data saved may be read by other applications and saving it allows them to "see" the same data the user is editing).

      --
      -- Political fascism requires a Fuhrer.
    9. Re:File - Save by he-sk · · Score: 3, Interesting

      Explicit saving is a crutch based on limitations of early computers when disk space was expensive. Unfortunately, people are so used to it that they think it's a good idea. Kinda link having to reboot Windows every while so it doesn't slow down. (I know that it's not true anymore.)

      Think about it, when I create a document in the analog world with a pencil I don't have to save it. Every change is committed to paper.

      You're right, of course, the added value with digital documents is that I can go back to previous versions. But again, it's implemented using a crutch, namely Undo and Redo. Automatic file versioning is the obvious answer.

      Having many intermediate versions lying around is a non-problem. First of all, only deltas have to be saved with a complete version saved once in a while to minimize the chance of corruption. Secondly, just as with backups, the older the version is the less intermediate versions you need. Say one version every minute for the last hour. Then one version every hour for the last day before that. One version every day for the last week before that. And so on.

      A filesystem that supports transparent automatic versioning is such a no-brainer from a usability standpoint that I can't figure out why nobody has done it already. I guess it must be really hard.

      BTW, an explicit save can be simulated on a system with continuous saving by creating named snapshots.

      --
      Free Manning, jail Obama.
    10. Re:File - Save by rantingkitten · · Score: 1

      For a lot of applications that would make sense, but it's hard to know which, and people have various uses you might not predict. For example, I'll often pop open notepad or gedit if I'm on the phone with someone and they're about to tell me something I'll only need for a couple of minutes (a phone number, an access code, whatever). It's quick and convenient and I wouldn't want to be slowed down by having it nag me about filenames and save locations every time, especially when I have zero intention of saving it.

      --
      mirrorshades radio -- darkwave, industrial, futurepop, ebm.
    11. Re:File - Save by JesseMcDonald · · Score: 3, Interesting

      Continuous save can be made workable with some reasonable rules for discarding unneeded versions. First, keep every version the user explicitly tags, as well as the baseline for the current session (to allow reversion). For the rest, devise a heuristic combining recency and amount of change to select old, trivial versions to be discarded. The further back you go into the history, the more widely spaced the checkpoints become. This is easier for structured documents, but with proper heuristics can also be applied to e.g. plain text. Temporal grouping (sessions, breaks in typing, etc.) can provide valuable clues in this area.

      Currently most programs only have two levels of history: the saved version(s), and the transient undo buffer. There's no reason that this sharp cut-off couldn't be turned into a gradual transition.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    12. Re:File - Save by plasmacutter · · Score: 1

      SImple, just have every document not "saved" by the user go into a folder named after the app in "documents" (has equivalents across all major operating systems)

      A configurable OS variable could be used to clear documents not re-saved or touched for -x- amount of time (default 15 days)

      make a guideline of "untitled-datehere-timehere" format and its pretty good

      --
      VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
    13. Re:File - Save by plasmacutter · · Score: 1

      actually, there is a middle ground between versioning and continuous save.

      MS word and other full bodied word processors use it.

      save to filename.backup, and only commit when the command to save is made, but if you lose the program to a crash, lost power, etc, it's still continuously saved to backup.

      --
      VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
    14. Re:File - Save by jmorris42 · · Score: 1

      > What would you do instead of file save?

      Eliminate the entire concept of saving. Map the file directly to memory and edit. No more concept of a file 'loaded' in memory needing to be saved. Click the close box, the file gets closed, no save needed. So long as the system is syncing (a manual sync call to make sure changes get to the platters would be a good idea) you can even have a crash and be ok. Revert with undo, and if you editing any sort of structured document you put the undo data in the file so it works equally well when you reload later. Obviously a purge feature would have to be available and encouraged to prevent leaking information whan such documents are shared.

      The whole concept of loading and saving files between memory and mass storage is such a throwback to the days when such measures were required by the limitations of the tech. They always confuse the heck out of new users because without understanding the limits of long dead systems they really don't make much sense.

      Yes, versioned filesystems would probably be more desirable in such an environment and in sense that a new version would probably only get created when the file was closed there would still be a little of the load/save mindset remaining.

      --
      Democrat delenda est
    15. Re:File - Save by DragonWriter · · Score: 1

      The solution to this would be to have the "save document" window come up before you could even type something, like Microsoft Access does. You first put a file name and save location, then you get to work.

      Yeah, that model (which is fairly common in applications that "save" incrementally to a database, even if it is a single file database, or to a mutifile structure) is what I was getting at -- there's no reason not to use it for other things, as well; anyhow, the dangerous part (without versioning) is when you are working with a file that has already been saved; if it saved silently on close, you might overwrite when your intent may have been to branch. With versioning-by-default (provided by the app, OS, or file system) this isn't a data loss problem, but without it it could be.

      Versioning-by-default combined with name-before-working and automatic, silent save-on-close would, while it would take a little getting used to, probably be a big productivity win, and eliminate common ways to accidentally lose data and the need for application closing nag screens (including the application-close-on-OS-shutdown nag screens.)

    16. Re:File - Save by DragonWriter · · Score: 1

      Eclipse won't let you make an untitled document (at least that I saw), and it drives me mad. It means I can't just open a quick window for jotting something down temporarily, storing some text I've copied and pasted but will overwrite in the clipboard (standard clipboards need to be more like Emacs's kill ring, but that's another topic), etc. without giving that file a place in the file system, which means if I want it to be temporary, I have to go in and delete it.

      If you are using the "allocate-before-editing" mechanism, it would make sense to either provide a mechanism for the user to choose to allocate a "scratch" document that will not be preserved (whether it isn't saved at all, or uses whatever the OS provides for allocating and releasing temporary files), or provide a mechanism to abandon-and-delete the file from the editing application (such as a "File -> Abandon" menu option) rather than forcing the user to delete it outside of the application. There's no reason, really, not to provide both options (the latter has use outside of scratch files: deleting a document from the application where you would work with it, rather than the through the file browser or some other tool unrelated to the document, makes a certain kind of sense, IMO.)

    17. Re:File - Save by Anonymous Coward · · Score: 0

      Just because you can't think of a solution, doesn't mean that the idea is without merit.

      For example, intead of a save button you have a 'commit' button, which marks a point where the file is stable. The editor stores the sequence of changes past the previous commit (like a journal).

      From the user point, it looks like 'saving' the file, the overhead of the journal is only from the last 'commit', and you can exit the application without having to 'save'. As a bonus, next time the file is opened, you still have the journal back to the previous commit and can undo changes, or continue from where you left off.

    18. Re:File - Save by Estanislao+Mart�nez · · Score: 1

      The problem is the default "Untitled" document. If you started without an open document, and created the file when you wanted to start working on it, then you'd know where to find it (particularly if the app or the OS or both has a recent documents list.

      Why so complicated? As I said in another comment: just put newly created files on the desktop, and make names optional. The question of where a newly created document went then always has the same answer (the desktop). When the user decides that the desktop has become too cluttered, then they can "file" the items (with multiple tools, like tags, hierarchical folders, version control tools, etc.).

    19. Re:File - Save by Kaenneth · · Score: 1

      I've replaced my notepad with a script that creates an empty file named 'notes (date) (time)' and opens it in notepad.

    20. Re:File - Save by Voyager529 · · Score: 1
      The solution to this would be a "do not save" button. Additionally, I could understand it being difficult to figure out which apps you *don't* want it on (notepad being a good example of could-go-either-way), but typically if it's made by Microsoft or Adobe or Autodesk or any other app that takes up a decent amount of hard disk space, requires activation, and whose users typically save stuff out of it, it's a good bet that having a save-during-creation system is a good idea. Finally, it could be added to the saving preferences dialog in the app itself, alongside the default formats and such.

      Joey

    21. Re:File - Save by Voyager529 · · Score: 1
      this is a good point, and I'm all for versioning. The other way around this is to have an "Exit Without Saving" and/or "Exit while saving to new file" option in the file menu. Sure users are used to hitting the "red X in the corner", but let's hope that if they're thinking far enough ahead to say to themselves, "self! I wanna branch this file instead of saving over my last one", then they'll hopefully realize that their ticket out is through the file menu.

      Joey

    22. Re:File - Save by Estanislao+Mart�nez · · Score: 1

      The idea to get rid of "save" is, basically, the idea that the user should not have to do any action to prevent the document they're working on from disappearing. Basically, you can stop working on the document instantaneously and come back to it in exactly the same state, without having to perform a "save" action.

      The idea is not to eliminate versioning and content archiving operations. There would be versioning and filing operations available to the user, which would work very much like "save" does. The point is that their use would be, strictly speaking, optional. If the user doesn't use those features, then the only thing that the system does is to guarantee that the most recent state of the document is preserved between sessions. So when you shut down your computer with Notepad open, you are not prompted for anything, and the most that you lose is undo.

    23. Re:File - Save by Anonymous Coward · · Score: 0

      Microsoft OneNote does exactly this. Why the heck Word and Excel don't do the same is beyond me.

    24. Re:File - Save by Memetic+Hazard · · Score: 1

      Why not use Notepad instead if it's just a scratch file?

    25. Re:File - Save by El_Oscuro · · Score: 1

      For the notepad problem, I would just dump it to a file in temp every few minutes

      1. If notepad is closed without saving, just do a final write to the temp file before exiting
      2. If the system crashes, the temp file is at most a few minutes old
      3. When notepad is next started, just load the "Unsaved" file from temp
      --
      "Be grateful for what you have. You may never know when you may lose it."
    26. Re:File - Save by Brain_Recall · · Score: 1
      How about this: hibernate the process. Take everything in memory, keep track of its open files, and write it out to disk. When the user logs in, load it back up and continue on. A notification to the user that this has occurred would be useful.

      Of course, the question you're probably trying to raise is why save at all? Why do modern systems still rely on a paradigm that's over a 100 years old? Maybe someday we'll come up with something that's more efficient and better organized, but right now I don't have that answer.

    27. Re:File - Save by toddestan · · Score: 1

      The solution for a simple program like Notepad would be to just stuff the data into a temporary file somewhere, and then next time the computer is started just start notepad and open the data. From the user's perspective, it would simply come back up like it was when they shut it down. This could even be done for files that were saved but changed after they were saved (as opposed to either automatically discarding/saving the changes to the file or sitting forever at the "Save?" dialog).

      The disadvantage to this is it could get annoying with non-trivial files, like a large photo or office document.

    28. Re:File - Save by ka9dgx · · Score: 1

      Of course, the question you're probably trying to raise is why save at all? Why do modern systems still rely on a paradigm that's over a 100 years old? Maybe someday we'll come up with something that's more efficient and better organized, but right now I don't have that answer.

      The problem is that we've optimized on the wrong thing, programming convenience, instead of user productivity. Computers are supposed to be a tool for humans to better manipulate symbols and information. There's no reason not to keep all of the input received via the keyboard or mouse from the user along with the context... it's tiny... a few bytes per hit, without compression. Saving the internal deltas of almost anything a typical user does with a PC are not unreasonable.

      --Mike--

      CoFounder - KillSave.org

    29. Re:File - Save by diamondsw · · Score: 1

      Hello? Temp files?

      No one said save it to the current file - just write it to disk and read it back in on next use - just like Word Autosaving and such. But stopping shutdown - especially when it may be initiated remotely or automatically - is simply stupid.

      --
      I don't know what kind of crack I was on, but I suspect it was decaf.
    30. Re:File - Save by Anonymous Coward · · Score: 0

      Google docs seems to have already solved this problem (I have no idea where the solution was invented though). It automatically saves my spreadsheet as I edit it, and it gives me a nice interface for going back to previous revisions based on time and "sessions of editing".

    31. Re:File - Save by Vegeta99 · · Score: 1

      Think about it, when I create a document in the analog world with a pencil I don't have to save it. Every change is committed to paper.

      You're right, of course, the added value with digital documents is that I can go back to previous versions.

      Well, that's why a proper language course teaches you peer review:

      First draft gets marked up with the usual symbolization (three lines under a letter means a capital, a carat subscripting the space between to words means insert the scribble abote), rewrite, repeat until you're done.

      Personally, I learned to type before I learned to write - I was born in the eighties. But to edit a paper on a computer and worry about losing it? fuck that! I'll print it to edit, thankyaverymuch

    32. Re:File - Save by randyleepublic · · Score: 0

      why not continuous versioning? Log every keypress, mouse click and drag. Provide undo/redo. Save as is on shutdown including the log. Gee, sounds really complicated.

      --
      Social Credit would solve everything...
    33. Re:File - Save by Whiteox · · Score: 1

      I've been wanting that since my old hacking days when I wrote a small editor where every letter (ascii - hex) was poked into memory, then saved in a temp file. On bootup, the temp file would automatically load as if nothing happened.

      Today, all you need is an Open, Rename function - which would include filetypes and a Close.
      Writing every character or recording every action (graphics for example) to disk/SSD would be very intensive though.

      --
      Don't be apathetic. Procrastinate!
    34. Re:File - Save by master_p · · Score: 1

      It's very simple: the computer should automatically commit changes if they exceed a certain threshold. In this way, the user should never lose, in case of failure, much of his/her work.

    35. Re:File - Save by JD-1027 · · Score: 1

      Automatic file versioning is the obvious answer.

      Having many intermediate versions lying around is a non-problem. First of all, only deltas have to be saved with a complete version saved once in a while to minimize the chance of corruption. Secondly, just as with backups, the older the version is the less intermediate versions you need. Say one version every minute for the last hour. Then one version every hour for the last day before that. One version every day for the last week before that. And so on.

      A filesystem that supports transparent automatic versioning is such a no-brainer from a usability standpoint that I can't figure out why nobody has done it already. I guess it must be really hard.

      You pretty much described exactly Apple's Time Machine (by far my favorite OS feature that came with OS X Leopard). Especially funny since you described the incremental back scheme almost right on.

      "Time Machine saves the hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for everything older than a month."

      Yes it's called a backup, but it's really versioning as well and it's integrated into some applications and the file system.

    36. Re:File - Save by he-sk · · Score: 1

      Well, Time Machine is close to what I want, except it's broken when you use it together with FileVault. Not only do you have to log out to backup your user data, you can't use the GUI to restore files.

      So you only get versioning for system data. How useless is that?

      I've gotten used to shutdown my Macbook before I go to bed each night to backup my home folder, but I'd rather leave it running all the time as I did before Leopard.

      Time Machine is a great advancement for OS X. But technically it's an ugly hack, no matter how impressive.

      --
      Free Manning, jail Obama.
    37. Re:File - Save by JSBiff · · Score: 1

      That seems to be a rather rude reply. First off, I never said the idea was without merit. I asked what you would do instead. That seems a reasonable question if someone is proposing a change.

      I then went on to attempt to think through the problem a little bit, and offer what alternatives occured to me at the time, and any new problems I could think of that might arise from the alternatives I thought of. That does, of course, leave room for alternatives that I just wasn't creative enough to think of.

    38. Re:File - Save by JSBiff · · Score: 1

      "Saving the internal deltas of almost anything a typical user does with a PC are not unreasonable."

      What about, moving beyond mere text, word processor, and spreadsheet files, larger types of files where a single change can modify megabytes of data? For example, making a change to a graphics file, or audio file (like, for example, making an image brighter, darker, adjusting contrast, etc, which might change every pixel in the image; now, someone might propose that you don't save the change to every byte in the image, but instead just save that the user adjusted the contrast or brightness (which could probably be represented in a few bytes of data), etc, and when you re-load the file in the future, the app just 'plays back' the journal of changes.

      The only problem with that, is that is an application-domain specific change; how would a general purpose, versioning file system be able to handle application specific changes? That would require a further extension of the filesystem where instead of just tracking changes to the actual file data, you have some sort of meta-data system where applications can store application-specific logs of stuff like that. That could be possible, but that then requires applications to be modified to take advantage of that. When you consider that there are thousands of legacy apps on any given platform, that means that you will likely be stuck, for a long time, with apps that still don't take advantage of the new functionality.

      Still, I suppose it would be cool if someone developed the necessary filesystem to implement these kinds of things, and the corresponding system calls necessary to provide the interface between apps and the filesystem.

    39. Re:File - Save by socrplayr813 · · Score: 1

      I like your system for saving old versions. It reminds me of the backup program I use on my Ubuntu box (the name escapes me now). It copies whatever files you specify according to your schedule, then deletes the old backups based on a similar setup to what you described (if I remember correctly, the program calls it logarithmic or something).

      With a few tweaks, that'd be a great idea to take mainstream with word processing and other small jobs. With large files (ie. video, etc), I'm not sure if it's as practical.

      --
      The confidence of ignorance will always overcome the indecision of knowledge.
  12. Its the Page Replacement, not Virtual Memory by nleaf · · Score: 2, Informative

    The problem is whatever Vista is using for page replacement, not virtual memory itself. Let's say you're using 2 GB of physical memory, and then start up some memory-intensive program that uses another 2 GB. You're done; if you run out of space now, the OS can do nothing about it, and is forced to do something drastic like start killing off processes.

    The question then is why isn't Vista making fullest use out of virtual memory? It is probably trying to proactively move little used pages out of physical memory to make space for new pages. Its an attempt at optimization--after all, if you're not using that data, why let it take up valuable physical memory?

  13. Re:Vista reserves 1 GB by El+Lobo · · Score: 5, Informative

    Absolutely not true. You can even install and run Vista on a computer with 1Gb ram and no page file. And run applications. So it doesn't reserve 1Gb for itself and thus, your myth is busted. Vista's memory manager will use as much memory it can (free memory is a waste, so it will use it rather than watch it empty). But as soon as a process needs memory it will give it back.

    --
    It's time to realise that Abble's products are the biggest abomination these days. Just say NO to the dumb iAbble way!!
  14. Anonymous Coward by Anonymous Coward · · Score: 0

    Its Vista. Thats a feature ;)

  15. Try turning off the swap file entirely by Anonymous Coward · · Score: 0

    Windows really sucks at managing large amounts of memory. I hit this all the time, where I start a build of my project, then I click in a web browser window and I have to wait 10 seconds for Windows to page back in the pages that it "helpfully" swapped out with no fucking benefit to me whatsoever. These days, disk I/O is an insanely bad bottleneck on all the Windows machines that I actually use for stuff. Paging is just another useless thing competing for my available I/O bandwidth and imposing a ridiculous latency on me whenever I switch to an app I haven't used for a while.

    The only reason I haven't turned off my swap file is that I sometimes need to have more stuff running than RAM I actually have.

  16. Are you sure you mean virtual memory? by fiftysixquarters · · Score: 0, Redundant

    You seem to be confusing virtual memory with physical memory and swap space. Try this.

  17. Virtual memory != Swap by Anonymous Coward · · Score: 0

    The virtual memory system is not just used for swap. Instead of loading whole files into memory, the system can map the file into the address space and only load the pages which the program actually accesses. This file then becomes "virtual memory" and this way of doing it is faster than not using the virtual memory system. That's why you should always keep virtual memory enabled, even when you have enough RAM.

  18. I don't know about Vista's paging implementation.. by JonLatane · · Score: 3, Informative

    But, at least in Mac OS X, exited processes consume "inactive" memory - basically being kept in memory until they are launched again. If Vista has a similar implementation, your swapfile may just contain a bunch of pages left over from previously-running applications. Are you experiencing actual system performance problems? Concerning yourself too much with the numbers only can be a bad thing.

  19. Mark Russinovich by Anonymous Coward · · Score: 0
  20. The semantics of 'Virtual Memory' by Morgon · · Score: 1

    Note that in Windows-based machines, 'Virtual memory' is synonymous with the Page (swap) file.

    Therefore, the OP is wondering why this needs to be the case at all, and it's a good question, as Windows always seems to enjoy using the disk when there's perfectly good RAM available.

    I've forced my system to use no paging file, which greatly increases performance. However, any faults in your memory will show up more frequently (as is the case for me when I'm using a large portion of my RAM -- but not enough to get new sticks just yet :P )

    --
    [DISCLAIMER: This post is a work of satire and should not be misconstrued as a holy text upon which to base a religion.]
    1. Re:The semantics of 'Virtual Memory' by Anonymous Coward · · Score: 1, Funny

      You sir, are a morgon!

    2. Re:The semantics of 'Virtual Memory' by mindstrm · · Score: 1

      Which is something I prefer - I'd rather see problems earlier, and know about leaky applications earlier, rather than endure an ever-slowing computer until finally it crashes.

      It's going to do the same thing either way, one is just more annoying.

    3. Re:The semantics of 'Virtual Memory' by duplicate-nickname · · Score: 1

      Interesting, so failing memory doesn't effect the system cache. That is some magical hardware you have there.

      --

      ÕÕ

  21. To misquote by Amazing+Quantum+Man · · Score: 1

    4GB should be enough for anybody!

    --
    Fascism starts when the efficiency of the government becomes more important than the rights of the people.
    1. Re:To misquote by LandDolphin · · Score: 3

      It should be. However, people will keep developing bloated programs that require far more RAM then is required to perform their task.

      --
      Spelling and Grammar errors have been added to this post for your enjoyment
    2. Re:To misquote by plasmacutter · · Score: 1

      you forgot the link to the vista sales page under bloated..

      other funny substitutions include itunes (the program not the store), vuze, or imovie 08+

      --
      VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
    3. Re:To misquote by InfiniteLoopCounter · · Score: 1

      4GB should be enough for anybody!

      It should be.

      I think you have failed to appreciate the origins of the (mis)quote.

      Why not bookmark your comment so that you can come back in a few years on your next generation computer (with 160GB RAM or something)? :)

    4. Re:To misquote by TwinkieStix · · Score: 1

      I agree with you, but what you are saying is a study of economics - software is expensive and hardware is cheap. People seem to want to only put their money into hardware to make their computers faster. Buy more RAM and forget paying extra for less bloat in software! Free software is included here. Open source programmers scratch their own itches, and sometimes it's easier to add ram than to worry about a little extra bloat.

    5. Re:To misquote by oddfox · · Score: 1

      Or they could be trying to keep their apps open while they play their games that are becoming increasingly larger in footprint. S.T.A.L.K.E.R. - Clear Sky requires upwards of 1.6GB of memory for the game itself when you have it turned all the way up in DX10 mode. World of Warcraft routinely consumes at least half of my 2GB of memory.

      --
      "We invented personal computing." - Bill Gates
    6. Re:To misquote by LandDolphin · · Score: 1

      No,

      I know of the Bill Gates (mis)qoute. I was just offering my commentary on how as Hardware advances, the software bloats to nullify the advancement to an extent. So, I'll come back in and look at this comment when my computer has 160GB of RAM and WORD takes 4GB of RAM just to run.

      --
      Spelling and Grammar errors have been added to this post for your enjoyment
    7. Re:To misquote by Anonymous Coward · · Score: 0

      Or maybe they want to open absurdly large images. Or play Supreme Commander with eight people on an 81km squared map. Or...

  22. Lemme get dis stait... by crovira · · Score: 1, Flamebait

    You're using Windows 64 ultimate and it seems slow on 4GB?

    Well of course. Its Microsoft.

    --
    MSBPodcast.com The opinions expressed here are my own. If you don't like 'em... Think up your own stuff.
    1. Re:Lemme get dis stait... by Colonel+Korn · · Score: 1

      You're using Windows 64 ultimate and it seems slow on 4GB?

      Well of course. Its Microsoft.

      You've got the lowest /. UID of any retarded person I've seen.

      1) He didn't say it feels slow, nor did he imply it.

      2) Vista with 4 gigs of RAM is snappy. It feels faster than a new Macbook Pro and similar to Ubuntu. This is, of course, assuming that the user knows how to turn off all animations that slow things down.

      --
      "I zero-index my hamsters" - Willtor (147206)
    2. Re:Lemme get dis stait... by GiMP · · Score: 1

      When Slashdot was assigning 5-digit UIDs, the users weren't any less "retarded". They're just older now. A lot of the low-intelligence and immature users of those days simply aren't around anymore. You know, the Darwinian effect.

  23. Why use swap? by NecroBones · · Score: 0, Redundant

    I think the more relevant question is why use swap if you have enough ram? If you're 100% certain that everything you do will always fit inside physical memory, technically you can do away with swap. I'm not sure how Windows will deal with this however.

    --
    I have not lost my mind... it's backed up on disk somewhere!
    1. Re:Why use swap? by croddy · · Score: 2, Informative

      Because you don't just use RAM to hold your processes; you use it for caching frequently accessed data from your (comparatively slower) hard disks as well. Thus, there is never any such thing as "enough" RAM, that is, until you have enough primary storage to equal the sum of all the secondary storage you'll use in a single computing session PLUS the amount of memory needed by all your running processes.

      But nobody has that much memory. It's a waste of money. So, we trust the OS to swap out inactive pages and then fill the remaining space with disk caches. Then we spec our systems with as much primary storage as we need to contain actively used memory from processes as well as a healthy disk cache for the persistent data we're working on. With modern memory management, we get substantially higher disk access performance as well as a system that's affordable because it doesn't contain a terabyte of solid-state memory that can't even remember anything through a reboot.

    2. Re:Why use swap? by NecroBones · · Score: 1

      Well, yes and no. For linux that's certainly true to a point. If you know exactly how much memory the specific services and applications will need for the tasks that the box is assigned to, and allocate RAM accordingly such that you always have sufficient cache and buffer space, you could do away with swap altogether and do just fine. This generally works best in a server or embedded environment where you know precisely what the requirements are for the job. The system simply won't be prepared to handle any significant deviations.

      With a Windows machine, which I'm assuming will be a desktop for this case, I don't think you can accurately predict your needs. Then again, I'm not sure how efficient it is at handling swap (or I guess paging, as they call it), and thus needlessly swapping application memory to disk.

      However, if you're like me, and tend to restrict the paging file to a specific size to avoid fragmentation (say, 4GB), then simply installing 8GB in your machine and deactivating swap altogether provides the same overall amount of virtual memory space, none of which touches disk. This can be a win, if you're willing to spend the $$$ for the extra RAM.

      --
      I have not lost my mind... it's backed up on disk somewhere!
    3. Re:Why use swap? by NecroBones · · Score: 1

      lol, I got moderated down for being redundant even though I was one of the first to post attempting to redirect it to swap instead of "virtual memory"... heh, whatever. :)

      --
      I have not lost my mind... it's backed up on disk somewhere!
  24. rephrasing his question charitably... by Trepidity · · Score: 5, Interesting

    I'd assume what he's asking is: in modern systems where the amount of physical RAM is considerably larger than what most people's programs in total use, why does the OS ever swap RAM out to disk?

    The answer is basically to free up RAM for disk cache, based on a belief (sometimes backed up by benchmarks) that for typical use patterns, the performance hit of sometimes having to swap RAM back into physical memory is outweighed by the performance gain of a large disk cache.

    Of course, OS designers are always revisiting these assumptions---it may be that for some kinds of use patterns using a smaller disk cache and swapping RAM out to disk less leads to better performance, or at least better responsiveness (if that's the goal).

    1. Re:rephrasing his question charitably... by jandrese · · Score: 4, Informative

      Man, I hated that assumption in 2000, and I hate it in XP. It's the one that means when you bring Firefox up after it has been minimized, that the OS will have to laboriously swap in all of the memory for it from disk, which takes forever when you're talking about a slow laptop hard drive. I made it a habit of switching the paging file management to "manual" and reducing the paging size down to 2mb. It makes the whole system way more responsive when you're like me and have a bunch of applications open at once and in the background, and memory is so cheap that buying a little extra so you never run out (2GB) is easy.

      --

      I read the internet for the articles.
    2. Re:rephrasing his question charitably... by Twinbee · · Score: 1

      Yes, but it would be oh so nice to disable this 'feature', or at least allow the option of setting the percentage of RAM to use before the HD starts to crunch away.

      Is that really to much to ask?

      --
      Why OpalCalc is the best Windows calc
    3. Re:rephrasing his question charitably... by martyros · · Score: 4, Interesting

      The question, though, is how is the reduction in disk cache size resulting from having no virtual memory to speak of affecting your runtime? Rather than seeing it all at once, like when you swap back in Firefox, are you taking longer to navigate directories because it has to read them in every single time? And when you're using firefox, does it take longer to check its disk cache? Are you saving 2 seconds when you switch applications by losing 60 seconds over the course of 10 minutes as you're actually using an individual application?

      Saving the 60 seconds (perhaps at the expense of the 2 seconds) is exactly what the block cache is trying to do for you. Whether it's succeeding or not, or how well, is a different question. :-)

      --

      TCP: Why the Internet is full of SYN.

    4. Re:rephrasing his question charitably... by DragonWriter · · Score: 5, Insightful

      The answer is basically to free up RAM for disk cache, based on a belief (sometimes backed up by benchmarks) that for typical use patterns, the performance hit of sometimes having to swap RAM back into physical memory is outweighed by the performance gain of a large disk cache.

      Whether or not it works (and I'm not sure how well it does), there's something odd about swapping out RAM contents to disk so that you can mirror disk contents in RAM.

    5. Re:rephrasing his question charitably... by PsychicX · · Score: 1

      As near as I can tell, what happens in Windows is that it uses a lot of RAM. A LOT, as in an exorbitant amount. (I'm not judging, stay with me for a second.) I'm not entirely clear on why or what they're doing with it, but a lot of it seems to happen right at system boot, so I imagine it's fairly core stuff. I believe, however, that these are a lot of one-off structures that are built and then might occasionally be needed again, but not very much. Thus they're immediately paged out to disk, regardless of what the current memory conditions of the system are. The idea is that in most cases this is more efficient than rebuilding this stuff and you've got plenty of disk space to spare. My question has always been, why not leave it in RAM while also backing it up to disk? That would get rid of the absurd lag when using a system that has been inactive for a while and has paged out and powered down its hard disks. I imagine there's a good reason, but I don't know.

      I don't promise this is how it works, but this is my best guess based on a decent enough working knowledge of the kernel's overall implementation and my observations of its behavior.

    6. Re:rephrasing his question charitably... by Solandri · · Score: 4, Interesting

      The problem I noticed with XP (dunno if Vista does the same) is that it doesn't seem to give running apps priority over disk cache. So if you have your browser in the background and hit a lot of files (e.g. a virus scan), the browser would get paged to disk and would take forever to bring back to the foreground.

      What would be great is a setting like, "disk cache should never exceed 256 MB unless there is free RAM". In other words, if the total memory footprint of the OS and my running apps is less than my physical RAM minus 256 MB, they will never be swapped to disk. As I start approaching the limit, the first thing to be scaled back should be disk cache. Disk cache >256 MB will not be preserved by swapping my apps to disk.

      As it is, I set XP's swapfile manually to 128 MB (any smaller and I would get frequent complaints about it being too small even though I have 3 GB of RAM). If it really needs more memory, it will override my setting and increase the swapfile size. But 99% of the time this limits the amount of apps XP can swap to disk to just 128 MB, which for me results in a much speedier system.

    7. Re:rephrasing his question charitably... by anomaly · · Score: 1

      Of course, getting Windows to *use* that RAM can be an issue.

      I spent a while the other day setting up the BIOS PAE and then editing the boot sequence for Windows to use the PAE flag - and the machine may - or may not - be using more than 2GB, depending what part of Windows you ask......

      I hate some things about Windows. Memory management is one of them

      --
      But Herr Heisenberg, how does the electron know when I'm looking?
    8. Re:rephrasing his question charitably... by Locutus · · Score: 1

      so let me guess, when you load a Microsoft application like one from their MS Office lineup, you don't get this dumping to the swap file when minimized? Knowing how these guys _compete_, it just seems like this is the perfect thing for them to do no matter how much RAM is available. Swap file access is faster than random HD access but no were near as fast as RAM access and they want their software to be faster than other company's software.

      So, is this the way it works or is Microsoft being completely fair in what gets forced out to swap when minimized?

      LoB

      --
      "Anyone who stands out in the middle of a road looks like roadkill to me." --Linus
    9. Re:rephrasing his question charitably... by lgw · · Score: 4, Interesting

      The answer is basically to free up RAM for disk cache, based on a belief (sometimes backed up by benchmarks) that for typical use patterns, the performance hit of sometimes having to swap RAM back into physical memory is outweighed by the performance gain of a large disk cache.

      We're rapidly getting to the point where there's enough RAM for not only all the programs you're running, but all of the disk that those programs will access! Paging memory out to disk just doesn't make much sense anymore. I've run WIndows with no page file since Win2000 came out, and never had a problem with that.

      My current (non-gaming) desktop box has 8GB of RAM, and cost me about $1000. I rarely use that much memory for the combined total of apps, OS footprint, and all non-streaming files (there's no point in caching streaming media files on a single-user system, beyond maybe the first block).

      I expect my next $1000 system in a few years will have 64GB of RAM, at which point there really will be no point in using a page file for anything. And with a solid-state hard drive, I'm not sure there will be any point in read caching either (though write caching will still help I guess).

      --
      Socialism: a lie told by totalitarians and believed by fools.
    10. Re:rephrasing his question charitably... by Mprx · · Score: 4, Interesting

      It might save 60 seconds, but it's saving the wrong 60 seconds. I'm not going to notice everything being very slightly faster, but I'll notice Firefox being swapped back from disc. I only care how long something takes if I have to wait for it.

      Kernel developers seem to mostly care about benchmarks, and interactive latency is hard to benchmark. This leads to crazy things like Andrew Morton claiming to run swappiness 100 (swappiness 0 is the only acceptable value IMO if you need swap at all). I don't use swap, and with 4GB ram I never need it.

    11. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      Whether or not it works (and I'm not sure how well it does), there's something odd about swapping out RAM contents to disk so that you can mirror disk contents in RAM.

      It only sounds odd superficially. But it is in fact just a split cache; part of RAM is used for process address space, and part for the file system (including memory mapped files). When you look at it that way, it's no more odd then using separate instruction and data caches in a CPU.

    12. Re:rephrasing his question charitably... by pyrbrand · · Score: 1

      Until you think that hey, I've got about 20 processes running and most of them are inactive most of the time. Why not free up RAM for disk caching for the active processes?

    13. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      Not really. The ram contents in swap usually is files the processor has been told to in some way process, while the cache is files that the processor is waiting for to be processed.
      With other words: in you swap is the shit you processor has been used long ago, so long ago that it has almost forgotten it, but may need it later as the process loading it still sleeps somewhere.
      In your disccache lays the files your processor wants to gets itÃs hands drity with... That is as soon as it is ready whith whatever it is doing right now.

      My system uding 2 Gb ram and a lot of services responds better with swap than without. I think mostly becouse the processor does not have to wait for the disk becouse a sleeping program took too much ram.

    14. Re:rephrasing his question charitably... by Estanislao+Mart�nez · · Score: 1

      Whether or not it works (and I'm not sure how well it does), there's something odd about swapping out RAM contents to disk so that you can mirror disk contents in RAM.

      Assume all disk reads and writes are the same cost, one unit. The cost of swapping a page out, and then later swapping it back in, would then be two units. Basically, the throughput cost of swapping a page out and later back in breaks even if you otherwise save two disk reads--for example, by getting two hits on the disk cache.

      There's nothing odd about this. Basically, RAM is faster than disk, so you want the data that's used most often in RAM, and the data that's used less often on disk. Which pieces of data are process memory pages and which are file block data is irrelevant.

      The big questionable assumption here, however, is that the goal is to maximize throughput of a constant workload. If you're seeking to minimize latency in a highly-variable, interactive workload, then things can easily change. This is why swapping is often perceived to be bad for desktop systems: the user will often switch over to a completely different program from what she's using, and doesn't want to wait for the UI to respond. This translates into a requirement for low latency of frequent workload changes.

    15. Re:rephrasing his question charitably... by Athanasius · · Score: 1

      I think I'm correct in stating that such systems will pre-emptively *copy* some things out to swap so that if it seems some extra RAM for disk cache is a good idea then it's a near-zero cycles operation to repurpose the RAM. They're still there in RAM in the meantime if the program needs that particular page of memory. This of course would be done whilst the system was otherwise quiescent.

    16. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 1, Informative

      Any process is free to lock memory so that it will never be paged out. It's not something that is reserved for Microsoft products.

    17. Re:rephrasing his question charitably... by MidnightBrewer · · Score: 1

      If you're a serious Photoshop user, animator, video editor, or do any other work that is graphics-intensive, has a large undo stack, or relies on real-time effects (i.e. video playback in Final Cut Pro), then even modern systems with less than 8GB of RAM are still going to require disk swapping. Run two or more of these programs at a time and your requirements skyrocket. There are still many legitimate reasons for having virtual memory services available in an operating system.

      --
      "Give a man fire, and he'll be warm for a day; set a man on fire, and he'll be warm for the rest of his life
    18. Re:rephrasing his question charitably... by Lehk228 · · Score: 1

      Microsoft office programs do get paged out, outlook takes forever to re-load when it's been sitting idle too long on lower spec machines like i have to deal with at work.

      it's sometimes faster to close it and let the app cache preload it to be launched again than to leave it open when you go to lunch.

      --
      Snowden and Manning are heroes.
    19. Re:rephrasing his question charitably... by xouumalperxe · · Score: 1

      Implement that and you get everybody going "Damn, all my programs get so damned slow when MS Word is open" because the memory is not being made available to the other running programs to swap into. Sometimes, plans to make your product look better only do the reverse.

    20. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 1, Funny

      Gee, there's a lot of disk I/O on pagefile.sys. Better cache that in RAM.

    21. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      Whether or not it works (and I'm not sure how well it does), there's something odd about swapping out RAM contents to disk so that you can mirror disk contents in RAM.

      There's nothing odd at all about that, the OS notices that some RAM areas haven't been used for a long time, so it decides wisely to use it instead to cache disk contents that appear to be used more often.

    22. Re:rephrasing his question charitably... by jandrese · · Score: 1

      I don't notice any difference at all browsing around the filesystem. I have enough memory in the system that the disk cache is more than adequate. The choice between keeping a file I last accessed 30 minutes ago and an active application that I switch back to on a regular basis in memory is an easy one for me.

      --

      I read the internet for the articles.
    23. Re:rephrasing his question charitably... by dch24 · · Score: 3, Interesting

      You obviously don't fit those requirements. Real Photoshop, FCP, and Avid users aren't concerned about swap, they're concerned about Disk I/O speeds, and they don't want Windows swapping things to disk.

      As an admin for a video editing shop, we turned off swap long ago. The programs we use know how much ram and how much disk ("cache") to use already, and they don't want anyone getting in their way.

      Especially not swapping, which thrashes the seek time.

    24. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      It's all about having the right contents in memory for your most immediate needs. Think of RAM and hard disk as a continuum - RAM is fast, HD is slow, but they both contain data that you need either now or later. Swapping program state to disk so that you can cache files is just moving things around so that the stuff you are most likely to need is in the location that has the fastest access.

    25. Re:rephrasing his question charitably... by kudokatz · · Score: 1

      I'd assume what he's asking is: in modern systems where the amount of physical RAM is considerably larger than what most people's programs in total use

      The last time I checked the total amount of virtual memory used on my system, it was FAR greater than my actual available RAM . . . but if you want to use up your physical RAM, just fire up eclipse -- it is getting super-fat *grumble*

    26. Re:rephrasing his question charitably... by Just+Some+Guy · · Score: 1

      Whether or not it works (and I'm not sure how well it does), there's something odd about swapping out RAM contents to disk so that you can mirror disk contents in RAM.

      Not if you consider your HD to be a big, slow chunk of memory. The more likely you are to use a byte, the closer it moves to the CPU (HD -> RAM -> L2 -> L1 -> registers). The less likely you are to need it again, the farther it moves back along the same path.

      --
      Dewey, what part of this looks like authorities should be involved?
    27. Re:rephrasing his question charitably... by k8to · · Score: 1

      You still want paging.

      Your bloated fat programs like mozilla and your game will have plenty of pages they never plan to use, because of memory fragmentation and other issues. In a typical malloc implementation, you will end up with pages that have NO data in them but still can't be returned to the oprating system. Paging lets these be dumped at essentially no cost.

      It's just a question of tuning to find the sweet spot. You definitely want SOME paging, but the ratio to memory has certainly been falling over the years.

      --
      -josh
    28. Re:rephrasing his question charitably... by johanatan · · Score: 1

      Excellent post sir.

    29. Re:rephrasing his question charitably... by psetzer · · Score: 1

      Yep. Windows is really just pretty damn aggressive about it and will happily back everything to disk if it's given the chance. That way when it needs more room to cache a file for instance it's got a lot of different choices.

      --
      "Anyone who attempts to generate random numbers by deterministic means is living in a state of sin." -- John von Neumann
    30. Re:rephrasing his question charitably... by Allador · · Score: 1

      32-bit desktop windows versions ignore PAE settings.

      This wasnt always the case, but apparently (according to MS) many many consumer-hardware drivers are not written to deal with PAE and the extra level of indirection, and so will crash or blue-screen frequently. So they disabled the whole thing at some point around XP sp2 (iirc).

      32-bit server versions do not, and 64-bit versions of either dont need it.

    31. Re:rephrasing his question charitably... by Kaz+Kylheku · · Score: 1

      Are you saving 2 seconds when you switch applications by losing 60 seconds over the course of 10 minutes as you're actually using an individual application?

      Improving those two seconds is responsiveness.

      Wasting small amounts of time over a long period is a loss of throughput.

      Guess which one is more important for interactive computer use?

      Those 60 seconds you lose over 10 minutes aren't seconds that can be put into good use, because they are not in one nice 60 second block.

      Put it another way, whatever task you are doing with the computer wouldn't get done any sooner if that time were recovered. The task would be done with fewer disk accesses, which isn't the same thing!

    32. Re:rephrasing his question charitably... by Free+the+Cowards · · Score: 1

      It's not odd if you look at the bigger picture. Forget about "RAM" and "disk", it's all just storage with different characteristics. With a modern OS, your RAM is basically just a big cache sitting in front of the disk. Stuff that gets used most often stays in RAM, stuff that gets used less often moves to disk. From this perspective, the fact that some less-used data starts its life in RAM and some more-used data starts its life on disk isn't really all that strange.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    33. Re:rephrasing his question charitably... by lgw · · Score: 2, Insightful

      Your bloated fat programs like mozilla and your game will have plenty of pages they never plan to use, because of memory fragmentation and other issues. In a typical malloc implementation, you will end up with pages that have NO data in them but still can't be returned to the oprating system. Paging lets these be dumped at essentially no cost.

      No, no, no! Paging always has a cost, paid in disk I/O. And if you *never* run out of memory, why pay that cost? Plus, in practice, OSs tend to swap out stuff they shouldn't, and end up swapping it back in again, even though there was no memory shortage. Windows particularly sucks at this, but no one is perfect.

      Again, if my box has more memory than will ever be needed by my OS, my apps, and all of my non-streaim files together, what crazy reason could there possibly be to swap? I swear, it's like it's some religious ritual or something!

      --
      Socialism: a lie told by totalitarians and believed by fools.
    34. Re:rephrasing his question charitably... by LackThereof · · Score: 1

      how is the reduction in disk cache size resulting from having no virtual memory to speak of affecting your runtime?

      That might be a concern for Vista users, but IIRC Windows XP and earlier use a tiny disk cache of only ~8MB anyway, a holdover from the olden days. I don't think you're going to accidentally squeeze that out of RAM.

      I think there's a registry edit you can make to enlarge it, though.

      --
      Legalize recreational marijuana. Seriously.
    35. Re:rephrasing his question charitably... by terjeber · · Score: 1

      It's the one that means when you bring Firefox up after it has been minimized, that the OS will have to laboriously swap in all of the memory for it from disk

      I don't get this, what kind of systems are we talking about here, and with what amounts of RAM? I have never seen this in 2000, in XP and I currently do not see it in Vista 64 (yes I had to, I am running 64 bit apps on Windows and Vista is the only real choice).

      I typically have a bunch of apps open at the same time, currently Outlook (company choice), Firefox, Eclipse, VMWare with Fedora 10, Opera, Chrome, Acrobat reader, a few command prompts etc. Switching between apps is instantaneous, no delay. I just switched to Acrobat which has been minimized since yesterday morning, and it was instant. Chrome has not been used in at least 24 hours, and voila, switching to it is instant.

      This is on a laptop with 4G of memory and a laptop drive. Laptop is recently issued, so I had to check the settings for my PF, which is at 1xRAM. Still works like a charm. Just switched to Eclipse too, no disk hit, no delay.

      Not saying you are full of it, but I have never seen the behavior you describe, at least not since real-mode Windows. Not on PCs with any real amount of memory at least.

    36. Re:rephrasing his question charitably... by drmerope · · Score: 1

      There is another reason: suppose an application suddenly starts mallocing and/or touching overcommitted memory. Do you want to take a performance hit then and there? No. The right strategy is to page to disk BEFORE you have pressure to reuse the RAM in the idle times. If you never get a malloc or such, no big deal: the old data is in BOTH places. But if do get a malloc, then the OS just scrubs the memory already paged and allocates it.

      Windows performs badly because of its no-'overcommit' policy. Evictions are done when another program mallocs the memory, rather than merely when another program touches a page of memory for the first time. As a consequence, Windows tends to evict perfectly good-data in favor of uninitialized data.

    37. Re:rephrasing his question charitably... by martyros · · Score: 1

      Those 60 seconds you lose over 10 minutes aren't seconds that can be put into good use, because they are not in one nice 60 second block.

      I guess it depends on the exact situation. If the 60 seconds is divded up into sub-10ms chunks, no one will notice; and if the cached images take a little longer to load, but I can start reading the article anyway, it won't matter either. But, for example, if my wife is scanning through her professional photo files with Adobe Bridge, and she's consistently waiting 2-3 seconds every time she navigates a directory for it to load up all of the thumbnails, then she will take 60 seconds longer to finish her task in the end.

      And of course, it's perfectly possible that the block cache is actually making bad decisions. And it's even more possible that Firefox has sprung a memory leak, and that it's got a 800MB core, which is the reason why it got swapped out in the first place. :-)

      --

      TCP: Why the Internet is full of SYN.

    38. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      Not if you remotely understand cache architecture.

      You want the frequently-used data in RAM and the less frequently-used data on disc.

      This is true regardless of its source.

      What starts up in RAM and what starts up on disc is an implementation detail irrelevant to the operation of the caches.

    39. Re:rephrasing his question charitably... by jandrese · · Score: 1

      Currently? A Dell Latitude D630 with a Core 2 Duo T7700, 2GB of physical memory, and some Seagate hard drive. Before the switch, if I left Outlook minimized for long enough switching back was always the same story: First the un-candyfied window appears, then the candy, then some of the toolbars, then the bottom bar, then finally the internal widgets would fill in. Typically it would take 15-20 seconds or so, and still be a bit sluggish about switching mails for a few more seconds (3-5 seconds to load a mail).

      With the pagefile reduced to 2mb, it pops up in less than a second every time.

      Now how bad it is depends on how long the application has been minimized. Windows XP appears to chip away at the memory bit by bit whenever something is minimized. It doesn't matter if you're actually doing anything on the machine (although I suppose you could speed it along by running something else that consumed a lot of memory), the primary factor is just how long it has sat minimized. It was always slow first thing in the morning, even if the last thing I did before leaving the night before is read my mail.

      One caveat is that my work requires me to run full disk encryption software on the laptop (Pointsec), which makes disk access even more expensive than it normally is.

      --

      I read the internet for the articles.
    40. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      In other words, "64GB should be enough for anyone"

    41. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      I'm fairly sure that's the fault of Mozilla devs. I remember reading somewhere a while back (either bugzilla or the mozillazine forum) where a dev talks about this. It's to keep Firefox from using up all the system's RAM when it's not being used.

      It is pretty damn annoying. I would think most people have more than enough RAM to keep FF loaded while doing other things and this sort of thing is completely unnecessary. I have 2 gigs myself and the only time I've come close to maxing it out was when playing a video game with a huge memory leak.

    42. Re:rephrasing his question charitably... by roc97007 · · Score: 1

      It does seem like XP has an aggressive tendency to swap out minimized or quiescent programs. If you're doing a few things it's not noticeable, but if you're doing a lot of tasks and switching between several large applications, (my usual workflow) it's very noticeable. With 4 Gbytes memory, and task manager showing only 900 megs in use, I shouldn't be swapping at all. Nevertheless, every time I maximize something it's grind... grind... grind... before the window responds. It's like the XP swapping algorithm is based on minimum ram requirements and doesn't understand that ram is cheap now and you have eight times the minimum amount of memory installed. Swapping behavior should change with the amount of physical memory. Or it should at least be adjustable by a knowledgeable person.

      I understand about disk cache, but if you're swapping unnecessarily in a misguided attempt to free up excessive amounts of disk cache, you still end up with a lot of thrashing.

      --
      Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
    43. Re:rephrasing his question charitably... by Anonymous Coward · · Score: 0

      "Are you saving 2 seconds when you switch applications by losing 60 seconds over the course of 10 minutes as you're actually using an individual application? "
                I'm guessing "no". When I used to run XP (I'm now Ubuntu and Gentoo only) turning off swap sped it up as jandrese said, with no bad side effects. 2000 and XP (and apparently Vista as well...) have a poorly tuned disk caching system, it's overly agressive in forcing useful data into swap (to free up ram for disk caching) and honestly doesn't handle the cache it does have too well either. Swap off? Less poorly-managed disk cache, more actual apps in memory.

    44. Re:rephrasing his question charitably... by skintigh2 · · Score: 1

      There is a setting in Firefox to prevent that, but it should be the default...
      http://kb.mozillazine.org/Config.trim_on_minimize

    45. Re:rephrasing his question charitably... by Abcd1234 · · Score: 1

      there's something odd about swapping out RAM contents to disk so that you can mirror disk contents in RAM.

      Oh BS. If I'm not using something that's been loaded into RAM, while frequently accessing something on disk, which do I want occupying physical memory?

    46. Re:rephrasing his question charitably... by swilver · · Score: 1

      The assumption is pretty bogus though.

      When I'm at the computer, I expect good performance. I dislike waiting. When I open a program, and leave it open, I did so because I intend to use it, now, or at some unpredictable time in the future.

      When I'm NOT at the computer, and thus not directly using any of my programs, I also don't give a damn about PERFORMANCE.

      Yet, when I'm not at the computer, Windows thinks it would be a good idea to swap out programs to make more room for caching files (without a limit I might add, it will happily waste all of my 6 GB of physical memory on this) to increase performance, something that is irrelevant since I'm not there anyway. For this completely useless benefit, it sacrifices everything...

      The actual result is that when I get BACK to my computer, I get shitty performance -- right at the moment performance starts to really matter again.

      The "fix" for this problem is trivially easy, but unfortunately, not possible in modern versions of Windows: Put a limit on the file/disk cache to prevent it from pushing things to swap (in my 6 GB system, I could tell it to never use more than 2 GB of that space for caching -- and all would be great..). Since that is not an option, I used the next best thing, I turned off swap. File/disk caching still works perfectly, except now it is forced to play within the confines of that 6 GB of memory (and usually there's still like 4+ GB to play with :))

    47. Re:rephrasing his question charitably... by swilver · · Score: 1

      You won't really notice (*). The disk/file cache still does it's job without swap being active, it just cannot sacrifice program data for file/disk cache anymore -- exactly the way I want it. So, in a 4 GB system, and 2 GB is taken up by programs, there's still 2 GB of space for caching file data. That's likely enough to cache the entire directory structure of everything you have twice over.

      (*) assuming you are not pushing close to an out of memory already (I recommend sticking in twice as much RAM as you'd really need to run all of your often used programs at once).

    48. Re:rephrasing his question charitably... by k8to · · Score: 1

      Paging always has a cost right. Allocated and unused memory has a cost too. So if a page is allocated and never paged out, at some point the cost of not paging it out in the first place is larger than the cost of paging it out. THe question is just where that crossover point is.

      Is it a minute, an hour a day?

      I certainly have programs which run for days or months, and they sometimes have many many megabytes of unused memory.

      If your box has more memory than will ever be used by all your os, apps, and files, then there isn't a problem, since a sane paging algorithm won't push that aside for anything, since there's no pressure.

      Either your OS is completely insane, or the programs you are using are making use of more files and memory than you think they are.

      --
      -josh
  25. VM is a many splendour'd thing. by ettlz · · Score: 1

    Is there a reason why my system should even be using the virtual memory anymore?

    Yes, for memory protection. Oh, you mean swap. Well,

    I would think the computer would run better if it based everything off of RAM instead of virtual memory.

    not everything mapped into a process's address space is in constant use. Swap it out, use the RAM for...

    Any thoughts on this matter or could you explain why the system is acting this way?

    ...the storage cache.

  26. More than just memory management by frog_strat · · Score: 4, Interesting

    Virtual memory is now used for little tricks, in addition to providing more memory than is physically available.

    One example is ring transitions into kernel mode which start out as exceptions. (Everyone seems to have ignored call gate, the mechanism Intel offered for ring transitions).

    Another is memory mapped pointers. It is cool to be able to increment a pointer to file backed ram and not have to care if it is in ram or not.

    Maybe the OP is onto something. Imagine writing Windows drivers without having to worry about IRQL and paging.

  27. The problem is windows by Anonymous Coward · · Score: 0

    The algorithms in windows that decide when and what to page to disk are fucking insane. No matter what it will always do that. We have a vista64 box with 16gigs of ram and - surprise the same shit! I've tried to disable swap altogether and it just can't be done in 'doz. It will for instance turn it back on, or give crazy errors.

  28. I prefer none. by mindstrm · · Score: 5, Insightful

    This should generate some polarized discussion.

    There are two camps of thought.

    One will insist that, no matter how much memory is currently allocated, it makes more sense to swap out that which isn't needed in order to keep more free physical ram. They will argue until they are blue in the face that the benefits of doing so are good.
    Essentially - your OS is clever and it tries pre-emptively swap things out so the memory will be available as needed.

    The other camp - and the one I subscribe to - says that as long as you have enough physical ram to do whatever you need to do - any time spent swapping is wasted time.

    I run most of my workstations (Windows) without virtual memory. Yes, on occasion, I do hit a "low on virtual memory error" - usually when something is leaky - but I prefer to get the error and have to re-start or kill something rather than have the system spend days getting progressively slower, slowly annoying me more and more, and then giving me the same error.

    This is not to say that swap is bad, or that it shouldn't be used - but I prefer the simpler approach.

    1. Re:I prefer none. by seebs · · Score: 1

      Have you benchmarked this? On my systems, there's a ton of data which could page in once a week -- but while it's out, I can use the space for disk cache which gets reused several times a day. I'd assume that more stuff in memory that actually gets used is better.

      --
      My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
    2. Re:I prefer none. by Just+Some+Guy · · Score: 4, Interesting

      One will insist that, no matter how much memory is currently allocated, it makes more sense to swap out that which isn't needed in order to keep more free physical ram.

      Most of the people in this camp are coming from a Unix background where this is actually implemented effectively. For example, the FreeBSD machine next to my desk has 6GB of RAM, but even with about 3GB free, I'm currently about 1GB into my 16GB of swap. (Why 16? Because it's bigger than 6 but still a tiny part of my 750GB main drive.)

      FreeBSD, and I assume most other modern Unixes, will copy idle stuff from RAM to swap when it's sufficiently bored. Note that it doesn't actually delete the pages in physical memory! Instead, it just marks them as copied. If those processes suddenly become active, they're already in RAM and go on about their business. If another process suddenly needs a huge allocation, like if my site's getting Slashdotted, then it can discard the pages in RAM since they've already been copied to disk.

      That is why many Unix admins recommend swap. It helps the system effectively manage its resources without incurring a penalty, so why wouldn't you?

      It's my understanding that Windows never managed to get this working right, so a lot of MS guys probably prefer to avoid it.

      --
      Dewey, what part of this looks like authorities should be involved?
    3. Re:I prefer none. by Chris+Burke · · Score: 1

      One will insist that, no matter how much memory is currently allocated, it makes more sense to swap out that which isn't needed in order to keep more free physical ram. They will argue until they are blue in the face that the benefits of doing so are good.
      Essentially - your OS is clever and it tries pre-emptively swap things out so the memory will be available as needed.

      Not exactly... It doesn't swap things out so the memory is free just in case an active application decides it needs it. The OS pre-emptively swaps things out so that the memory can be immediately used for useful things like a file cache (which can be instantly discarded in case an application needs it).

      If the page utilization and file caching algorithms work correctly for your usage pattern, then this is undoubtedly a benefit to performance. And the algorithms are good, so they do apply to a wide variety of cases. Hopefully I don't have to argue until I'm blue in the face to convince you of this.

      I run most of my workstations (Windows) without virtual memory. Yes, on occasion, I do hit a "low on virtual memory error" - usually when something is leaky - but I prefer to get the error and have to re-start or kill something rather than have the system spend days getting progressively slower, slowly annoying me more and more, and then giving me the same error.

      The days where swap was used primarily to increase the effective amount of memory you had for running applications are long gone. It made some sense back then, for several reasons. First, even when 16MB was considered "a lot", few people considered it enough. Having a way to use more was handy when running Paint Shop Pro. Second, the relative speed of disk and memory was closer than it is today. Not exactly close, but a lot closer than today. Third, the amount of memory being handled was smaller. Disks speed has increased nearly as quickly as disk size and memory size. So doubling your effective memory by swapping that entire 16MB to disk is a much, much faster operation than doing the same with 1GB of RAM today.

      But I agree with what you are saying regarding those actual low-memory situations and how you'd much rather kill them before they got around to needed all that disk space for swap. I have two thoughts on that. One is that old rules of thumb like "use swap equal to your physical RAM" need to go. You don't need 2GB of swap space if you have 2GB of RAM. You wouldn't want to use that much swap in most cases. I use a value like 256MB.

      My second thought is that it might be a good idea to separate these two usage models of swap. Being able to swap out unused application pages to make room for file cache can be a good thing. Using swap because an application is demanding more memory than is physically available is probably not what you want, and is a great way to end up with an unresponsive thrashing system. It would be nice to be able to have the first feature, but have the application in the second case get an out of memory error. This thought, though, is pretty half-baked, so I'm not exactly going to go email my nearest kernel developer with the idea.

      --

      The enemies of Democracy are
    4. Re:I prefer none. by seh4 · · Score: 1
      I'm with you in the "don't let the OS swap out your apps" camp.

      But rather than completely turn off swap, I use vm.swappiness=20 on linux servers and workstations, much less swappy than the default of 60.

      So to prevent the OS from swapping out my precious latency-sensitive BloatyApp (JVM) even if it's been idle for days, I recommend making a call to mlockall, through a JNI wrapper.

      From mlock(2): "All mapped pages are guaranteed to be resident in RAM when the call returns successfully; the pages are guaranteed to stay in RAM until later unlocked."

    5. Re:I prefer none. by Anonymous Coward · · Score: 0

      Your camp assumes that "virtual memory" is the same thing as "swap". It's been stated earlier in this thread, but they are not the same thing on any modern operating system (though they were the same thing in Mac OS 9 and earlier).

      Because they are not the same thing, you are wasting physical memory with VM turned off, since oftentimes applications ask the kernel for memory but don't actually use it until it's necessary for it to do so. On Mac OS X, for example, the dynamic linker always sets aside around 500 MB for itself each time an application started up (1.6 GB if the application is 64-bit). If it was possible to turn off VM in Mac OS X, and it's not, then that means the OS would only be able to run 4-8 background tasks and then you wouldn't be able to do anything else.

    6. Re:I prefer none. by seh4 · · Score: 1

      That is why many Unix admins recommend swap. It helps the system effectively manage its resources without incurring a penalty, so why wouldn't you?

      Oh, but a big penalty is incurred. Always.

      File buffers (for faster repeated reads) are a 100% total waste of RAM for a lot of disk reads that are never repeated, such as the nightly backup, slocate, makewhatis, and similar poltergoosts that come out between midnight and 4am localtime when nobody's looking.

    7. Re:I prefer none. by D+Ninja · · Score: 1

      One is that old rules of thumb like "use swap equal to your physical RAM" need to go.

      I tend to agree with you, but when I setup my Gentoo installation awhile back, one of the instructions said that swap needs to be equal to or greater than physical RAM so, when hibernating, all the information in the RAM could be written out to the swap space.

      I did this awhile ago, so I may not have everything correct, but it was something along those lines.

      Is it still possible to "hibernate" w/out a large enough swap space?

    8. Re:I prefer none. by Chris+Burke · · Score: 1

      Frankly I have no idea since I don't have a laptop. :)

      --

      The enemies of Democracy are
    9. Re:I prefer none. by Just+Some+Guy · · Score: 1

      And the presence of swap causes a problem why? Again, I have 3GB free right now. I'm pretty positive that FreeBSD isn't going to page out httpd so that updatedb can prance through the filesystem.

      --
      Dewey, what part of this looks like authorities should be involved?
    10. Re:I prefer none. by seh4 · · Score: 1
      Linux kernel at swappiness >= 60 will favor file buffers over large long-running apps.

      I'm guessing FreeBSD does this better than Linux.

      So your httpds would probably be fine even on linux, but my server JVMs get pushed out and incur a big penalty to be paged back in.

      I wouldn't advise people turn off swap either, just to be aware that the penalty is incurred, and that it can be avoided e.g. with a lower swappiness value and/or the mlock(2) call.

    11. Re:I prefer none. by toddestan · · Score: 1

      It's my understanding that Windows never managed to get this working right, so a lot of MS guys probably prefer to avoid it.

      Actually, Windows does a pretty decent job at it. That's why a 256MB machine running XP isn't all that bad despite being unspec'd on ram. The problem is that Windows isn't very good at it when it has tons of ram available. The main problems are:

      1. It will page things out when the system is otherwise busy doing things, bogging it down with disk I/O. Possibly nessecary on a ram starved system, but if I already have gigs of ram available it should wait until it's idle or simply not do it at all.

      2. It will page things out even when there is tons of ram available. If I have 2GB of ram and am using 600MB of it leaving 1.4GB open, is there really any need to page out 400MB of it just so I can have 1.8GB available? Nothing I run needs to grab that much ram that quickly, so there really isn't any point to the exercise (and thanks to Prefetch, Windows should know this).

      3. It will use the available pages as disk cache. Once again, if you don't have much ram this isn't a bad thing. But if I have 2GB of ram and am using 1GB of it so I have 1GB left for the disk cache, is there really much of an advantage to paging out 500MB of what I'm using to have a 1.5GB disk cache?

    12. Re:I prefer none. by Just+Some+Guy · · Score: 1

      It will page things out even when there is tons of ram available.

      Well, if it actually removes the copy in RAM, that'd be a flaw. Note that I drew a distinction between "copying" and "moving", so the OS doesn't actually have to choose between freeing the RAM and resuming the idle process until one or the other comes up.

      --
      Dewey, what part of this looks like authorities should be involved?
    13. Re:I prefer none. by Anonymous Coward · · Score: 0

      ...I prefer to get the error and have to re-start or kill something rather than have the system spend days getting progressively slower, slowly annoying me more and more, and then giving me the same error.

      You might not get this problem if you have enough disk space and run defrag occasionally. The less your disk space the more often you need to run defrag ... why? fragmented swap files seem to be problematic - I use swap partitions on linux systems, so I have only seen this problem with Windows. Also, paging/swapping strategies are different between operating systems.

  29. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Vista for me idles fresh boot at about 300-400mb. When you see large spikes it's probably prefetching applications and loading them into ram. This way when you go to load world of warcraft every day at 5:30pm it takes a fraction of the time on the initial load. The memory used to store prefetched applications appears as part of "windows' memory" before being loaded so it can make it seem like windows vista is actually using 1gb when in fact most of that is WoW, or Photoshop, or Counterstrike, etc.

  30. Use the RAM where it's needed. by Canonical+AC · · Score: 1

    The operating system will page out pages that have never been used, or used very infrequently, if at all.
     
    If you have a 6MB program, and there is 500K of code that's used on startup, but never referenced again, let the operating system page it out, and use that RAM for other programs, or cache. The same goes for code that implements functionality that is rarely (if ever) used. Why load it, if it never gets referenced?
     
    In a regular program, there are lots of pages that are referenced once, or not at all.

    --
    Canonical Anonymous Coward

    Can a sig be more clever than it's creator?
  31. Winner by Anonymous Coward · · Score: 2, Informative

    Each process has it's own addressspace. This is necessary and usefull for several reasons.
    1) You can get memory at any virtual address you request. This is necessary as .exe files usually contain no relocation section and thus need to be mounter always at the same virtual address.
    2) Processes are well seperated, and on a 64Bit system each 32bit process can get a memoryspace which is addressable with a 32bit pointer, but the whole system having more memory than thet.
    3) executable code (mainly .dlls) can be mapped as copy-on-write using the physical RAM only once, even if they are mounted in several process. Once a process modifies the executable it gets its own copy of the modified page, and the virtual address does not change.
    And if you are talking about paged memory, it is still usefull even if you still have enough RAM, as you can reserve memory for future use. To be able to satisfy a commit of that memory at a later time the OS reserves that space in the swap file. As there is no data to write to the HDD you get no performance hit.

  32. Not just a funny by EmbeddedJanitor · · Score: 1
    With earlier versions of XP Embedded you had to provide a block device for paging, which is pretty stupid in an embedded system. Some people subverted this by hiding some RAM from the OS and making it available as a "disk".

    You also had to provide a display driver, even for devices with no display. Same deal, make a "fake one".

    --
    Engineering is the art of compromise.
  33. Finally! A use for my CS degree! by sdaemon · · Score: 3, Funny

    I can finally put my CS degree to good use, answering the same questions students would ask the TAs in basic OS and systems-level programming courses! ...except that the other comments have already answered the question. So, in true CS fashion, I will be lazy and refrain from duplicating effort ;)

    Laziness is a virtue! (And that's on-topic, because a lazy paging algorithm is a good paging algorithm).

    1. Re:Finally! A use for my CS degree! by D+Ninja · · Score: 2, Insightful

      So, in true CS fashion, I will be lazy and refrain from duplicating effort ;)

      In true CS fashion, you wouldn't have posted in the first place. ;-)

    2. Re:Finally! A use for my CS degree! by twizmer · · Score: 2, Informative

      No, no, he had to pat himself on the back about his degree, and his brilliant laziness. Definitely true CS fashion.

  34. Switch from Windows by exabrial · · Score: 1

    Free Memory is wasted Memory. Even-More-Modern operating systems like Linux and BSD manage memory incredibly efficiently.

  35. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Do you mean that vista requires 1GB for loading all of it's libraries? Because I thought if you turned off services you don't need and Aero you could get it well under that.

    If it actually reserves 1GB no matter what then...link or better explanation?

  36. Swap is expected, so without it, you crash. by Khopesh · · Score: 4, Informative

    I recall back in 2002 or so, a friend of mine maxed out his Windows XP system with 2gb of memory. Windows absolutely refused to turn off paging (swap), forcing him to whatever the minimum size was. The solution? He created a RAMdisk and put the paging file there.

    On Linux (and other modern systems, perhaps now including Windows), you can turn off swap. However, the Linux kernel's memory management isn't so great at the situation you hit when you need more memory than you have, but you can't swap. Usually, the memory hog crashes as a result (thankfully, Firefox now has session restore). I might be slightly out of date on this one.

    A well-tweaked system still has swap (in nontrivial amounts), but rarely uses it. Trust me, you can afford losing the few gigabytes from your filesystem. Again in Linux, /proc/sys/vm/swappiness can be tweaked to a percentage reflecting how likely the system is to swap memory. Just lower it. (Though note the cons to this presented at the kerneltrap article above.) My workstation currently has an uptime of 14 days, a swappiness of 60, and 42/1427 megs of swap in use as opposed to the 1932/2026 megs of physical memory in use at the moment.

    This is summarized for Windows and Linux on Paging at Wikipedia.

    --
    Use my userscript to add story images to Slashdot. There's no going back.
    1. Re:Swap is expected, so without it, you crash. by hyades1 · · Score: 1

      Windows (XP) absolutely refused to turn off paging (swap), forcing him to whatever the minimum size was.

      That's genuinely weird. I run XP Pro with 2G of RAM, and I had no difficulty turning off my swap file in Control Panel when I wanted to do a thorough defragmentation of the HDD where it resided. Although XP ran fine without virtual memory, I use a lot of RAM-intensive applications when I get close to deadline. So having defragged the drive, I gave XP a 4G fixed-size swap file to play in. I can't say I noticed a performance difference one way or the other.

      I will note that my friend's dad has a system nearly identical to mine and runs Vista Home Premium with all the default settings. Comparatively, it runs like a pig on skates. That's not FUD, it's just fact.

      --
      I've calculated my velocity with such exquisite precision that I have no idea where I am.
    2. Re:Swap is expected, so without it, you crash. by Reziac · · Score: 1

      XP will let you turn off the pagefile; the problem is a (originally in Win2K) bug that sometimes makes you root thru the registry to find and delete the setting that refuses to go away. I haven't run into it in a while so can't recall offhand where it was, but it was easy enough to find.

      Back in the DOS era, I used the RAMdisk solution for those few apps that needed a lot of temp space (relatively speaking), which was the swapfile of that era. I had a memory card that couldn't be used as system RAM, but worked fine as a RAMdisk. Worked a treat, and quadrupled system performance.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    3. Re:Swap is expected, so without it, you crash. by xianthax · · Score: 1

      the Linux kernel's memory management isn't so great at the situation you hit when you need more memory than you have, but you can't swap. Usually, the memory hog crashes as a result (thankfully, Firefox now has session restore).

      actually this is wrong, in the 'default' configuration for the linux kernel it kill the highest memory using processes to free up space. this is something that should be more well known since its not the behavior you want on a production server with high memory usage applications. such systems need to check the configuration and build a new kernel if needed. cheers, x

    4. Re:Swap is expected, so without it, you crash. by klapaucjusz · · Score: 2, Informative

      On Linux (and other modern systems, perhaps now including Windows), you can turn off swap. However, the Linux kernel's memory management isn't so great at the situation you hit when you need more memory than you have, but you can't swap. Usually, the memory hog crashes as a result

      Oh my... you want the full answer on this one?

      Modern operating systems don't actually allocate the memory that a user-space application asks for. When the user-space application calls brk, malloc or VirtualAlloc, the calls always succeeds. The memory will be actually allocated lazily, the first time the application touches it. If the system runs out of memory, it is too late to return an error code from the memory allocation call, so the application will most likely crash with SIGSEGV. (An alternate, somewhat suboptimal, semantics is to crash the whole system.)

      Obviously, not everyone is happy with this situation. Some proprietary Unices (notably AIX) deal with it by sending warnings to a process before crashing it with SIGSEGV. Under Linux, you can tune this behaviour with the vm.overcommit_memory and vm.overcommit_ratio sysctls, which tune how willingly the system will return success for memory allocations for memory it doesn't actually have. While tuning these values is something of a black art, when done correctly, it can prevent crashes of properly written applications without impairing functionality.

    5. Re:Swap is expected, so without it, you crash. by Anonymous Coward · · Score: 0

      Isn't that what was said? "the memory hog crashes as a result" refers to the "highest memory using process." That's why it's usually Firefox.

    6. Re:Swap is expected, so without it, you crash. by dkf · · Score: 1

      A well-tweaked system still has swap (in nontrivial amounts), but rarely uses it.

      Not necessarily. Contrast with a supercomputer (which, trust me, is very well-tweaked indeed) which is typically run swapless. Of course, they're also adjusted to normally run at most one application at a time per CPU, and they will have limits set. They also usually work with large enough datasets that having lots of buffer cache doesn't help.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    7. Re:Swap is expected, so without it, you crash. by Khopesh · · Score: 1

      First, we were discussing "modern operating systems" which I took to mean your typical desktop systems from this millennium rather than things like crays and even clusters.

      Second, I'm under the impression supercomputers do not multi-task, so there would never be anything to swap in the first place (or if there were, it would be hand-written by the specific app.

      --
      Use my userscript to add story images to Slashdot. There's no going back.
    8. Re:Swap is expected, so without it, you crash. by nprz · · Score: 1

      No, it is slightly different.
      GP is saying that the kernel kills the process.
      GGP is saying that the application crashes because it can't allocate memory.

      The kernel can kill the process when memory is just slow, but not completely empty and I think that is evil (it may kill an application I need to run in order to let another application get memory). I only saw this with RHEL5, and am not certain how old this feature is.

    9. Re:Swap is expected, so without it, you crash. by ion.simon.c · · Score: 1

      First, we were discussing "modern operating systems" which I took to mean your typical desktop systems from this millennium rather than things like crays and even clusters.

      <pedant_mode=on>
      Rest assured. The OS's on modern supercomputers are *very* modern, indeed.

    10. Re:Swap is expected, so without it, you crash. by joemck · · Score: 1

      I succeeded in turning off swap entirely on XP Home (SP1) on my last computer, which had 1 GB of RAM. It lets you do it, and it DOESN'T make the whole computer crash. When I ran out of memory, the allocate functions simply failed. Most apps pop up a simple "Out of memory" error, a few crash. The downside is that you can't open tons of apps or huge files (unless a program uses MapViewOfFile like it really should, but few do). The other downside is that it doesn't actually help performance very much. However, I DO suggest turning swap off on WinXP if you run fullscreen stuff alot and have enough RAM. Windows seems to see the Start menu, taskbar and system tray stuff as not-recently-used, and swaps them out; hence the big freakout when you leave fullscreen mode. (The real WTF is that the primary UI stuff isn't marked as sticky!)

    11. Re:Swap is expected, so without it, you crash. by Anonymous Coward · · Score: 0

      Exists on RH EL4.

      Was working with a company that had the driver for an I/O card go out of control and consume all memory (and any the system would release to it). Which took out the local DB on the machine, which wouldn't have been so bad, but the DB helped feed/control the web GUI that allowed remote access and administration of the system (they had closed all ssh access as a "security hole").

      Took a day to get a tech on-site to log into a console, fix a config file and reboot a box.

  37. Virtual Memory v Paging by clarkn0va · · Score: 5, Informative

    thinks "Virtual Memory" is the same thing as paging...

    Mac Classic (OS 8 for sure) used the term "Virtual Memory" the same way Windows today uses "Page File" or unix uses "swap", so you can at least understand why some people might be confused by this.

    db

    --
    I am literally 3000 tokens away from the chaotic crossbow --Stephen
    1. Re:Virtual Memory v Paging by Anthony_Cargile · · Score: 0, Redundant

      Too bad he isn't using Mac OS Classic otherwise I would not recommend placing the computer in a box, mailing it to the OEM and never touching a computer again.

      (See a couple of posts above ;))

    2. Re:Virtual Memory v Paging by Anonymous Coward · · Score: 0

      In pre-OSX days if you had more than 1 Gig of RAM you couldn't turn VM on.

    3. Re:Virtual Memory v Paging by fuzzyfuzzyfungus · · Score: 1

      True, though I would argue that Mac OSes before X should not be trusted to do anything memory related properly.

    4. Re:Virtual Memory v Paging by Snaller · · Score: 1

      The majority have redefined what you think it means.

      --
      If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
    5. Re:Virtual Memory v Paging by JD-1027 · · Score: 1

      This was my issue completely when I first read this story.

      I grew up with Macs, so my first use of the term Virtual Memory was really swap. That never left me until this article and these comments.

      Now I've know for years that programs now all have their own "private memory" and can't see that of others, but some how my definition of virtual memory never changed until today!

      Sounded like a reasonable question to me (and maybe this is exactly what the submitter was thinking too). I'm really really glad this article has cleared something up for me.

      If the original submitter really thought virtual memory meant swap (as I did), the question is perfectly valid that he posed.

  38. Flamebait by bigredradio · · Score: 0, Flamebait

    Pst... You posted to ask Slashdot and mentioned you use Microsoft Vista? Flamebait

  39. Good Advice by dark_requiem · · Score: 3, Interesting

    Okay, so we've got most of the "you can run Vista with 4GB?!" jokes out of the way (hopefully). Here's my take on the situation.

    I have Vista x64 running in a machine with 8GB physical memory, and no page file. I can do this because I'm never running enough memory-hungry processes that I will exceed 8GB allocated memory. So, while the OS may be good at deciding what gets swapped to the hard disk, in my case, there's simply no need, as everything I'm running can be contained entirely within physical memory (and for the curious, I've been running like this for a year and a half, haven't run out of memory yet).

    However, if you don't have enough physical memory to store all the processes you might be running at once, then at some point the OS will need to swap to the hard drive, or it will simply run out of memory. I'm honestly not sure exactly how Vista handles things when it runs out of memory (never been a problem, never looked into it), but it wouldn't be good (probably BSoD, crash crash crash). I can tell you from personal experience that I regularly exceed 4GB memory usage (transcoding a DVD while playing a BluRay movie while ...). With your configuration, that's when you'd start to crash.

    Long story short, with just 4GB, I would leave the swap file as is. Really, you should only disable the swap file if you know based on careful observation that your memory usage never exceeds the size of your installed physical memory. If you're comfortable with the risks involved, and you know your system and usage habits well, then go for it. Otherwise, leave it be.

    1. Re:Good Advice by plasmacutter · · Score: 1

      I can tell you from personal experience that I regularly exceed 4GB memory usage (transcoding a DVD while playing a BluRay movie while ...)

      Ok now I know you're lying.

      Inserting a blu-ray into a vista machine causes the operating system to beam an MPAA operative into your house, and the gun he points to your head assures you will never ever transcode a dvd at the same time.

      --
      VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
    2. Re:Good Advice by obeythefist · · Score: 2, Interesting

      From what I've seen under WinXP, it will most likely crash some apps, panic slightly, throw the user overboard, then create a pagefile on some random disk and go back to sucking it's thumb.

      --
      I am government man, come from the government. The government has sent me. -- G.I.R.
    3. Re:Good Advice by Anonymous Coward · · Score: 0

      If a process requests memory that is not available, the OS will return an error. The process can catch that error and deal with it or it can terminate by performing, as Windows would show to a user, an "illegal operation" and it would be terminated. No BSoD.

  40. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 1

    system requirements check it out seems that premium business and ultimate both support 1gig and the other support 512 so wtf are you smoking? Of course I would recommend that you use more than that but it still will run which debunks the OP.

  41. Also don't forget to... by DigitalisAkujin · · Score: 1

    split the page file in windows across multiple hard disks to create a fake RAID effect. And if one of those drives is a RAID array then all the better ;)

    1. Re:Also don't forget to... by maxume · · Score: 2, Informative

      Ram is cheap. If you are swapping, buy more ram.

      Computers are cheap. If adding more ram doesn't fix the swapping on your current computer, buy a new computer that can use more ram.

      --
      Nerd rage is the funniest rage.
  42. Re:Vista reserves 1 GB by clarkn0va · · Score: 2, Informative

    Vista reserves 1 GB to itself, so your system will only ever have 3 GB available for processes.

    Not exactly. 32-bit OSes won't normally report more than about 3.2 GiB of system RAM, as a 32-bit OS can only address 4 GiB (PAE/himem aside), and the upper addresses are reserved for hardware.

    64-bit OSes (even Vista) will use and report RAM to much higher upper limits.

    Or something like that.

    --
    I am literally 3000 tokens away from the chaotic crossbow --Stephen
  43. The shortest answer to the question is by Anonymous Coward · · Score: 0

    IBM: Z/OS Z/VM

    Cordially,
    Kilgore Trout

  44. Virtual memory != Swapping by mileshigh · · Score: 1

    Swapping is a separate issue. You can virtualize memory with or without a swap file. Why? For starters, memory mapping gets rid of the entire problem of memory fragmentation at the system level. The list goes on from there, but eliminating fragmentation is huge. Anyone who's ever written or used a non-mapped OS will tell you in no uncertain terms why they suck!

  45. Re:Vista reserves 1 GB by Daniel+Weis · · Score: 2, Informative

    Wrong. I routinely run my laptop in this configuration. No issues.

  46. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    That's not true at all, it requires 700 Meg for the system and 300 meg for addition extras.

  47. Re:Vista reserves 1 GB by d3vi1 · · Score: 5, Informative

    I think he is referring to the userspace/kernelspace split in Windows NT. On 32bit Windows XP, by default, the userspace (ring3) will have at most 2 GB of the physical RAM, and the kernel space would get the rest (some of it paged and some of it not). On systems with more than 3G of RAM (a lot by 2002 standards), it was kinda pointless to reserve that much for the kernel space, so they added a boot.ini flag that changed the split to _AT_MOST_ 3GBytes for the userspace and the rest for kernel space.
    In Vista the split for 3G/1G of RAM is default. Actually on a system with 4G of RAM running in 32bit mode, you can't use all of them even if you try (in Windows XP), because right under the 4G limit you would have the PCI memory address mappings, that can be as large as 512M for a common video card with half a gig of RAM. Add to that the RAID controllers and the other hardware, and you have about 800megs of RAM unused because they can't be addressed, as their address-space is used by the installed devices.
    I think that http://support.microsoft.com/kb/823440/ and http://support.microsoft.com/kb/171793/ should describe what I'm talking about pretty clearly.

    --
    UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever ones.
  48. just recalling how this works by fermion · · Score: 3, Informative
    In college we ran the ATT Unix PC for a year or so. Apple also used this memory scheme. IIRC, the physical memory is first used for the kernel and system processes. How every much these processes take, that memory becomes more or less unavailable for the user. In your case, since you have 4GB physical, and 2GB used, this may mean that Vista is using 2GB for the system, if all memory is used.

    What is left over is the physical memory needed by the system. It seems like the OS preferred a fixed amount of memory, so it would just set up fixed space on the hard disk. So, even if all you have a 1 MB of available memory, the system would set up say 10MB, and that is what would be used. The pages that are being used will be stored in the physical ram, while everything would be stored on the HD.

    If page management is working correctly, this should be transparent to the user. The management software or hardware will predict what pages were needed, and transfer those page to ram. One issue we I had was available memory was not hard disk plus physical available ram, but was limited by the available hard disk space.

    So, it seems to me that virtual paged memory is still useful because with multiple applications loaded, memory can be a mess, and big fast hard drives it should not be an issue. I don't how Vista works, but it seems that *nix works very hard to insure that the pages that are needed are loaded to physical memory, and page faults do not occur. In this case, where virtual memory equals available physical memory, it would seem that since only physical memory is being used, there would be no performance hit from virtual memory. it is only there in case an application is run that need more memory. It is nice that we do not get those pesky memory errors we got in the very old days.

    --
    "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
  49. Agreed by Khopesh · · Score: 4, Interesting

    Linux kernel maintainer Andrew Morton sets his swappiness to 100 (page as much physical memory as you can, the opposite of this Ask-Slashdot's desires), which he justified in an interview (see above link) by saying:

    My point is that decreasing the tendency of the kernel to swap stuff out is wrong. You really don't want hundreds of megabytes of BloatyApp's untouched memory floating about in the machine. Get it out on the disk, use the memory for something useful.

    Of course, there's another view, also presented at the above kerneltrap article: If you swap everything, you'll have a very long wait when returning to something you haven't touched in a while.

    If you have limited resources, milk the resources you have plenty of; workstations should have high swappiness while laptops, who suffer in disk speed, disk capacity, and power, are probably better suited with lower swappiness. Don't go crazy, though ... swappiness = 0 is the same as running swapoff -a and will crash your programs when they need more memory than is available (as the kernel isn't written for a system without swap).

    --
    Use my userscript to add story images to Slashdot. There's no going back.
    1. Re:Agreed by amliebsch · · Score: 1

      Of course, there's another view, also presented at the above kerneltrap article: If you swap everything, you'll have a very long wait when returning to something you haven't touched in a while.

      But this should only be true if it was paged to disk and you actually did need that RAM for something. If it gets paged to disk but the RAM is never used for something else then there shouldn't be any performance hit at all. It might be more productive (especially if your computing is unpredictable) to stay very swappy but decrease the amount of pre-emptive disk caching so that the RAM is less likely to be used for some other purpose.

      --
      If you don't know where you are going, you will wind up somewhere else.
    2. Re:Agreed by Anonymous Coward · · Score: 0

      "Get it out on the disk, use the memory for something useful."

      Right - but the underlying assumption there is that there is something useful for that ram to be used for in the first place.

      In many cases, there just isn't.

    3. Re:Agreed by Mprx · · Score: 1

      Swappiness 0 is not the same as no swap. It will still swap if it really needs to, and you won't get annoying delays when things were swapped out unnecessarily.

    4. Re:Agreed by Anonymous Coward · · Score: 0

      That's not true, I run swappiness at 0 and have never had that happen. My swap file is actually still irritatingly busy (w/512mb of ram).

    5. Re:Agreed by dgatwood · · Score: 1

      Actually, no, it isn't necessarily making that assumption. If your VM system uses a reasonable architecture that allows you to easily associate a physical memory page with every process that is sharing it (without the need to laboriously walk through thousands of page tables), you should be able to provisionally page it out to disk without inducing a substantial performance hit.

      What you do is mark the page as "clean" and "read-only" in the process's page table. If that application reads from the page after this happens, no problem. It is reading from RAM, so it is instantly available. If it tries to write, the write instruction traps into the kernel, which marks the page as "dirty", backs up the process's program counter by one instruction (if needed, depending on the architecture), and lets the process execute that instruction again, so the application takes a very small performance hit (a trap penalty), but otherwise is unaffected.

      If, by contrast, another application needs a page and the owning application has not written to that page recently, because the page is marked as "clean" and purgeable, the scheduler must ensure that the victim process is not running, but beyond that limitation, the victim page can be unceremoniously yanked from the victim process's address space and given to the other process without having to write its contents out to disk (because it is already there). Essentially, this means treating data more like most OSes treat application code or memory-mapped file data (both of which can be safely discarded without paging it out to disk because the data can be reread from disk when needed).

      By lazily paging not-recently-used pages to disk before they are actually needed, assuming that you don't do so much I/O that you slow down other necessary work, you can significantly reduce the performance hit that would otherwise be associated with paging, at least in theory. The hard part, of course, is setting appropriate limits for such behavior so that it doesn't cause significant delays in other I/O that might potentially be time-critical. It is -not- a fundamentally bad idea.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    6. Re:Agreed by Carnildo · · Score: 1

      That's not true, I run swappiness at 0 and have never had that happen. My swap file is actually still irritatingly busy (w/512mb of ram).

      Try increasing swappiness a bit. Your system is far more responsive with a little bit of RAM available for caching. In my experience, you want at least 5MB for a console-only system, 25MB for an XFCE-based GUI, and 75MB for a KDE-based GUI. I don't know what Gnome wants.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    7. Re:Agreed by Rary · · Score: 2, Insightful

      You really don't want hundreds of megabytes of BloatyApp's untouched memory floating about in the machine. Get it out on the disk, use the memory for something useful.

      That's the part I've never understood, and I suspect the article submitter is having the same problem I have with this.

      You see, if you've got a ton of physical RAM, then the assumption is that much of it is already just sitting there unused. If you had "something useful" that needed to be done, there's plenty of memory available in which to do it. So why swap out "BloatyApp's untouched memory"? This just makes it so that even more memory is going to waste?

      --

      "You cannot simultaneously prevent and prepare for war." -- Albert Einstein

    8. Re:Agreed by PitaBred · · Score: 2, Informative

      Don't forget laptops. I get better battery performance and system performance with a lower swappiness, it doesn't start the drive up as often. I use 20 to good effect (especially with 4GB of RAM)

    9. Re:Agreed by Anonymous Coward · · Score: 0

      Of course, there's another view, also presented at the above kerneltrap article: If you swap everything, you'll have a very long wait when returning to something you haven't touched in a while.

      yep, this is exactly why I turned off swap in XP. It's very annoying to go do something in another app and leave the browser in the background and then long delay (not long, but why wait at all) when I want to browse again. I got 2GB and mostly max usage at 1.5GB whether it's the playing newest game or using Photoshop.

    10. Re:Agreed by Rich0 · · Score: 1

      You see, if you've got a ton of physical RAM, then the assumption is that much of it is already just sitting there unused.

      If that is the case, then you wasted money by buying too much RAM. You should have spent more of it on your CPU or whatever else is rate-limiting.

      I love posts by folks who say "just buy more RAM." Sure, and while you're at it buy a 16-processor mainframe to type email on - you won't have any performance issues of any kind. However, the whole point of a well-written OS is that it allows you to do work on a $500 machine that a lesser OS would require a $1000 machine for. If I wanted to go out and spend $50k on a desktop I'd run Vista. :)

      If I were to buy more RAM for my PC I'd have to go without something else. So, I make the most efficient choices of how to spend my money, and then maximize the benefit of the resources I have available. Linux runs most efficiently with at least moderate use of swap.

      The meaningful benchmark isn't performance, but performance per dollar of hardware. Any computer can be made faster with unlimited budget.

    11. Re:Agreed by pla · · Score: 1

      swappiness = 0 is the same as running swapoff -a and will crash your programs when they need more memory than is available (as the kernel isn't written for a system without swap).

      I run several linux machines with swap turned off, as well as several XP boxes using a pagefile on a RAMDisk (if you turn paging "off" in XP, it makes a 64MB pagefile in the Windows directory without asking permission) because I believe the same thing as the FP author - You simply don't need swap anymore on a machine with enough memory.

      And you know, I have yet to have a machine (of either OS) crash because of it. I don't get anomalous errors, I don't get bluescreens or kernel panics, I don't get thrashing as programs fight over who gets to use the available RAM.

      Yeah, feel free to call me six kinds of idiot, but it makes Explorer much more responsive. Linux doesn't benefit quite so much because it doesn't insist on flogging swap several times a second when it has nothing to page out, but particularly with slow disks (ie, laptops), it makes a noticeable improvement.

    12. Re:Agreed by mikerjohnson · · Score: 1

      I think Andrew Morton's suggestion might work well for his situation, but it definitely does not work best for mine. I keep the same 4 applications open for weeks and sometimes months at a time. Firefox, konsole, jedit and an rdp session to a windows vm running on the same box. With swappiness at anything higher than 60, there is a few seconds of delay when I switch windows - this drives me crazy. I found that for my situation, swappiness=10 was the best compromise. Are you sure that swappiness=0 completely disables swap? I'll bet the OS will still use swap if it runs out of RAM.

    13. Re:Agreed by Rary · · Score: 1

      If that is the case, then you wasted money by buying too much RAM. You should have spent more of it on your CPU or whatever else is rate-limiting.

      But RAM is now the cheapest component in a computer, so it's worth throwing in a few extra dollars to have plenty of RAM, and doing so won't actually require cutting any costs in another area.

      Regardless, the question was never about "performance per dollar of hardware". The question was based on a system that has already been purchased, so cost is a thing of the past. If I have enough RAM to do all of the useful things that I need to do, why does it make any sense at all to free up more RAM by swapping to disk?

      --

      "You cannot simultaneously prevent and prepare for war." -- Albert Einstein

    14. Re:Agreed by Khopesh · · Score: 1

      I used to think that disabling swap was a good idea on my laptop, but then I figured out why mozilla kept crashing; the system was out of memory. I've never lowered swappiness below 10, so my "swappiness = 0" statement was merely drawing conclusions from Andrew Morton's later comment of "I'm gonna stick my fingers in my ears and sing 'la la la' until people tell me 'I set swappiness to zero and it didn't do what I wanted it to do'."

      Morton's comments and some lengthy consideration have put me along the path of only tweaking swappiness in minute amounts; the more multi-tasking you do, the more swap becomes useful. Yes, it will take a little longer to switch to a window you've left alone for a while, but operations in the foreground will be considerably faster. Low swappiness (or no swap) is great if you don't do much multi-tasking.

      And you never have "enough" memory. The more you have, the better applications perform. Swap enables you to have more memory for your active processes. Lack of swap gives all processes the same priority.

      --
      Use my userscript to add story images to Slashdot. There's no going back.
    15. Re:Agreed by Rich0 · · Score: 1

      I still advocate swap when you have tons of RAM so that RAM can be used for disk cache. Unless, of course, your RAM is larger than your disk-based storage (in which case you don't need any more cache). :)

      If you are having trouble with swapping I'd adjust your swappiness accordingly. (Assuming you're using a progressive OS.)

    16. Re:Agreed by Anonymous Coward · · Score: 0

      That isn't the kernel's fault. Programs that can't handle OOM crash when they run out of memory. Or are you referring to the old OOM killer?

    17. Re:Agreed by Sxooter · · Score: 1

      No, swappiness=0 is NOT the same as running with swapoff -a. The formula for swap tendency is:

      tendency = mapped_ratio / 2 + distress + vm_swappiness

      As you can see, it's an additive factor, not multiplicative, so no, it doesn't turn off swapping, just discourages it.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
  50. Re:I don't know about Vista's paging implementatio by darrenkopp · · Score: 1

    Concerning yourself too much with the numbers only can be a bad thing.

    stop attacking my poor numbers! what did they ever do to you?

  51. Re:Vista reserves 1 GB by hezekiah957 · · Score: 2, Informative

    Guess what. I AM running Vista on such a setup. Your move, AC.

  52. Multics by neongenesis · · Score: 4, Insightful

    One word: Multics. Way too far ahead of its time. Those who forget history will have to try to re-invent it. Badly.

    1. Re:Multics by debrain · · Score: 2, Informative

      Those who forget history will have to try to re-invent it. Badly.

      I believe that is an insightful combination of two quotes:

      - Those who forget history are doomed to repeat it. (alt. George Santayana: "Those
      who cannot remember the past are condemned to repeat it.")

      - "Those who don't understand UNIX are condemned to reinvent it, poorly." Henry Spencer

  53. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Windows splits the 32-bit process address space in half; 2GB for kernel-mode and 2GB for user-mode. There is a switch to change this to 1GB kernel-mode and 3GB user-mode. This is probably where the "reserves 1 GB for itself" myth comes from. Obviously we are talking about virtual memory here, so there is no hard physical memory requirement of 1GB. At some point you are going to run out of physical memory (512MB? 256MB? 128MB?), but I suspect 1GB would be sufficient for many uses.

  54. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Sister's laptop running Vista Home Basic came w/ 512 MB RAM installed, integrated graphics sucking 64 MB of it, so Vista had 448 MB to run the rest of the system. And before anybody asks, it was purchased new and it came this way.

    Installed another 512 MB stick, so 1GB installed. Graphics auto bumped itself(can't find BIOS option to tell it otherwise, and seems to be before the OS comes up) up to 128 MB, so it runs with 896 MB of RAM.

    Another "I've got less than 1 GB installed" quote.

  55. good night slashdot. by Poindexter · · Score: 0, Flamebait

    And with this post I do thee unsubscribe from my RSS reader. Goodnight Slashdot, it was fun but your content has become moronic and useless.

    --
    Poindexter
  56. Obviously. by castorvx · · Score: 0, Offtopic
  57. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    I'm sure what he meant to say was 1GB of the virtual 4GB address space in 32-bit versions of the OS are reserved by the kernel (which is "Vista" I guess, as well as any kernel mode device drivers that are loaded) and cannot be used for user-mode allocations. This doesn't mean anything about your physical memory however.

    In some situations this split may be 2GB / 2GB.

  58. Re: the bend but don't break philosophy by Anonymous Coward · · Score: 0

    One very important reason to use virtual memory is to bend but not break. Suppose you have an application that suddenly starts using more memory than you expected. Before you realize it you're out of RAM, and some other completely unrelated application crashes because it was unfortunate enough to try to allocate memory.

    This can be avoided if you're using swap, because the system slows down. This lets you choose to kill or suspend the applications of your choice rather than letting the OS arbitrarily choose by letting all the applications run out of memory.

    Example: If you're using a 4GB RAM + 2GB page file and you're able to sustain 3.0Gbit/sec transfer speeds to your SATA drive (highly unlikely), then you'll have at least 8*2e9/3e9 = 5.3 seconds to respond to an out memory condition before you hit the 6GB wall and applications start crashing. In the real world you'll have a lot more time to react.

  59. Re:Virtual Memory v Paging He must be returned by davidsyes · · Score: 0

    to the Collective. All units are directed to unify in the task of supplying a Vinculum, um Mac to the lost dro.. umm, Borg.

    (Is there a difference in being ASSIMIlated into the Mac and being assIMMOlated in the ms pc, and EMUlated by the Linuces?)

    --
    Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
  60. Because no one needs more than 640k by JBG667 · · Score: 1

    of physical memory.

    --
    There are 10 kinds of people in the world > > Those who understand binary and those who don't
  61. Re:Vista reserves 1 GB by Colonel+Korn · · Score: 1

    At my local BestBuy there are a half dozen 1 gig laptops running Vista, and they don't explode when you run a program on them. I wouldn't choose to buy one without the intention to upgrade to more memory, but they do work, and for very basic use you don't even feel the lack of memory.

    --
    "I zero-index my hamsters" - Willtor (147206)
  62. Test results, anyone? by Scrith · · Score: 1

    The conjecture here is interesting, but this question can be answered better by just posting a link to some test results (comparing performance in Windows with and without virtual memory enabled). Does anybody have a useful link to such a comparison?

  63. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Wrong. I routinely run my laptop in this configuration. No issues.

    Ha ha. This comment reminds me of the bumper sticker/t-shirt "No money, no kids, no job, no worries, RETIRED". How about "No money, no eye candy, no free time, no RAM, VISTA".

    Seriously, I ran Vista for a couple months out of morbid curiosity. I turned off eye candy and /all/ the other "performance vs appearance" tweaks and left the page file intact, and just booting to the desktop tied up 800+ MB of RAM. How you might get away with that configuration and no page file is a mystery to me. Why you would even try is another question altogether.

    Yeah, I've seen XP run on 64 megs of RAM too. And run. And run. And run......

    There's a reason MS is in court over the "Vista Capable" program. Vista on 1 gig? Maybe. Vista on 1 gig with no page file? kill me. kill me. kill me...

  64. Re:Memory exists to be used Ah, in RAM by davidsyes · · Score: 1

    Well, let's very early start the Salacious Santa jingles...

    "Memory exists to be used. If memory is not in use, you are wasting it. The reality is that your system will operate with
    higher performance if unused data is paged out of RAM to disk and the newly freed memory is used for additional disk caching. Vista's memory manager is actually reasonably smart and will only page data out to disk when it really won't be used, or you experience an actual low-memory condition."

    Makes me think:

    Bodies exist to be used. If orifices are not in use, you are wasting them. The sensuality is that your sys stem will operate with higher performance if unused attach points are paged out for RAMMing to di*k and the newly recalled memories used for additional di*k THRASHING.....

    Oh, wait, i'm running out of anal-orgies for comparison...

    --
    Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
  65. Because it's Vista by kevind23 · · Score: 1

    I have 3GB of RAM and my swap has never been touched, in Linux at least.

    1. Re:Because it's Vista by Tony+Hoyle · · Score: 2, Informative

      4gb on OSX here and I've got 0 bytes in swap even after having both Wow and firefox up for an hour or two.

      Windows is very agressive in what it puts into swap.. if you come to a machine after it's been idle for a few hours it runs like a dog while it swaps everything back.. that's a royal pain at work where we're doing database work - if mssql gets paged out it takes a *long* time to recover to a running state. I tend to issue a create database and go and make my morning cup of tea.

    2. Re:Because it's Vista by Rick+BigNail · · Score: 1

      I assume Windows Server would work better.

      No? :)

  66. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Not only does it run with 1GB, it runs well, at least it did until I installed my bloatware anti-virus.

  67. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Dang. Disappearing html tags killed my Simpsons reference. [hic] kill me. [hic] kill me. [hic] kill me.

  68. Let's get pedantic! by nightfire-unique · · Score: 1

    Virtual memory refers to the entire hunk of addressable space, which may reside in a number of places (often concurrently) - primarily main ram, on-chip cache, or swap.

    All modern end-user systems use virtual memory/pagetable to abstract program addresses from system ram. So a better question is "Why use swap on modern systems?"

    And the answer is easy: because you have to (if you have insufficient ram) or because you just haven't turned it off yet.

    There is one exception; a well designed VM can improve performance by paging out inactive data, even if you have "enough" ram. Paging out inactive data frees up more physical memory, allowing it to be used as disk cache. It doesn't make sense to keep (for example) system boot code or infrequently used daemons in memory when that ram is better used as disk cache while processing archives, browser cache, etc.

    --
    A government is a body of people notably ungoverned - AC
  69. Some advantages by pavon · · Score: 4, Informative

    That page mostly talks about what virtual memory is and doesn't directly list why it is an improvement.

    Some folks have already mentioned the fact that it eliminates memory fragmentation, and that it allows mapping of files and hardware into memory without dedicating (wasting) part of the address space to those uses.

    Another reason is that you can have 2^64 bytes of total system memory, even if the individual applications are 32-bit, and can only address 2^32 bytes of memory. Since the 32-bit applications are presented a virtual address space, it doesn't matter if their pages are located above the 32-bit boundary.

    It means that per-process memory protection is enforced by the CPU paging table. Without virtual memory you would have to reimplement something like it just for memory protection.

    It means that the linker/loader don't have to patch the executable with modified address locations when it is loaded into memory.

    The above two reasons have the corollary that libraries can be shared in memory much more easily.

    And that's just off the top of my head. Virtual memory is a very, very useful thing.

    1. Re:Some advantages by ADRA · · Score: 1

      Damn, I wish I had moderation because this is pretty much -the- answer to the poster's question. That being said, the poster seems to have some basic misconceptions about how their system actually works. I'd suggest a modern book on OS design to remedy their ignorance.

      --
      Bye!
    2. Re:Some advantages by sjf · · Score: 1

      Agree with everything the parent says.

      I'd like to add that virtual memory permits interprocess sharing besides shared libraries - it's not the only way to implement it, but Unices and Windowses would look very different without it. And, don't forget that the kernel relies on a special case of memory sharing...in some operating systems the kernel is always resident in the memory map of the currently executing process, albeit protected. Which is a simplification for IOCTLs and SYSCALLs, but a complication for interrupt processing.

  70. No he doesn't by fm6 · · Score: 3, Informative

    You must be confused about virtual vs. physical memory. In modern processors, there is no penalty for using virtual memory, all translation from virtual to physical address space is done internal to the processor and you won't notice the difference.

    Huh? That's totally wrong. If it were true, you wouldn't need any RAM.

    It's true that address translation is hard-wired in modern processors. But that just means that figuring out where the data is is as fast as for data that's already in RAM. Actually reading or writing it is only as fast as the media it's stored on. So if you have a lot of big applications running, and there isn't enough RAM for them all to be in physical memory at once, your system "thrashes", as data migrates back and forth between the two media. That's why adding RAM is very often the best way to speed up a slow system, especially if you're running Microsoft's latest bloatware. Defragging the swap disk can also be helpful.

    To answer the original question: actually, you often don't need any virtual memory. But sometimes you do. Disk space is cheap, so it makes sense to allocate a decent amount of virtual memory and just not worry about whether it's absolute necessary.

    1. Re:No he doesn't by DragonWriter · · Score: 2, Informative

      That's why adding RAM is very often the best way to speed up a slow system, especially if you're running Microsoft's latest bloatware.

      Not running Microsoft's latest bloatware is probably the best way to speed up a slow system if you are currently doing that.

    2. Re:No he doesn't by lgw · · Score: 3, Informative

      Note: virtual memory is not necessarily on disk. "Virtual" memory just refers to the fact that the memory address that the application uses isn't the physical memory address (and in fact there might not *be* a physical memory address this instant), nothing more.

      Defragging the swap disk can also be helpful.

      I think this is never helpful. Pagefile reads are basically random for the first block being paged in for a given app, and modern hard drives mostly claim no seek latency as long as you have 1 read queued (of course, that claim might be BS).

      For Windows, the OS doesn't *create* framgenation of the page file over time. If there is a large contiguous space available when the pagefile is created (and there usually is, right after OS installation), Windows will use that block, and it will never fragment. Also, if your pagefile was fragmented at creation, defragging by itself won't fix it, as it doesn't move any pagefile blocks.

      I hope the same thing is true in Linux - if defragging your swap drive helps, someone has done something very wrong to begin with.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    3. Re:No he doesn't by fm6 · · Score: 1

      Gee, that's an original thought.

      Unfortunately, not everybody has that option.

    4. Re:No he doesn't by fm6 · · Score: 1

      Note: virtual memory is not necessarily on disk. "Virtual" memory just refers to the fact that the memory address that the application uses isn't the physical memory address (and in fact there might not *be* a physical memory address this instant), nothing more.

      What you say is strictly true, but to quote my Critical Thinking professor, if something is "strictly true", the person that's saying it is often telling a lie.

      If a program is entirely in RAM, and part of it is read, then yes, you've just "used virtual memory" without going to disk. So what? Virtual memory wasn't invented just because computer architects thought existing address schemes weren't clever enough. It was invented so you could use disk space to emulate extra RAM at the cost of a loss of performance. Perhaps you think the question should be phrased "why do we allocate disk to use with virtual memory" instead of "why do we use virtual memory". But the latter form of the question is a perfectly clear abbreviation, except to somebody who's more interested in picking semantic nits than actually answering the question.

      As for your fragmentation statement: you're wrong. You'd be right if swapped out data stayed swapped out until the very moment it was access. But that would be very slow. The OS tries to anticipate what you're going to need, and that often means a long series of sequential reads.

    5. Re:No he doesn't by MaskedSlacker · · Score: 1

      I'm pretty sure that they have the option. The consequences might just be unacceptable. Then again, who wants Virtual Studio anyway?

    6. Re:No he doesn't by fm6 · · Score: 1

      By your definition, everybody has the option of not eating, if they don't mind not starving to death. (Why is this thread full of silly semantic quibbles?)

    7. Re:No he doesn't by Rary · · Score: 1

      Why is this thread full of silly semantic quibbles?

      Because it's on Slashdot.

      To put it another way, you must be new here. :)

      --

      "You cannot simultaneously prevent and prepare for war." -- Albert Einstein

    8. Re:No he doesn't by twizmer · · Score: 1

      "Virtual memory" in the sense of doing address translation was _not_ created for on-demand paging: it was created because trying to do multitasking in a single address space sucks. It is _much_ nicer to let each process/task/address space/whatever perceive its own address space, allowing applications to always get linked where they want without stepping on other apps, easily have contiguous address ranges, etc.

      Paging is basically just a freebie after you have virtual addressing working.

      Now, the poster obviously was using "Virtual Memory" to mean "pagefile", because that's how Windows uses the term. But if OP misunderstood the usage, then his response was correct, just inapplicable.

    9. Re:No he doesn't by Free+the+Cowards · · Score: 1

      So what? Virtual memory wasn't invented just because computer architects thought existing address schemes weren't clever enough. It was invented so you could use disk space to emulate extra RAM at the cost of a loss of performance.

      Does it matter why it was invented? Fact of the matter is that virtual memory is used for all sorts of things. Virtual memory gives you separate address spaces, is used for memory mapping files, creating shared memory regions, doing copy-on-write optimizations, and more. Swap is just one small piece of the puzzle.

      Yes, in the common vernacular, "virtual memory" is often synonymous with "swap", but when you're talking to a crowd of technical people then they're not going to automatically know what you mean with such a general term.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    10. Re:No he doesn't by Elrond,+Duke+of+URL · · Score: 1

      Virtual memory wasn't invented just because computer architects thought existing address schemes weren't clever enough. It was invented so you could use disk space to emulate extra RAM at the cost of a loss of performance. Perhaps you think the question should be phrased "why do we allocate disk to use with virtual memory" instead of "why do we use virtual memory". But the latter form of the question is a perfectly clear abbreviation, except to somebody who's more interested in picking semantic nits than actually answering the question.

      No... I'm pretty sure you've got that wrong. Virtual memory was developed specifically to solve the problems of memory allocation. Without virtual memory, every executable must be loaded to a specific place in memory and great care must be taken so they don't walk over each other. With virtual memory, every executable is compiled and linked to begin at address 0 (or some other arbitrary point) and continue from there. As far as the executable binaries are concerned, they own the entire memory space. It's the MMU which provides the virtual memory space and sorts all of this out.

      As an added benefit you also get the ability to page to disk and I'm sure this was realized and implemented post-haste, but the driving force was to solve allocation and linking problems on multi-tasking systems.

      --
      Elrond, Duke of URL
      "This is the most fun I've had without being drenched in the blood of my enemies!"-Sam&Max
    11. Re:No he doesn't by kasperd · · Score: 1

      I hope the same thing is true in Linux - if defragging your swap drive helps, someone has done something very wrong to begin with.

      A typical Linux system will use a swap partition, not a swap file. The swap partition has no structure, just a header indicating it is a swap partition, how large it is, and optionally a list of bad blocks. When the system boots, the kernel have the entire partition (except from the header) free for its usage as it sees fit. In other words one linear area of disk space. The actual data that goes there could easily end up being fragmented (I don't know those algorithms well enough to tell you how often that happens).

      If you were to actually use a swap file, the file itself has a header just like a swap partition. There just happens to be a file system underneath mapping the file to physical disk space in a way that isn't necessarily contiguous. If you were to defragment a Linux file system, it would be a file like any other. The vm system could either use the file system to do the mapping on each access to swap, or it could do it all in advance such that the physical locations of swap pages would be known from the time swap was activated. Each method have advantages and disadvantages. Obviously online defragmentation would get tricky if the vm system was going to remember where swap pages were located, but at least both are happening inside the kernel, so the file system and the vm could coordinate if you wanted to do online defragmentation of a file system with a swap file.

      Defragmentation has been something that you wouldn't typically do on Linux. The file systems were designed to not get very fragmented to begin with. But I think we'll soon see file systems for Linux that can do online defragmentation.

      --

      Do you care about the security of your wireless mouse?
    12. Re:No he doesn't by eta526 · · Score: 1
      Excuse me? Why is this being modded up? There is not a single correct assertion in the entire post.

      Virtual MEMORY is not-memory that appears to be memory, i.e. a hard disk page file.
      Virtual ADDRESSING is a memory address that appears to be what is used but is physically elsewhere in memory.

      Also, do you know how a hard drive works? There is always seek time in one of three types, relating to where the information to be read is located in relation to the current read head:
      1) Same cylinder, same sector, different platter. Very fast (for a disc) because the only change to be made is which head is reading, so no physical movement is necessary.
      2) Same cylinder, different sector. Not quite as fast because you have to wait for the platters to spin to get the correct sector under the read heads. Note it doesn't matter which platter because while they are spinning, the active head has already changed.
      3) Different cylinder. This requires movement of the read heads and is the slowest operation. Note it doesn't significantly matter what sector the data is located on if the heads have to move.

      Note I am not 100% familiar with the new orthogonal recording techniques, but I suspect those are even faster than changing read heads. Regardless, sequential data must still be located in close proximity to benefit.

      Regardless, seek latency on a disk is never zero, though if sequentially accessed data is stored physically near (same sector when possible, then same cylinder if not, then adjacent cylinder, then the closest available cylinder.) it is faster than if it is located randomly somewhere on the disk. Being defragmented necessarily means you adhere to these recommendations as much as possible as your data is contiguous. Being fragmented typically means your data is scattered across cylinders.
      It is true the pageFILE will never fragment, but the data within the file should be kept defragmented as it relates to a given program; data that is likely to be read sequentially should be kept together.

      Physical memory has no seek latency, so fragmentation there has no meaningful effect (unless you can save some cycles by skipping address table lookups to locate the next read/write location.)

  71. Can't hibernate by anomaly · · Score: 5, Interesting

    Windows makes me CRAZY about this. the OS is internally configured to use an LRU algorithm to aggressively page.

    ("Technical bastards" who question my use of paging and swap interchangeably in this post can send their flames to /dev/null \Device\Null or NUL depending on OS)

    What I found when disabling paging on an XP pro system with 2GB RAM is that the system performance is explosively faster without the disk IO.

    Even an *idle* XP pro system swaps - explaining the time it takes for the system to be responsive to your request to maximize a window you have not used in a while.

    I was thrilled to have a rocket-fast system again - until I tried to hibernate my laptop. Note that the hibernation file is unrelated to the swap/paging space.

    The machine consistently would blue screen when trying to hibernate if swap/paging was disabled. Enabling swap enabled the hibernation function again. Since reboots take *FOREVER* to reload all the crap that XP needs on an enterprise-connected system - systems mangement, anti-virus agent, software distribution tool, and the required ram-defragger which allows XP to "stand by" when you've got more than 1GB of RAM, plus IM, etc

    I reboot as infrequently as possible and consider "stand by" and "hibernate" required functions. As a result, I live with XP and paging enabled, and tolerate the blasted system "unpaging" apps that have been idle a short time.

    Poo!

    --
    But Herr Heisenberg, how does the electron know when I'm looking?
    1. Re:Can't hibernate by ZosX · · Score: 1

      Defrag ram? You mean create new free space in ram right? Generally that leads to everything that was in those addresses suddenly getting dumped to the page file. I never really saw the benefit in that.....

      Have you considered a super tiny paging file? You can go as low as 2 megs on a windows box...

    2. Re:Can't hibernate by sneakyimp · · Score: 1

      This is the first post in here which actually tries to answer the original question. I believe the answer is due to poor OS design. As far as I know, linux will much more effectively use nearly all of your RAM before it tries to swap anything out to disk. Not so with windows.

      I'm truly shocked at all the pedantic nit picking that is going on in this thread. It was a simple question and we know what he's asking.

    3. Re:Can't hibernate by Anonymous Coward · · Score: 0

      There is NOTHING from that KB link that says ANYTHING about "ram fragmentation".

      Not to mention that even IF ram could be fragmented, it has effectively zero access time, so hopping from fragment to fragment won't hurt anything. Also, it has been proven time and time again that "ram defrag" programs either 1) do nothing, 2) only slow down the computer or 3) slow down the computer and cause stability issues.

      Don't use them.

    4. Re:Can't hibernate by klapaucjusz · · Score: 1

      Windows [...] is internally configured to use an LRU algorithm to aggressively page.

      Are you sure about that? I was under the impression that it uses a working-set model with page stealing.

    5. Re:Can't hibernate by pipatron · · Score: 2, Funny

      send their flames to /dev/null \Device\Null or NUL depending on OS

      It's called NIL: on my Amiga, you insensitive clod!

      --
      c++; /* this makes c bigger but returns the old value */
    6. Re:Can't hibernate by ZosX · · Score: 4, Informative

      Uh. You do realize that block of ram are not written contiguously right? You won't find it any different on Linux or MacOS or any operating system for that matter. You also realize that the access time of RAM is effectively 0 right? Yeah, the AC was right. Nothing in the KB article about ram fragmentation. That program is also one of those create "free" ram programs that I despise so much. These kinds of utilities might be somewhat marginally useful on a very resource bound system, but I can hardly see the use for this crap. Even if RAM were to be somehow "defragmented" how could it possibly make it any faster? The bottleneck isn't in accessing the addresses. An OS keeps a running tab of what is stored where. As soon as it makes the request for the data its coming off of the RAM as fast as the FSB will let it pass through. The reason defragmenting is effective on hard drives is because the hard drive has a physical dimension where the heads take actual time to move to the desired location. In RAM there is no moving parts and hence, extremely low latency, which is measured in nanoseconds versus the milliseconds they use to measure latency in hard drives.

      I smell snake oil here. That is, unless you have some real science to back up the benefits of ram "defragmenting"

    7. Re:Can't hibernate by Antique+Geekmeister · · Score: 1

      A modern Linux kernel and OS try to use all your RAM to keep information paged in and available, rather than merely stored on disk. This is good from a performance view, as long as you consider RAM basically free to use (which it mostly is). This is sometimes a problem when you really _do_ have something trying to overwhelm your actual RAM, and makes the old tool of simply typing 'free' to report on programs with memory leaks rather useless until the program grows out of the bounds of physical RAM, at which point it's often too late to clean up the mess.

    8. Re:Can't hibernate by SpaceLifeForm · · Score: 1, Flamebait

      Yep. It really seems designed to wear out disk drives faster.
      When the drive fails sooner than expected, it helps Windows sales.

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    9. Re:Can't hibernate by mR.bRiGhTsId3 · · Score: 1

      Can you de-fragment ram? I thought the only problems you run into where internal fragmentation since everything is allocated in page sized blocks? I can't really see being able to transparently compress data stored across multiple pages transparently to a user program.

    10. Re:Can't hibernate by mR.bRiGhTsId3 · · Score: 1

      Its not necessarily bad design. The processes that have pages swapped out likely haven't run in a while (i.e. they likely won't run for a while longer). This free's up the physical ram for large unforseen memory allocations by running programs. In this way, the RAM can just be allocated, instead of your system grinding to a halt because 256MB need to be written to the disk to make room for something.

    11. Re:Can't hibernate by ZosX · · Score: 2, Informative

      Its all snake oil man. First of all nothing is even allocated directly to the physical ram. It all goes into the virtual memory pool IIRC. The best a program like this can do is make sure the blocks are contiguous, but I truly fail to see the benefit of that. If it ain't broke.....

    12. Re:Can't hibernate by ZosX · · Score: 2, Informative

      Also note the lack of benchmarks on the software in question's website. They only make vague references to what the program actually does and then they talk alot about all the bonus stuff it comes with (new task manager, etc). Snaaaaaaake oil.

    13. Re:Can't hibernate by drspliff · · Score: 3, Insightful

      You'd have thought after all this time they could've corrected one of the most annoying "features" which stops me using Windows for any amount of time? It certainly appears like after X amount of inactivity (whatever it may be classified as) stuff just gets swapped out even if you have enough physical memory!

      Considering the way I normally work is to have many applications open, perhaps an IDE, a handful of terminals, a web browser, e-mail client, then spend X amount of time with one application, then switch to another (test/deploy/whatever), then maybe check e-mail & web, by the time I get around to switching to my next task the previous applications have at least partially been swapped to disk.

      When I was using Windows at work, by the end of each day I was getting so incensed by it'd be a big hands in the air and muffled swearing whenever it happened, a total productivity killer.

      Lets just say I'm back in Linux & Solaris land now, I have almost the same set of applications open with no problems - and that's on top of running my testing environment on the same machine.

    14. Re:Can't hibernate by drsmithy · · Score: 1

      I believe the answer is due to poor OS design. As far as I know, linux will much more effectively use nearly all of your RAM before it tries to swap anything out to disk. Not so with windows.

      Windows will "pre-emptively" swap pages to disk so that memory can be freed up more quickly (ie: without having to swap), if necessary.

      Whether or not that is "bad design" depends on your objectives...

    15. Re:Can't hibernate by anomaly · · Score: 1

      Nothing in the article? What about the part that says:

      "Note It is still possible to experience a hibernation problem after you install this fix if the memory becomes highly fragmented"

      Without that RAM defragmenter, the PC bluescreens when hibernating. With it, it hibernates and un hibernates without issues.

      You're right. The fact that I presented facts combined with my experience must be completely irrelevant.

      Feel free to continue in your superstition about windows memory. That software must be complete crap, and the KB article must be completely wrong.....

      Got any science to back up *your* point of view?

      Anomaly

      --
      But Herr Heisenberg, how does the electron know when I'm looking?
    16. Re:Can't hibernate by Achromatic1978 · · Score: 1
      I disagree with the GP... I trust Mark Russinovich enough to go with his judgment on "you need -a- page file, just that there's no magic formula for how much -you- need".

      RAM fragmentation is generally snake oil, but is in any case intended not to allow 'better speed' for the obvious reasons you've mentioned, but to "attempt to make larger contiguous blocks of memory available to an app that requests it".

    17. Re:Can't hibernate by daveime · · Score: 3, Insightful

      When did Microsoft go into the disk drive business ?

      Go spread your anti-ms bs somewhere else please.

    18. Re:Can't hibernate by Anonymous Coward · · Score: 0

      Windows makes me CRAZY about this. the OS is internally configured to use an LRU algorithm to aggressively page. ...
      What I found when disabling paging on an XP pro system with 2GB RAM is that the system performance is explosively faster without the disk IO.

      So the VM in any OS is going to be tuned for what the authors believe to be the common cases, it's my opinion that the 90% coverage works really well, doesn't fail often and has a sort of blandness about it rather than really excelling at a handful of use cases it will be pretty average at just about everything. One of the variables to factor in is the perceived performance of certain things, if the VM uses all of the physical pages available and has to page them out to load a new app, then many people think that it's slower. So what you want is to have at least enough free spaces to start running a lot of the common apps that people run and then also aggressively keep as much memory in use as possible. One way to do this is to start paging out pages to disk but keep them in memory then when you need physical memory you can dump them quickly and re-use them.

      As with many things, the code that makes this decision doesn't have a whole ton of context and there are always pathological cases that will cause problems. When you know what the program does and how important it is to you and what you want done, you can almost always come up with a better paging strategy. The VM doesn't know what you're going to run next and in a lot of platforms it doesn't even have good heuristics to really tell the load of a process, is it I/O bound? Is it mostly idle with patches of work? Is it going to quickly consume a lot of memory and then give it all back? Is to going to consume a lot of memory and keep it?

      Also think about how big those page tables get with 6 or 8GB of RAM and little 4k pages.. Shit or even with the 2MB page option on Intel chips.

    19. Re:Can't hibernate by Anonymous Coward · · Score: 0

      Is there a way to tweak the paging in Windows XP?

      Would be nice to have it swap back bigger chunks of a program instead of 4k at a time....

    20. Re:Can't hibernate by qw0ntum · · Score: 1

      You're exactly right. RAM fragmentation will not ever hurt performance in any appreciable way on a modern system using virtual memory.

      In olden days, on systems with static memory allocation, fragmented memory would decrease your system's memory utilization by leaving chunks of "unused" memory between allocations. In turn, this would decrease the amount of data you could store in memory and thus increase your page fault frequency, which would cause a significant impact to system performance. However this isn't a real concern any more, thanks to dynamic memory allocation. Snake oil indeed; sounds like someone had made money on this concept years ago and is still trying to milk it for all it's worth.

      --
      'Every story, if continued long enough, ends in death.' --Ernest Hemingway
    21. Re:Can't hibernate by thebigmacd · · Score: 3, Informative

      There was never any implication that MS has anything to do with the disk drive business; SpaceLifeForm said sales of Windows would be helped.

      If the drive fails in 2 years instead of 5, the owner is likely going to go out and buy a new PC three years earlier than they need to, instead of getting the drive replaced; this generally means another sale of Windows.

    22. Re:Can't hibernate by Ostsol · · Score: 1

      At least the degree to which Linux swaps pages is configurable (though only during kernel compilation, I think?). The "average user" probably does not need the OS to swap quite as aggressively as Windows does. Due to my Kubuntu installation's increased responsiveness, I find it far superior to Windows for casual use (ie: web-browsing, video playback, etc. . .)

    23. Re:Can't hibernate by Anonymous Coward · · Score: 0

      When did Microsoft go into the disk drive business ?

      They're in a much better business than that. If a hard drive dies, a disk manufacturer might make a buck or two on its razor-thin margins for a replacement drive. However, since the user just lost his "recovery partition", he could very well have to run out and buy a retail copy of Windows if he needs to get his machine back up quickly. Microsoft, with its big fat margins, could net $50 or more from the same incident.

    24. Re:Can't hibernate by Just+Some+Guy · · Score: 4, Funny

      I have had good experience with Fast defrag freeware from http://www.amsn.ro/

      Ah, the joy of running closed-source system-level software of dubious necessity from a tiny shop in a Warsaw Pact country. Was it recommended by the new Nigerian friend that you're helping transfer money?

      --
      Dewey, what part of this looks like authorities should be involved?
    25. Re:Can't hibernate by myrdos2 · · Score: 1

      Why not put the pagefile on a RAM drive?

    26. Re:Can't hibernate by Allador · · Score: 1

      XP doesnt have a 'ram fragmentation problem'.

      XP has a bug whereby you (at one point in time) couldnt hibernate reliably if you had more than 1GB of ram.

      It was fixed with a patch and then in a service pack long ago.

      The solution to this was always to install the patch (prior to it being in the service pack), and never to install a 'ram defragmenter'.

    27. Re:Can't hibernate by aurispector · · Score: 2, Informative

      I thought the same thing when I saw the ".ro". Ram is so goddamn fast anymore I can't believe there's any benefit at all to "defragging" it. However, regarding paging the systems we use have design roots that date back decades. Back in the day, ram was prohibitively expensive and had to be treated like a valuable, limited resource and the OS was designed to deal with that fact. We now are stuck with paging systems that are archaic compared to the present state of RAM prices. The fact that we can often get away with turning off the entire paging system tells us something about this. Paging might still make sense in certain situations, but how many commonly used applications truly need several gigabytes of ram in order to function properly?

      --
      I have mod points. The reign of terror begins now.
    28. Re:Can't hibernate by Anonymous Coward · · Score: 1, Informative

      The designs of your CPU's cache and translation look-aside buffer are optimized for locality of reference. RAM is much slower than CPU cache, and TLB misses cause extra cycles wasted translating virtual addresses into physical ones. So, contiguous RAM is a Good Thing.

      Amiga OS 4.0 defragments RAM when the system is idle. Surely, this isn't simply snake oil.

    29. Re:Can't hibernate by Mr+Z · · Score: 1

      Perhaps you missed this text:

      Note: It is still possible to experience a hibernation problem after you install this fix if the memory becomes highly fragmented. The speed at which this problem manifests is dependent on the software that you run and your particular usage model.

      Sounds like there is a RAM fragmentation problem.

    30. Re:Can't hibernate by anomaly · · Score: 1

      Read the KB article.
      1. Installing the patch didn't fix the problem 100% of the time.

      2. Service Pack 2 reduces the frequency of the failures, but doesn't eliminate the problem.

      3. The KB article explicitly mentions fragmentation.

      4. In my experience, use of the ram defragmenter tool eliminates the hibernation issue.

      5. Windows is STUPID when it comes to seeing more than 1GB of RAM. Look into the gyrations required to to enable the PAE settings. Yikes!

      You are wrong.

      Respectfully,
      Anomaly

      --
      But Herr Heisenberg, how does the electron know when I'm looking?
    31. Re:Can't hibernate by Anonymous Coward · · Score: 1, Informative

      Actually, there is a significant delay while reading from RAM, if there wasn't we would not have a need for L1/L2 cache. When the CPU needs to access data that is not in cache it must ask the memory controller for it, and it is nowhere near as fast as the CPU. The good thing is, the CPU can ask the MCU to grab a large block of contiguous RAM at one time, wait for the MCU interrupt, and get a large chunk back in slightly longer time that say a single address.

      This is where memory fragmentation comes into play. If an an application needs to access a large number of variables at once, it can grab one large block from the MCU, but if they are scattered all over the place, each address must be fetched individually.

      Feel free to test this: create a RAM disk that can store a multi-gig database and do some heavy queries (full table scans) against it. There will be zero disk I/O but the CPU will spend 25-50% of it's time in an I/O wait state. Of course, windows tries to page everything, so it won't be quite as accurate, but you'll get the idea.

    32. Re:Can't hibernate by Homer1946 · · Score: 1

      I thought that Windows had a sort of dodgy design where it divided RAM essentially in two, so for 4 Gigs it divides into 2 Gigs for System (driver) use and 2 Gigs for general use which generally makes Windows use real memory less efficiently than other modern OSes.

      Am I wrong here?

    33. Re:Can't hibernate by spymagician · · Score: 1

      Set the kernel to load into RAM and it will effectively eliminate the symptoms you describe here. This will maintain a working pagefile, but the kernel will not load any of its processes into it. There are a few other tweaks that are simple and help make XP/Vista very responsive, one of which is changing how each application uses memory address space. Search for XP/Vista tweaks and keep an eye out for references to "Disable page file for Windows kernel" and you'll know you're on the right track.

    34. Re:Can't hibernate by Chris+Rhodes · · Score: 1

      Actually, RAM Defragmentation, as it were, happens when the OS has the pages mapped to all sorts of different physical memory sections. The more small sections of memory mapped to process space there are, the more virtual-to-physical translations the computer has to do, because the paged areas are discontinuous.
      This has to do with the CPU's translation lookaside buffers (TLB's - nothing to do with .net.) It does suck up some clock cycles. You can think of a TLB as cache memory on chip for the memory page to physical memory mapping.
      The only way to 'Defrag' it, is to drop your memory usage temporarily. E.g., reduce the number of processes, which should drop the usage of physical memory.
      As far as the windows swap files goes, I've seen systems with more than 1GB that end up needing swap because they use more than the available memory.
      I'm not 100% sure, but I think it is a myth that windows can only use some 3.5 GB in XP, I think that is a process limit, not an OS limit. But I'm not sure of that. I only have 3GB so I can't test it :)
      But the real problem with Windows is that it assumes that you will need swap at some point, and agressively spits your memory to disk on the assumption that you're about to need some physical memory. It also crosslinks the NTLDR file into the swap file too, funny.

    35. Re:Can't hibernate by Chris+Rhodes · · Score: 1

      Uh, "Ram Fragmentation", as it is, and should be.

    36. Re:Can't hibernate by Hadlock · · Score: 1

      Most people I know would rather go down to best buy and buy a new computer for $400 rather than crack open the case and figure out what part is the hard drive, and pay the neighbor's kid to transfer the tax files and pr0n to the new drive and install whatever OS they have back on there. Hell a new computer probably costs less than the parts and labor to replace a drive and recover all the useful files from the old drive. New computer = another MS license sold, which is probably $40 in MS's pocket.
       
      I don't think they PLANNED it that way, but the long way around says MS ultimately profits. That said I've never had a drive fail on me in.... 17 years? I guess I'm due. *knocks on wood*

      --
      moox. for a new generation.
    37. Re:Can't hibernate by plover · · Score: 1

      Defragmenting RAM in this way is pretty much pointless. That said, an individual program can more effectively use its RAM by using physical memory instead of swapping whenever possible. By keeping the frequently used memory to the fewest possible pages, it will swap less frequently. Microsoft's latest C++ compilers do this through a process called Profile Guided Optimization (PGO).

      First, they developed an optimizing scheme called Link Time Code Generation, which defers the actual generation and optimization of the code until all the modules have been parsed. This lets the optimizer "see" into every module all at once, and optimize away common stuff like nested references. (Very useful in Microsoft's Visual Studio land, where it's the default to put each new class into its own source file.) That gave some solid performance boosts.

      Now, with PGO, what you do is tell the compiler to instrument the code for a special trial run of your program. After compiling, you execute the code and walk through your most common usage scenario imaginable, then you exit. You don't click on every feature, you just try to exercise the bare bones functionality. When you're done, the instrumentation will have recorded the access patterns of the variables and memory, creating a profile of your code. Now, you go back and recompile your code, this time without the instrumentation, and you feed the profile to the linker. The linker looks at the profile and tries to cram all of the most-used variables into the minimum number of pages possible.

      The idea is that those pages of memory always stay busy due to how your users will likely run the program, so they never get swapped out, and the performance for that execution remains as fast as possible. The less-used functions will have to pay the swapping penalty, but that's the whole idea -- sacrifice the performance of the little-or-never used features for mainstream performance. It's damn clever.

      --
      John
    38. Re:Can't hibernate by Hal_Porter · · Score: 1

      I dunno, I think he should delete system32 to speed things up. Because Microsoft are fascists Vista will try to stop you with UAC prompts and meaningless warnings. If you persist though your machine will be faster than you ever dreamed of.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    39. Re:Can't hibernate by mR.bRiGhTsId3 · · Score: 1

      That does sound nifty. How does this stack up to the "HotSpot" optimizations that Java and .NET CLR do?

    40. Re:Can't hibernate by Mattsson · · Score: 1

      Defragmenting RAM was actually useful in some multitasking OS's in the 80's and early 90's.
      If I'm not remembering incorrectly, which might well be the case since it's been a while, it had to do with the fact that the CPU's didn't have memory mapping units, so there was no virtual memory-space.
      An application had to fit in a continuous memory block. If there was no block big enough for the application, the OS couldn't load it. Doing a defragmentation of the RAM would give you larger continuous memory blocks.
      Usually, though, this had to be done via reboot. =P

      --
      /.Mattsson - My native language is not English, so please don't whine over linguistic errors. (That's lame anyway...)
    41. Re:Can't hibernate by Spand · · Score: 1

      That does sound nifty. How does this stack up to the "HotSpot" optimizations that Java and .NET CLR do?

      Im pretty sure the HotSpot name in Java is due to the JIT compilation of "Hot" methods/code.
      Regarding the memory then most garbage collecting VMs will probably touch all the used (or even allocated) pages when performing a full garbage sweep so that will mean sucky performance if much of it is in swap. Garbage collecting VMs may gain some by the use of a compacting GC which removes fragmentation and thus keeps the number of allocated pages to a minimum. All in all, the VM will probably unswap all its pages at each GC but keep the number of pages allocated to a minimum.

    42. Re:Can't hibernate by Anonymous Coward · · Score: 0

      You're actually seeing fragmented RAM as unordered / non contiguous blocks of the same data. But if you think of it as a collection of mostly empty blocks (because for example parts of these blocks have been freed and others not), then you end up with a system using a lot more memory than it actually needs. Finally, you have more chance to quickly run out of physical RAM and need to rely on the *much slower* hard drive... just because these holes in the blocks can make a large part of your memory really inefficient.
      But I agree on the fact that, from outside of an app, you can pretty much do nothing to solve this. And this kind of tool is certainly worse for performance than doing nothing.

    43. Re:Can't hibernate by jabjoe · · Score: 1

      I smell snake oil here. That is, unless you have some real science to back up the benefits of ram "defragmenting"

      I don't know, you mean like stopping the real memory space becoming like swiss cheese? Ever tried to allocate a few meg on a app where the address space has more then enough space left, but the allocation has failed? That's down to fragmentation of the virtual address space. You don't want you real address space fragmentated either, or what looks like linear memory in a virtual address space might be all over the place in real memory.

    44. Re:Can't hibernate by jabjoe · · Score: 1

      I thought the same thing when I saw the ".ro". Ram is so goddamn fast anymore I can't believe there's any benefit at all to "defragging" it.

      W3C

      Memory use is everything. I find it hard to believe there is no inherit speed issue with linear virtual address space mapping to real memory all over the place.

      but how many commonly used applications truly need several gigabytes of ram in order to function properly?

      Photoshop, Premier, 3DSMax (it now often runs out of address space on a 32 bit machine), Maya, ZBrush, XSI, anything art related pretty much. I'm sure a virtual machine would eat address space too. My wife just telling me last night about an application at how work that get to 1.4 Gig and crashes, and that's some kind of (crappy) database app (sounds like it's badly leaking).

    45. Re:Can't hibernate by master_p · · Score: 3, Insightful

      Does this happen in USA a lot? if a light in the fridge goes out, do you buy a new one? when a tire is blown out, do you buy a new car?

      Gee, and then some people wonder why Americans spend 50% of the global resources...

    46. Re:Can't hibernate by TheThiefMaster · · Score: 1

      Read the KB article.
      1. Installing the patch didn't fix the problem 100% of the time.
      2. Service Pack 2 reduces the frequency of the failures, but doesn't eliminate the problem.

      There was probably another problem. There is ALWAYS another problem.

      3. The KB article explicitly mentions fragmentation.

      So it does. However it doesn't say that you could fix that by running a ram defragmenter. If you could, MS would have included a little ram defrag routine into the hibernate code :)

      4. In my experience, use of the ram defragmenter tool eliminates the hibernation issue.

      I'd be shocked if it did anything like defragmenting. Only Windows system code has access to programs' virtual memory physical memory mapping table, and if you defrag'd ram by rearranging the physical ram you'd have to update every program's virtual memory table. Some of these programs would be RUNNING while the defrag tool runs, especially in a modern multi-core / multi-cpu system.
      Much more likely is that works like all "ram optimisers": it simply allocates a large amount of ram to itself, forcing all other applications into the page file. After freeing its ram again, any stats of the amount of physical ram in use will be much lower than before, because nearly everything will be in the pagefile instead. The total amount of memory in use (RAM+PageFile) will be exactly the same! Having more free physical ram won't do anything helpful though, because it's not being used. In fact everything will run slower until it gets loaded back out of the pagefile into ram again, which will put you back where you started. This would also trash Windows' file cache, which is what normally makes use of "free" ram, because it gets purged in favour of active programs that need ram, such as this "defragmenter".
      Despite this, it IS possible that this could help with the old hibernating with over 1GB of ram issue, as only physical ram needs to be saved to disk when hibernating. If you've just forced everything into the pagefile, there will be very little to write. However, this is a side-effect of what the program actually does, not it actually working, and the problem with hibernating with lots of ram has been fixed now.

      5. Windows is STUPID when it comes to seeing more than 1GB of RAM. Look into the gyrations required to to enable the PAE settings. Yikes!

      PAE is enabled by default in Windows these days, it just doesn't use the extended address space feature on the desktop versions, only things like NX.
      PAE is required to see more than 3 to 3.5 GB of ram, not 1GB. If you're using that much, you really should be using a fully 64-bit system, not a hack like PAE. The best reason (and there are a few) is because not all drivers support PAE's extended address space, and they need to for your system to be stable. With a 64-bit system, they wouldn't load if they weren't 64-bit.

    47. Re:Can't hibernate by Hal_Porter · · Score: 1
      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    48. Re:Can't hibernate by GigaplexNZ · · Score: 1

      Even if RAM were to be somehow "defragmented" how could it possibly make it any faster?

      Cache locality. When you access data from memory, surrounding areas of memory is often copied to the cache on the CPU. This can often speed things up immensely, but it probably won't help speed up the described scenario.

    49. Re:Can't hibernate by SDF-7 · · Score: 1

      Unless the system in question supports large page virtual-to-physical translations beyond just the base page size translation.

      Then physical memory fragmentation can prevent you from being able to construct said large pages, and the TLB miss rate goes up when the working set spans the constituent virtual ranges... which does impact performance. (And yes, it can be appreciable).

      Now granted, in the context of Windows on x86 [even x86-64 desktops] I haven't heard of this being a big issue.

    50. Re:Can't hibernate by ryanvm · · Score: 3, Funny

      Your post pissed me off! I'm buying a new computer.

    51. Re:Can't hibernate by TheLoneGundam · · Score: 1

      So - where is the setting for how Windows determines that something is inactive, and swaps it? There are probably a few settings somewhere - should be one to determine when memory should be constrained; one or more to determine what's inactive; etcetera. Sounds like they're trying to be proactive in a way, and free physical RAM for use by things which are actually active; but not checking to see if there's actually a memory constraint which would require it. Note - I'm reasoning from what I know about z/OS virtual memory paging which has a system-wide unreferenced interval count (UIC) which is basically a measurement of how "busy" physical memory is, and system-wide measurments of the number of free page frames, among other things. I'm not sure what the Windows equivalents are, but I do know our mainframe runs hundreds or thousands of concurrent application tasks using about 4GB of physical memory and we don't page in/out very much.

    52. Re:Can't hibernate by MightyDrunken · · Score: 1

      There is NOTHING from that KB link that says ANYTHING about "ram fragmentation".

      How about this from the linked KB, "It is still possible to experience a hibernation problem after you install this fix if the memory becomes highly fragmented."

      Not to mention that even IF ram could be fragmented, it has effectively zero access time, so hopping from fragment to fragment won't hurt anything.

      Maybe hard disk and ram (heap) fragmentation are different things.

      Chill man, it's almost the weekend.

    53. Re:Can't hibernate by Just+Some+Guy · · Score: 3, Informative

      Does this happen in USA a lot? if a light in the fridge goes out, do you buy a new one? when a tire is blown out, do you buy a new car?

      No, but it's a little different with electronics in general. First, assume here that we're talking about out-of-warranty items so that the owner is responsible for costs. Each town used to have several TV repair shops, but it came to be that it wasn't any cheaper to fix one than to replace it. The same with a clock radio; while you might be able to find someone qualified to troubleshoot and fix it, it'd probably be cheaper just to buy a new one. Well, a lot of people lump computers into the same category. If the hard drive (or CPU or RAM or video card) fails, then they figure it might be cheaper to buy a new one than to replace the bad parts.

      Honestly, they're probably right. Suppose you're Joe Sixpack with a busted Dell and take it to Best Buy so their experts [1] can check it out. They quote you $147 for a new 60GB hard drive [2] plus $75 in labor. You're looking at $200+ to fix a two-year-old PC. Being the frugal type, you check out dell.com and see that you can buy a brand new one for $279 that's faster, has more storage, and has that Mojave thing so you can view photos. I won't really hold it against you for spending an extra $50 to get a new, better computer with a full warranty [3].

      [1] Work with me here.
      [2] You could get a 750GB drive for the same price, but your computer was "designed for a 60GB drive", and they're hard to get now. Luckily for you, they were able to find one in the warehouse.
      [3] ...which will run out the week before the embedded graphics chipset overheats.

      --
      Dewey, what part of this looks like authorities should be involved?
    54. Re:Can't hibernate by DisKurzion · · Score: 1

      Yes, this happens a lot. My family got our second computer (a 166 MMX) for about 1/3 of retail value because of issues like this. The problem with the system...blown power supply fuse. The machine was less than 6 months old. The original owner just went out and bought a new machine.

      Your analogy of the blown tire fits with my situation: a blown fuse is more like a blown tire. A failed HD (or fried MB) is more like a busted head gasket. Relatively expensive to fix, and if you have an old model, it's probably more practical to buy a new one.

      Nowadays...it's almost cheaper to buy a new PC than to have a "professional" (assuming you don't know anybody that will fix it for free) to repair/clean your PC.

    55. Re:Can't hibernate by Anonymous Coward · · Score: 0

      I'm not 100% sure, but I think it is a myth that windows can only use some 3.5 GB in XP, I think that is a process limit, not an OS limit. But I'm not sure of that. I only have 3GB so I can't test it :)

      If you bring up a 32-bit WinXP system with 4GB of physical memory installed, only 3.5 will show up in the system. I believe that Windows sets aside 512MB of address space for accessing hardware. This isn't a problem with 64-bit Windows systems.

    56. Re:Can't hibernate by jazzduck · · Score: 1

      And see, this is where join() on forum threads would become useful...

      Go read the above posts about the number of totally stupid users in the world. When Gramma Jones notices her computer is running slow, she's a lot more likely to just go buy a new one than spend the time learning what "defragmentation" means. A light bulb in a fridge, or tires on a car, are much more visible, and she's had years and years of experience with them -- enough to know how to replace a light bulb, or enough to know where to call to get her car fixed. All she knows about this computer thingy is that it doesn't work as well as it used to, and that clicky-whirring sound happens a lot more often.

      Analogizing the process of defragmenting a drive and/or adjusting swap space to the process of replacing a light bulb is a gross mistake. The amount of personal education and the depth of understanding necessary for Gramma Jones to adjust her swap space and defragment her drive is vastly larger than the amount needed to replace a light bulb. If the perceived cost of this education (hours spent frustrating oneself on the phone with tech support who insist on walking her through unnecessary steps in their verdammt script, or fighting with an internet search they don't understand, or talking their unwilling grandson into fixing it) is greater than the perceived cost of purchasing a new computer, they'll buy a new computer. This is basic economics, really.

      --
      A cat is no trade for integrity!
    57. Re:Can't hibernate by master_p · · Score: 1

      Honestly, they're probably right. Suppose you're Joe Sixpack with a busted Dell and take it to Best Buy so their experts [1] can check it out. They quote you $147 for a new 60GB hard drive

      You are a sucker if you accept $147 for a new 60 GB hard disk. These days, you can get a 500 GB 7200 RPM for 60 bucks.

      [2] plus $75 in labor.

      For a 3 minute job? no way Hose! I'd rather open the box myself and replace the drive or, if I am a computer illiterate person, ask a friend.

      You're looking at $200+ to fix a two-year-old PC. Being the frugal type, you check out dell.com and see that you can buy a brand new one for $279 that's faster, has more storage, and has that Mojave thing so you can view photos.

      $279 buys you a very basic machine with a no good video card, a Celeron CPU and 1 year hardware warranty. In which case you will have to open the previous PC, get your video card and install it yourself to the new PC. If you don't know how to do that, you can't avoid the $75 cost for labor anyway. So you are already at $279 + $75 = $354.

      It's way better, especially in this economic situation, to just grab a $60 500 GB hard drive and do the job yourself.

    58. Re:Can't hibernate by Anonymous Coward · · Score: 0

      If the OS supported it, it would make sense to move only those items actually required for a restore (not buffers/cache) to the beginning of physical RAM before suspend to increase performance with suspend/resume, and then just reload those lost pages after resume when idle. That's about the only possible reason I can come up with for some sort of "defrag" for RAM, and it would require some significant smarts in the code.

    59. Re:Can't hibernate by Just+Some+Guy · · Score: 1

      You are a sucker if you accept $147 for a new 60 GB hard disk.

      Whoosh.

      I'd rather open the box myself and replace the drive or, if I am a computer illiterate person, ask a friend.

      I just built a machine out of parts from Newegg. You and I are the tiny minority, even if it doesn't seem like it because our friends are doing the same thing. A lot of people have a geek friend they can call on, but computer repair shops don't seem to be going away.

      $279 buys you a very basic machine [...]

      Remember, you are Joe Sixpack replacing your dead Dell. The new cheap Dell is better than your old one, so why not?

      It's way better, especially in this economic situation, to just grab a $60 500 GB hard drive and do the job yourself.

      You and I know that, but I'm not talking about us. I was talking about why the average person off the street might buy a new computer instead of fixing an old one, since that was the question we were addressing. :-)

      --
      Dewey, what part of this looks like authorities should be involved?
    60. Re:Can't hibernate by LehiNephi · · Score: 1

      The 3.5/4GB issue is inherent with 32-bit systems that use memory-mapped I/O. A portion of the address space is allocated for your I/O devices, including your sound card, video card, etc. That portion of the address space is no longer available to be used to access physical RAM. Typically, the video card is the biggest culprit--if it has 512MB of on-board RAM, that's 512MB of the 4GB address space that the system can't use to access physical RAM.

      The always-entertaining Daniel Rutter has a good explanation.

      --
      Help find a cure for cancer. Join the [H]orde
    61. Re:Can't hibernate by Chris+Rhodes · · Score: 1

      That's just bunk. There's no inherent limit to 32 bit systems since the PPro:
      http://www.microsoft.com/whdc/system/platform/server/PAE/PAEdrv.mspx
      Sucks that a microsoft document answers my questions when all this crap about 32-bit addressing floats around.
      http://blogs.msdn.com/oldnewthing/archive/2004/08/18/216492.aspx
      There's another microsoft document that states the obvious.
      The so-called 'limit' is a per-process limit, and is artificially imposed on the whole of non-enterprise versions of windows by microsoft. There's lots of issues with using more than 4GB, you can't really blame them. But you can blame the hardware vendors.
      But even the idea of a large video card using memory address space is an artificial limit imposed by poor design of hardware, and dumbed-down versions of windows.
      In most cases you're correct (and kudos for being more correct than those who are just plain wrong,) but the limit is, technically, a bug, and not inherent.

    62. Re:Can't hibernate by anomaly · · Score: 1

      There was probably another problem. There is ALWAYS another problem.

      I don't disagree. There is always something else.

      3. The KB article explicitly mentions fragmentation.

      So it does. However it doesn't say that you could fix that by running a ram defragmenter. If you could, MS would have included a little ram defrag routine into the hibernate code :)

      Just like Microsoft included a full disk defragmenter with XP? The way they included anti-spyware software with it? The way they included anti-virus with it?

      Nope, It's not the MS way to include the full suite of tools needed to keep your box running. That's what they 3rd part market is for!

      4. In my experience, use of the ram defragmenter tool eliminates the hibernation issue.

      I'd be shocked if it did anything like defragmenting....
      Despite this, it IS possible that this could help with the old hibernating with over 1GB of ram issue, as only physical ram needs to be saved to disk when hibernating. If you've just forced everything into the pagefile, there will be very little to write. However, this is a side-effect of what the program actually does, not it actually working, and the problem with hibernating with lots of ram has been fixed now.

      Nope. Thinking that perhaps you were right, I disabled the "questionable" software. After going into standby twice during the workday, it blue screened on the third "wake up."

      Could be mere coincidence, or it could be that the software adds value. I'm going with the latter.

      The problem is not fixed. Windows does not wake reliably.

      5. Windows is STUPID when it comes to seeing more than 1GB of RAM. Look into the gyrations required to to enable the PAE settings. Yikes!

      PAE is enabled by default in Windows these days, it just doesn't use the extended address space feature on the desktop versions, only things like NX.
      PAE is required to see more than 3 to 3.5 GB of ram, not 1GB.

      Bzzt! Wrong answer! My machine did not see more than 2GB until I enabled PAE.

      PAE was not enabled by default on my machine! There were arcane incantations required in order to make the configuration change.

      What you state simply does not match my experiences over time. You may be right for some use cases, but they seem to be exclusive of *my* use cases.

      Respectfully,
      Anomaly

      --
      But Herr Heisenberg, how does the electron know when I'm looking?
    63. Re:Can't hibernate by TheThiefMaster · · Score: 1

      You clearly didn't read what I'd said. I said PAE is enabled, but Windows won't use the extended address space despite that, it only uses things like NX, which require PAE.

    64. Re:Can't hibernate by anomaly · · Score: 1

      Nice the way you reply to only one of the points I made.

      FWIW, According to MS, your assertion about being turned on is not accurate.

      "On most computers, PAE is disabled by default. "
      http://msdn.microsoft.com/en-us/library/aa366796(VS.85).aspx

      Windows XP memory management is painful!

      --
      But Herr Heisenberg, how does the electron know when I'm looking?
    65. Re:Can't hibernate by ZosX · · Score: 1

      Makes me want to play with that! Netbeans does some profiling in java, and its pretty neat to watch your code suck up CPU in the rough spots. (Like everywhere in mine :)

      I don't know why people here are bagging paging as such a bad thing. Of course your OS will try to use all of your RAM. It makes no sense for it not to cache as much as possible with all that free, idle memory available.

    66. Re:Can't hibernate by ZosX · · Score: 1

      btw, I didn't mean to start a flame war or anything (I'm actually a pretty nice guy). I just never could figure out why there would be any advantage to defragmenting RAM. But, hey, it sucks your PC won't hibernate without a crappy third party utility. I dual boot into linux a lot, so hibernation is certainly attractive (and it works on both OSes), but my systems are so lean and mean and XP seems to certainly run better on a fresh boot, that I'm ok with wating the extra 20 seconds. I've noticed that with hibernate (at least on XP) it seems to page everything out to the swap, so even after booting into the desktop it takes some time (and disk grind) for applications become usable again.

      Strange that 1 gig is the barrier. NT has been solid on multiple gigabyte systems longer than XP has been around. I suspect the lack of swap is problematic. Windows really likes to have heaps of swap to play with...certainly at least equal to your installed RAM.

      blah

      good luck with that

    67. Re:Can't hibernate by TheThiefMaster · · Score: 1

      "PAE is enabled by default if DEP is enabled on a computer that supports hardware-enabled DEP"
      i.e. all Athlon 64s and Intel cpu since the Core 1 (including celerons). aka, any pc in the last few years.

    68. Re:Can't hibernate by TheThiefMaster · · Score: 1

      Nice the way you reply to only one of the points I made.

      For your other points:
      I never said it didn't make hibernate work (in fact I suggested a reason why it could), I just said that there was no way it did what it said (i.e. defrag ram).

      After going into standby twice during the workday, it blue screened on the third "wake up."

      I'm a little confused at your mention of standby, standby and hibernate are completely different. Weren't we talking about hibernate?

      Just like Microsoft included a full disk defragmenter with XP

      Microsoft did include a disk defragmenter with XP. You might not like it, but it DOES work.

      The way they included anti-spyware software with it? The way they included anti-virus with it?

      only needed if the user is an idiot (some would say that this is a truism). Disk defrag is needed, as the disk fragments under normal use. The machine isn't supposed to need anti-malware protection as part of normal use. However, MS have realised that users are idiots and have added a firewall to their OS, and are working on MS anti-spyware (released already) and MS antivirus, for users that are both too stupid to not run malware, and don't use a 3rd-party AV. Contrary to popular belief, very few viruses can spread and execute completely by themselves any more, they're normally crap on websites that you have to visit yourself, or crap in email you have to run yourself.

      My machine did not see more than 2GB until I enabled PAE.

      2GB? It should see at least 3GB. Something must be seriously screwy with your motherboard for it to limit you to 2GB. Either that or you have 2GB of graphics ram, which I wouldn't expect to work on a 32-bit system due to not being able to map it all into system virtual memory.

      There were arcane incantations required in order to make the configuration change.

      This is because MS don't support PAE's expanded address space on their desktop OSs. Support for it in drivers can't be detected automatically, and as it wasn't required for drivers for their desktop OSs to support it to get WHQL certified, there are a lot of signed drivers that crash and burn with PAE's extended address space (often confused with PAE itself) enabled.

      Perhaps that's your problem?
      Does it still crash without PAE manually fully enabled?

      Nice the way you reply to only one of the points I made.

      Did I miss any of your points now?

    69. Re:Can't hibernate by GreenTom · · Score: 1

      I agree that 'ram defragmentation' software is probably snake oil, but there is such a thing as RAM fragmentation. Try writing a program that allocates a bunch of small blocks of memory, then go and deallocate every odd one, then try and allocate a big block. Things will slow way down. If your malloc() can't get the congigious block of memory it needs, it either fails or has to invoke a garbage collector. Ran into this on some network software I worked on some years back...in my youth and ignorance, I malloc()'ed a buffer whenever we got a packet, took quite a while to figure out why the thing kept getting slower. Now that I think about this (it's been a while...), I remember there used to be legit memory defraggers, at least as developer tools. The were libraries you'd link with that would replace the OS's memory management with their own better ones.

    70. Re:Can't hibernate by Anonymous Coward · · Score: 0

      Keeping track of one big continous block of allocated memory needs less resources than tracking a thousand small blocks spread all over physical RAM and presenting that as one continous address space to the program. You don't see it, but the OS has to mess with TLBs continously. Everything from malloc to free goes slower. Some operations, like DMA, even need continous physical RAM to work effectively. And, no, access time of RAM is not even close to 0 in a modern system.

    71. Re:Can't hibernate by thebigmacd · · Score: 1

      Actually I live in Canada, and yes, same deal with computers.

      I like the analogy further down in this discussion of a broken hard drive being more akin to a blown head gasket than a flat tire. Even in the case of a blown head gasket I wouldn't hesitate to fix it myself, but most people would ditch it if is out of warranty.

    72. Re:Can't hibernate by master_p · · Score: 1

      You and I know that, but I'm not talking about us. I was talking about why the average person off the street might buy a new computer instead of fixing an old one, since that was the question we were addressing. :-)

      That's what I am talking about as well. In this economic climate, throwing away your old stuff which requires a minor repair for a brand new machine is not a good option, no matter how computer-illiterate you are.

    73. Re:Can't hibernate by r.ioiart · · Score: 1

      ...actually there is a benefit for defragmenting memory.

      Consider having 1GB of physical RAM out of wich just 512MB are allocated but the memory is fragmented in such a way that there is no more than 2 MB of free space between each fragment.

      Now if a program wants to allocate a continuous block of RAM larges than 2MB it will find no space in physical RAM and will use the swap file even if there are 512MB free in physical RAM.

      So in a scenario where there are many (hundreds) of processes constantly appearing and dissapearing (in case of servers) you may start to see a lot of swapping even when there is free space in the physical RAM, in this case defragmentation of RAM helps.

  72. Ditto the original versions of the Pick OS by thatseattleguy · · Score: 2, Informative

    Circa 1975 through 2000 or so, the "native" (*) versions of the Pick Operating System worked exactly this way. Even the OS-level programmers - working in assembly language (!) - only saw virtual memory in the form of disk pages. When you put an address in a register, it was a reference to a disk page, not physical memory. The pages were auto-magically brought into memory at the moment needed and swapped out when not by a tiny VM-aware paging kernel. That was the only part of the system that understood that there was anything besides disk storage in the entire system.

    Might sound inefficient, but I remember the first Pick system I worked on supported 14-16 simultaneous online users using only 64kb of physical memory (and it was core - REAL core - at that point).

    Now get off my lawn, kids.

    -TSG-

    (*) "Native" meaning "with no other OS involved underneath, bare Pick on the metal". These types (Reality, Ultimate, CDI Series/1, etc) were mostly gone by Y2K in favor of more modern systems with underlying host OS (Un*x or NT) handling the hardware and Pick riding on top as a database/programming environment (Universe, Unidata, AP / D3). Though I'm sure there are still hundreds if not thousands of the old systems chugging away in back rooms of warehouses and the like to this day.

  73. Easy way to remember real vs. virtual . . . by PolygamousRanchKid+ · · Score: 4, Funny

    If it's there, and you can see it . . . it's real.

    If you can see it, but it's not there . . . it's virtual.

    If you can't see it, and it's not there . . . it's gone.

    --
    Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
    1. Re:Easy way to remember real vs. virtual . . . by caywen · · Score: 1

      If you can't see it, but it's there . . . it's a bug.

    2. Re:Easy way to remember real vs. virtual . . . by Anonymous Coward · · Score: 0

      What if it's not there, but you can see it?

    3. Re:Easy way to remember real vs. virtual . . . by Anonymous Coward · · Score: 0

      Please insert before/after virtual.

      If you can't see it, but it's there ... it's transparent.

    4. Re:Easy way to remember real vs. virtual . . . by Anonymous Coward · · Score: 0

      If you can't see it and it's there . . . excuse me.

    5. Re:Easy way to remember real vs. virtual . . . by xtracto · · Score: 2, Funny

      That reminded me of a joke I read somewhere, sometime (please someone add the reference):

      What is the difference between hardware and software?

      * Hardware are such things in a computer that you can kick when your 5 hour work vanishes after an error.
      * Software are such things that you can just swear at.

      Perfect explaniation for mom and dad :)

      --
      Ubuntu is an African word meaning 'I can't configure Debian'
    6. Re:Easy way to remember real vs. virtual . . . by Anonymous Coward · · Score: 1, Funny

      if it's there, but you can't see it ... it's cloaked.

    7. Re:Easy way to remember real vs. virtual . . . by Anonymous Coward · · Score: 0

      you forgot:

      if it's there, and you can't see it... it's invisible.

      :-)

  74. Windows is retarded anyway by Anonymous Coward · · Score: 0

    I have 8 GB of RAM and it created a 16 GB pagefile. Yeah, that's real smart. If I ever actually did page-out 16 GB of crap the computer would trash for hours and nothing would get done. Hard drives are too slow to swap out more than 512 MB or so. Anything more than that will kill your computer if you actually used it. Consider with 4+ GB of RAM than a 512 MB page/swapfile ain't shit, then you just run with no swap file.

  75. Why would they show up MORE frequently? by BUL2294 · · Score: 1

    The way I see it, if you have a fault in your memory, wouldn't the constant swapping in/out of a page file be MORE dangerous since now it affects everything that goes into that physical address? I'd assume that without a page file, memory stays much more constant than it would with a page file--after all, there's nothing to be gained by swapping data between addresses in physical memory... (In fact, it would just waste CPU cycles). So, if you have a fault, wouldn't you want to turn off the page file so that fault has the opportunity to do the least amount of damage to data?

    --
    Windows 3.1x calc: 3.11 - 3.10 = 0.00
  76. Anonymous Coward. by Anonymous Coward · · Score: 0

    disable the paging executive, it then only uses the swap when the ram gets full
    google it, its a simple registry hack.

  77. Shared Memory, Memory-Mapped IO... by Anonymous Coward · · Score: 0

    Virtual memory addressing enables such beautiful tricks as Shared Memory (inter-process communication, saving physical memory on identical copies of the same DLLs/SOs), Memory-Mapped IO, etc.

  78. Running with averages. by jellomizer · · Score: 2, Informative

    Yes the OP is right if you don't page to disk and go off all RAM then you will be faster. However with a good paging it will help you from things from getting slower or not working when you really need the extra Horse Power, and you probably wouldn't even notice it.

    First we got the 80/20 rule where 20% of the Data is used 80% of the time. So a large chunk of data will rarely be used, being that it not being used read or written just kinda sitting there. You might as well page it to disk so you have more space free.

    Next if you get a big chunk of memory request say you open a VM system that need Gigabytes of memory. Say 3 GB and you only had 2 GB free. That means before you app can run you will have to wait for 1GB of data to be dumped to the disk. Vs. say a good paging algorithm which would already have that 1 GB already paged so you can fill the RAM with the VM for a faster access then probably depending on the paging algorithm pieces will slowly get paged back to disk allowing you run say an other 512meg load on your system without having the system dump that 512meg of data. If you didn't page you would be stuck as you don't have the ram to run the application. Or a poor paging algorithm will spend so much time paging the data until it gets enough free to operate.

    Drive space is relatively cheap if you are going to do some high RAM intensive apps. With a good paging you can get by with about half as much RAM saving money.

    Most systems have more ram then ever but the apps use more ram then ever too. (This isn't necessarily bloat) Lets say your app does a lot of Square roots. The time it takes for it to process say 1,000,000 Square Roots vs. Dumping to memory the recalculated Square Roots values and doing a quick memory lookup of the answer. That way you get faster calculation time at cost of RAM.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:Running with averages. by Anonymous Coward · · Score: 0

      Drive space is relatively cheap if you are going to do some high RAM intensive apps. With a good paging you can get by with about half as much RAM saving money.

      Newegg has 2GB sticks for ~$17...$35 will get you more memory than a 32bit OS can even use, and 4GB is a fairly decent amount, more than enough to current "normal" usage.

      Unless you are either posting from 15 years in the past, or a 3rd world country where $17 is 2 months wages, using a paging file to save money on RAM is just foolish.

      This is also why I pretty much want to spit in the face of anyone who says "Vista is slow" and runs it on less than 2GB of RAM, since RAM is stupidly cheap and Vista is no slower than XP on machines with 2GB or more.

  79. Pushing the Limits of Windows by Anonymous Coward · · Score: 0

    See Mark Russinovich's (author of SysInternals tools) blog that describes how windows uses memory resources,

    Pushing the Limits of Windows - Virtual Memory:
    http://blogs.technet.com/markrussinovich/archive/2008/11/17/3155406.aspx

    Pushing the Limits of Windows - Physical Memory:
    http://blogs.technet.com/markrussinovich/archive/2008/07/21/3092070.aspx

  80. I do agree with that by Trepidity · · Score: 2, Insightful

    One problem is that there are relatively frequent types of disk-access patterns where caching them gives little to no benefit in return for the paging out of RAM it requires. A virus scan (touching most of your files exactly once) is one canonical example. Media playback (touching a few large files in sequential block reads) is another.

    The difficult question is how to exclude these kinds of wasted caching while still retaining the benefits of caching frequently accessed files, and not introducing excessive overhead in the process.

    1. Re:I do agree with that by swilver · · Score: 1

      You need to determine if the physical media was a bottleneck or not. When playing media files, the disk is never a bottleneck, and the data is thus not really worth caching in the long term. So, if a program requests data at a pace that is slower than disk I/O, then it should not be long term cached. There's lots of ways you can measure this. You can see if the program actually needs to wait for I/O, you can see if it the smart read-ahead is producing a 100% hit rate, or you can impose some hard coded limit (ie, requests below X MB/sec are not worth caching long term).

      This would work pretty well for media playback, but wouldn't do much for copying large directories, or for virus scanners. Virus scanners however could implement a friendly scanning mode, that will keep scan speed below a certain maximum, thus signaling the caching system that only short term caching is really needed.

  81. Tell me about it by myxiplx · · Score: 1

    It's something that's annoyed me for ages in Windows too. If I have over a gig of physical memory available, for the love of God don't start swapping out applications that I'm actually using.

    I'll accept that I'm a power user, and that not everybody switches regularly between a dozen applications, but there's still no excuse for swapping stuff out when there is bucket loads of memory free. I mean, 1GB is around four times the original requirements for running Windows XP, that's not a small chunk of memory to have lying around.

    And actually, this gripe was the main factor in migrating my computers over to Ubuntu a few months back. I got so fed up of waiting for windows that I decided to give it a try. It's definately a bit rough around the edges, but I haven't had to wait for a single application to get paged back from disk, it's far, far more responsive and there's no way I'm going back to windows now.

    So far the longest I've gone between reboots is about 3 weeks, and at the end of that I still had under 50MB paged to disk. That's a massive difference to windows where I can have 1.5GB paged out by the end of the week, and I'm running more apps under Ubuntu too!

    1. Re:Tell me about it by BUL2294 · · Score: 1

      1GB is around four times the original requirements for running Windows XP

      Nope. 1GB is 16x the minimum required for XP Home and XP Pro, which require a minimum of 64MB. Even if you follow Microsoft's recommended minimum of 128MB, 1GB is still 8x the minimum.

      --
      Windows 3.1x calc: 3.11 - 3.10 = 0.00
    2. Re:Tell me about it by epine · · Score: 1

      Nope. 1GB is 16x the minimum required for XP Home and XP Pro, which require a minimum of 64MB.

      That's like defining "minimum" tire tread on your car by what it takes to keep your muffler from scraping the asphalt. If you jimmied the leaf springs, I bet XP Home would boot in 32M and play a mean game of FreeCell.

  82. The REAL answer is . . . by Better.Safe.Than.Sor · · Score: 1

    . . . apparently not known. That an OS that has been around for this long can still be a mystery to the herd that is /. confirms for me that computer science is akin to philosophy for many of its users. So there.

    --
    It's all history, man. -anon
  83. The idea is ridiculous by Lord+Byron+II · · Score: 2, Insightful

    There has been this ridiculous notion floating around recently that swap space and paging files are relics and need to be eliminated. You can only safely eliminate them only so long as you're 100% confident you'll never use more RAM than you actually have. But there are lots and lots of memory hogging applications - video editors, image editors, scientific applications, etc. And when you consider that a web browser can eat up to 300MB of RAM, it shouldn't be hard to imagine a multitasking user running out by using too many little programs.

    1. Re:The idea is ridiculous by Anonymous Coward · · Score: 1, Interesting

      What am I missing?

      If you have 4GB RAM, and 4GB pagefile, how are you better off than if you have 8GB RAM and no pagefile?

      Either way, you run into a brick wall when you hit 8GB.

      If I start to run out of memory, you say add 4GB of swap; but why not add 4GB RAM?

      That said, there can be definite performance benefits of swapping unused pages to disk to free the memory for caching purposes, and that's a valid argument; but I've never understood the "because you'll run out" argument.

    2. Re:The idea is ridiculous by TheThiefMaster · · Score: 1

      Because swap can be added while the system is turned on :)

      More importantly, swap is cheaper than ram, because hard disks are cheaper per GB than ram is.

    3. Re:The idea is ridiculous by Anonymous Coward · · Score: 0

      Well, if you are running out of memory, then just turn on disk compression and store to
      RAMDISK. Thus, you eventually double your memory. The old company, I believe Stacker
      did this in the 80's.

    4. Re:The idea is ridiculous by Anonymous Coward · · Score: 0

      Ridiculous for me is, that when in linux I have a choice to configure my system according to my preferences, in windows only way to manage swap space vs disk cache usage is to turn off page file or reduce it's size!

      And don't tell me "windows knows best" what to do with your RAM!!!!!!!!!!

      Have you ever copied LARGE files(larger than the amount of available physical memory) over windows networking from another windows computer? Have you seen what windows does with file cache on the other machine?!?!? It swaps out EVERYTHING to stuff the open file into file cache. EVERYTHING!!! And then the file does not fit into memory anyway. And the person working on the computer is left with terribly unresponsive machine, where you can see mouse moving over the screen accompanied by constant disk activity!!

      So I don't want to turn off swap, because I don't want to worry about opening too many windows, but also in windows I have no reasonable control over file cache/swapping priority, which is, like I said in the beginning, RIDICULOUS!!!!!!

    5. Re:The idea is ridiculous by BeanThere · · Score: 1

      Nobody is saying "elimate" swap - just only START using it when you actually start getting close to having filled up physical RAM, and don't use it for no particular reason at all (e.g. idle machine).

  84. Re:I don't know about Vista's paging implementatio by Anonymous Coward · · Score: 0

    this is true of many *nix style systems include macOS X.

    its actually funny to watch but if you have some processes running on a server that don't access the disk you can rip the drive right out of the server and it will be fine, the kernel and programs are in ram so who cares? you could even open recently used apps without the drive in there since they will be cached in ram still as well (probably)...

    trying this in windows results in BOOM

    cheers

  85. Re:Virtual Memory v Paging He must be returned by HTRednek · · Score: 1

    He worked waaay to hard on that statement

  86. C'mon guys by euice · · Score: 0

    What's this place?

    Virtual memory is for the lazy application developer. It's his linear address space which he can use for data or even blend in files, swap or other device access (e.g. graphics)

    You cannot "consume" virtual memory, as every app has a fixed amount assigned anyways. Using this address space to access physical ram is just one option.

  87. Usage of memory by mikael · · Score: 1

    Your system will have 4GB, but a small chunk of that memory is going to be use d to store the kernel, all relevant drivers, running services for graphics, virus scanning, printing, mail, and networking. All of these are going to reserve large blocks of memory either by the drivers themselves or when the services are in use. The kernel might even make it a priority to pre-allocate memory to device drivers rather than leave it free for applications to use.

    I remember upgrading my PC's memory, thinking it was going to give me a lot more memory for applications to run. To my surprise, the application took even longer to run a large data file, as the kernel was swapping out all the pre-allocated memory.

    --
    Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  88. Did the OP ever get an answer? by rickb928 · · Score: 1

    ...cause I sure would like one.

    This question evolved from what I thought was a pretty straightfoward one ("why use a paging file") to a convoluted discussion of virtual memory, addressing schemes, coding, blahblahblah.

    Wasn't the OP asking why modern Windows PCs, with gobs of RAM, even need a page file anymore except in exceptional circumstances?

    And that's a good question.

    I had an NT server back when with a whopping at the time 512MB RAM. I turned off the paging file since it was strictly a file/print server. Norton Corporate Edition refused to load. I had to set a paging file, and I did - 10MB worth, IFIRC. Happy now, Norton loaded and the server was happy. I've run some XP machines without paging when I had time to fool with them.

    I remember when NetWare started supporting paging files. The engineers I knew essentially told me that it was a holy war within Novell, with the paging gang winning for no technical reason. Sort of the holy war over the licensing model that got a lot of people riled up and changed nothing. Paging in NetWare, back in v5 days, changed nothing. Now NetWare on Linux, paging seems to be crucial, even when you have 8GB machines.

    But back to my question, I don't see the answer yet. I couldn't bear to read through the minutiae of virtual/physical one more time.

    Reminds me of LIM/EMS memory. Ack! It hurts!

    --
    deleting the extra space after periods so i can stay relevant, yeah.
    1. Re:Did the OP ever get an answer? by wintermute000 · · Score: 1

      YES HEAR HEAR

      Lets rephrase for the slashdot audience

      What is the wintel equivalent to putting vm.swappiness = 1 in your sysctl.conf

  89. virtual address space, virtual memory, swapping... by bored · · Score: 4, Informative

    I note a lot of people are insisting that "virtual memory" refers to the virtual address space given to a execution context, and what the author really means is "paging".

    The funny thing is that these are traditionally poorly defined/understood terms which are gaining a hard consensus for the meanings due to some recent OS books, and poor comp-sci education which insists on a particular definition. Everyone is faulting M$ for using the term incorrectly, even though the original mac OS and other OS's used the term in the same way. Wikipedia defines it one way and then goes on to give historical systems which don't really adhere to the definition. For example the B5000 (considered the first commercial machine with virtual memory) didn't even have "contiguous" working memory as required by the wikipedia definition. It had what would be more specifically called multiple variable sized segments which could be individually swapped. Again, the mac OS evolved from a single process model to muliprocess, in the same address space (look up mac switcher) and implemented "virtual memory" using a system without a MMU by swaping the allocated pieces of memory to disk if they weren't currently locked (in use) and reallocating the memory. Aka they had "virtual memory" in single fragmented address space.

    The other example is people use "paging" to describe the act of swaping portions of the memory to disk, misunderstanding that paging is more about splitting an address space or segment up into fixed pieces for address translation to physical, and that disk swapping of pages isn't required for paging. Aka, your system is still "paging" if you disable swapping.

    Even the term swapping is unclear because the need to differentiate between swaping pages, and swapping whole processes (or even segments) resulted in people avoided the term swapping to describe systems which were swapping pages instead of segments/regions/processes. These systems were generally called "demand paged" or something similar to indicate that they didn't need to swap a complete process or dataset (see DOSSHELL).

    So, give the guy a break, in may ways he is just as correct, if not more so.

  90. Say what??? by Khyber · · Score: 1

    "In modern processors, there is no penalty for using virtual memory,"

    Umm, would you like to bet? If it's not stored in physical RAM, there's only two other place to store, processor cache or a slower storage medium. I guarantee you a fast processor WILL CRAWL if you tried accessing the 'virtual memory' pagefile written on disks that have low bandwidth, like CF cards and older pre-NT days hard drives.

    By historical use and the way Windows uses the term today, the Submitter is correct. It's been called virtual memory since the late '70s.

    --
    Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
    1. Re:Say what??? by Fulcrum+of+Evil · · Score: 1

      Umm, would you like to bet? If it's not stored in physical RAM, there's only two other place to store, processor cache or a slower storage medium.

      Sure, I'll take that bet. I have 2G of virtual memory right now, and it's mapped to physical memory. I have another 1G of virtual memory in a page file, but so what?

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  91. Re:Vista reserves 1 GB by baffled · · Score: 1

    Win32 apps can access more than 2/3GB of physical memory.. if they're written properly. http://msdn.microsoft.com/en-us/library/aa366527.aspx

  92. I see your point by biancmb · · Score: 1

    I have been asking myself the same question lately. Try disabling the swapping altogether or set the page file size to zero and see what happens. :-) The mechanism must be there to ensure applications get the required memory. Any amount of memory will always be too tight for somebody (ask BGates). Still, I can see where you are coming from and I agree, there should be a way to get rid of the functionality if all you crave is speed of execution and system performance.

  93. Overcommit by Morten+Hustveit · · Score: 1

    Many programs allocate much more memory than they use on average (AFAIC, Java does this frequently). If you have enough such processes running, the amount of headroom used by each program can add up to a significant amount of total memory. Since this happens so often, some operating systems implement overcommit, meaning they pretend they have more physical memory than they actually have.

    But what if, by some coincidence, many of those processes decided to use much more than their average amounts at the same time? Without enough physical memory, the operating system would have no other choice but to kill a process to free up some resources. This could be a real pain for the user.

    So the choices you are left with, are either risking that random processes die, or that you cannot use most of your memory on average. A neat solution for this is to have a lot of swap while disabling overcommit, so that you can use most of your RAM on overage, and only use the disk as memory when some coincidence happens.

  94. Vista memory management by mtarnovan · · Score: 1

    Vista has a feature they call SuperFetch, which is supposed to optimize memory usage and prevent page outs that would make the system unresponsive when running background tasks (exactly the situation many complained about above - delays in application switching/maximizing after a period of non-use). It's also supposed to preload data based on historical usage of application. I haven't seen any (subjective) improvements in responsiveness over Windows XP however. Might be that when Microsoft gets something right, they make sure to get other things wrong.

  95. Windows VM/swap/cache system by rabtech · · Score: 1

    First of all, Windows uses virtual memory to map things like executable pages and DLLs into memory, so they only get loaded if a particular function gets executed... parts of an EXE or DLL that aren't used are always considered "paged to disk", even though they don't take up any space in the page file and were never loaded into RAM. If you access these pages, Windows will dutifully read them from the original file into memory.

    This is related to the prefetch system that attempts to say "ah, i always end up loading these other pages over the next 20 seconds of program start anyway, might as well just let the HDD keep churning while the user is moving the mouse to the open button that normally triggers the page faults and save some time". If you didn't do it this way you'd have to stare at the hourglass waiting for the entire EXE to load into memory (and other stuff to get paged out if necessary, or even dumping some read cache which may in turn make performance even worse). If you don't prefetch, then every new function invocation can potentially cause a page fault. So sure, after you see Word up and running the HDD is churning for 20 seconds. That's fine with me - Windows is just pre-caching the parts of winword.exe it knows I usually end up needing anyway.

    Windows will also immediately dump bits of read cache as well as memory that is already stored on disk (such as DLLs) if there is a sudden demand for more RAM, thus allowing that memory allocation to succeed immediately instead of waiting five minutes for everything to get paged to the swap file first. Windows will also scan memory looking for bits that aren't already on disk and write them there during idle times, just so it has the option of dumping that RAM if needed. You aren't using the hard disk anyway, why not?

    The caching system also plays into this, and Windows may determine that the system will be faster overall if these bits of data are cached while those bits of data are written to the page file. (See the server vs workstation defaults in My Computer properties about prioritize applications or cache).

    Are these algorithms perfect? Certainly not, but they do help, and none of it is arbitrary.

    --
    Natural != (nontoxic || beneficial)
  96. VM is slower than RAM. by Neanderthal+Ninny · · Score: 1

    Physical memory or RAM access times measured in nanoseconds and hard drive which virtual memory or paging resides access time is measured in milliseconds so physical memory is 1000 times faster than virtual memory.
    Someone can correct me if I'm wrong in Vista and most Microsoft Windows OS virtual memory is used after all physical memory is used up. Even you had the maximum physical RAM installed on your system you will need virtual memory so if for some reason physical memory runs out. Virtual memory as one advantage over physical memory, depending of the operating system, virtual memory is persistent so a power failure will most likely erase the contents of physical memory. Again, depending on the OS, this virtual memory can be recovered.

    1. Re:VM is slower than RAM. by Tony+Hoyle · · Score: 1

      Virtual memory is any memory that either doesn't really exist, or if it does, doesn't exist where you think it does. It's only partially related to paging files.. even if you delete the page file you're still using virtual memory (eg. all applications on Windows load to the same address.. obviously that can't be doing that really.. it's because they only see virtual addresses - only the OS really knows where they are).

      The page file is not persistent... in fact many secure systems encrypt it with a random key that changes each boot so you can't recover from it. You're confusing with the hibernation file - which on some early OSs was done using swap (hence the old idea of swap = 2x RAM so you had enough space to dump the entire core into it).

      It's not true that you don't use it until all the memory is used up - that would be a poor algorithm. You either use is when a certain percentage is used up (ie. you run the risk of not being able to respond to a sudden demand for memory, so you clear some just in case), or you agressively swap out things that haven't been accessed for a certain time (this is what Windows does).

  97. all desktop operating systema are rubbish by MarkH · · Score: 1

    If you are running a bog standard desktop or laptop you probably have some basic requirement
    * when I turn up at my computer after having a cup of coffee and hit slashdot.org into firefox I expect it to launch straight away
    * when I shutdown my computer I expect it to happen instantly
    * when I start up my computer I expect it to happen instantly
    * when I save my music/words/picture I expect it to be reliable and nothing my computer will do after I save my file will affect it
    * under no circumstance will my mouse, keyboard or icons on desktop not perform to my actions - I want no hang.

    This is not the fault of disk swapping it is just an example about how 5 utterly straightforward requirements have not been addressed in over 20 years of desktop development.

    First OS which has this gets my vote

    1. Re:all desktop operating systema are rubbish by dbIII · · Score: 1
      Buy the man an eeepc (in a year or two).

      Things are getting close to those ideals after a frustrating decade when they were getting furthur away.

  98. An analogy many will understand by billcopc · · Score: 1

    Here's an analogy I find quite fitting, but first of all let's clear it up: the OP is asking about "swap space", which Windows calls "Virtual Memory".

    Think of your computer as a bank, the Ram as money, applications as clients. Swap space is credit.

    You might lend out 5 times more credit than you have actual money, and as long as your clients don't all claim it at once, you're fine. This way, each client can "have" a ton of money at their disposal, if and when they need it.

    Well swap space is a way to "lend" memory to a process that may or may not use it all, or may not need it at that point in time. Memory that's sitting idle gets pushed into swap, to free up real memory for another program that needs it more.

    If you disable the swap file(s) on your PC, you're basically forcing your computer to live on "cash". If one program needs 80% of your Ram, and another program needs 25%, one of them will get canned because you can't "borrow" any more memory. The potential problem with this scenario is that many programs allocate more memory than they actually need. Some developers do this for efficiency, since it's faster and simpler to reserve a big contiguous block of memory at once, rather than many small ones as needed. The rest do it because they're DeVry graduates.

    --
    -Billco, Fnarg.com
    1. Re:An analogy many will understand by Eskarel · · Score: 1
      While that's technically true, what the poster is asking isn't "What is paging and why does it exist?", but more "Why am I paging when I don't need to?".

      To use your metaphor, why would you borrow money when you have plenty of cash to do what you need to do and the interest rate on your loans is substantially higher than anything you might gain by keeping that money in the bank.

      Personally I have a rather cynical belief that all the monkeys who believe in ram defragmentation and freak out when their RAM is fully utilized for cache have essentially forced Microsoft to maintain "free" memory at pretty much any cost.

    2. Re:An analogy many will understand by billcopc · · Score: 1

      You're probably right, but I personally think we shouldn't enable those cretins. Who's the expert ? The guy writing the kernel, or the guy who can't tell the difference between Java and Javascript ?

      This is the computer version of whiny soccer moms telling their mechanic how to change an oil filter, and just the same they should all be shot.

      --
      -Billco, Fnarg.com
    3. Re:An analogy many will understand by Eskarel · · Score: 1

      That said, that doesn't mean the guy writing the kernel isn't trying to solve a problem that doesn't exist, or isn't doing things because it's the way they've always done them and he can't remember why anymore, or the code is bad, but changing it would be too much work.

      I know too many developers(and mechanics) to believe they're always right either.

      Plus with JavaFX the difference between Java and Javascript is going to get a whole lot more confusing. Yay!!

    4. Re:An analogy many will understand by billcopc · · Score: 1

      Hey, most of the developers I've known are complete imbeciles. You know, the ones who never ask questions but always have answers.

      But for some reason, I have a bit more faith in kernel developers. You can't not know what's going on when you're coding to the bare metal. I like to think that I'm a better programmer thanks to my intimate knowledge of that bare-metal environment, even though I haven't written any assembler in years. I know how memory works on a PC, and they helps me design smaller, faster, more efficient apps than the guy who's relied on garbage collection his whole life.

      --
      -Billco, Fnarg.com
  99. it's a performance improvement. by corprew · · Score: 1

    To increase performance, windows is paging to a ram disk.

    1. Re:it's a performance improvement. by Tony+Hoyle · · Score: 1

      I hope not.. paging to a ramdisk would be kinda silly.

    2. Re:it's a performance improvement. by corprew · · Score: 1

      My comment was a joke.

  100. I agree for the most part by jriskin · · Score: 1

    The problem is computer scientists think they can make algorithms that are smarter than I am.

    But I would WAY rather be told "You're out of memory, what would you like to do?" than 'Your computer will now freeze for 30 seconds while I shuffle things around'. Yes, disk cache is useful, but having a little bit is often plenty and then its diminishing returns after that.

    I always keep a visual memory meter on and more often than not I load something and realize 'oh shit, its starting to swap' and then rush to quit a few programs to minimize the damage.

    The key is *I* know which programs I'm going to use next, the OS simply 'guesses' based on usage patterns.

  101. Not so simple. by Estanislao+Mart�nez · · Score: 1

    There's a problem you're not seeing: the logic for swapping out cold memory pages assumes that the goal is to maximize application throughput, at the potential cost of latency when doing large context or workload switches. The approach makes the applications that are currently running optimally fast, at the cost of making it costly for an idle application to become active again.

    This is excellent for some kinds of workloads, but bad for user interaction, where latency of task switching is more important than maximum throughput. When I click on a minimized application window, I want that application to be ready to run instantly. That's more important to most users than having an occasional computationally intensive task take 3 minutes instead of 5--I can find something to do during those 5 minutes.

    1. Re:Not so simple. by ivan256 · · Score: 1

      Computationally intensive? Has more to do with IO intensive tasks...

      Odds are that page you're not using, and haven't used for a while, isn't going to be used again for another long while.

      You're right that choosing which pages to swap out could be made into a very difficult task indeed, but the the problem is really as simple as I initially stated.

      In this case, Windows could relatively simply detect that the entire system was idle, and not count that time towards individual pages being idle... Or it could not swap out idle pages if there's no demand for disk cache... Either way would solve the problem of walking away from your system for a few hours and coming back to everything being swapped out.

      the logic for swapping out cold memory pages assumes that the goal is to maximize application throughput, at the potential cost of latency when doing large context or workload switches

      That's not strictly true.

  102. Re:Vista reserves 1 GB by mseidl · · Score: 1

    You can, but usage shows that even with 2gb of ram and no pagefile vista becomes very unstable.

  103. Re:Vista reserves 1 GB by obeythefist · · Score: 1

    Dumb question, but this is a Microsoft product we are talking about, and not one of the better ones... how do you know it hasn't gone behind your back and created a pagefile somewhere?

    --
    I am government man, come from the government. The government has sent me. -- G.I.R.
  104. Re:I don't know about Vista's paging implementatio by plasmacutter · · Score: 1

    Concerning yourself too much with the numbers only can be a bad thing.

    stop attacking my poor numbers! what did they ever do to you?

    he's not attacking them you tinfoil hatted loon! he's NEGLECTING THEM! They would kill their first born for attention, even if it means being attacked!

    --
    VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
  105. Way back when..... by Ancient_Hacker · · Score: 1

    Way back when memory was $1 a byte, and all programs ran in batch mode overnight, it seemed a super idea to make disk look like memory. The idea being that there was always more time, but lots of people could not afford another 64k bytes of real memory. It also let IBM sell a whole new set of very expensive CPU's and memory mapping boxes.

    Now today when memory is about a million times cheaper and we expect millisecond response times, those thirty years of computer science and marketing are just an ancient millstone around our necks. Unfortunately everyone just expects to have unlimited, although stuttering, memory. Soo many programs read in a whole file into memory, then build a tree of it all, in memory, and they wonder why the disk light is on all the time.

    Folks, it's not 1968 anymore. Go out and buy a 64-bit address space mother board for $55, splurge and buy as much REAL memory as you can afford, turn off the virtual memory backing file, and enjoy reliable memory that's all 3 nanoseconds away.

  106. Hello Noob by Orion+Blastar · · Score: 1

    welcome to computer science. There are two types of memory, primary memory and secondary memory.

    Primary memory are RAM chips, Random Access Memory, the computer uses them as a temporary storage to run the operating system and programs within it.

    The secondary memory are such devices as hard drives, USB drives, SD flash memory cards, etc. When something is saved to secondary memory it is permanent unless it is deleted later.

    When an operating system runs out of primary memory it has a backup called virtual memory by caching out data from primary memory to secondary memory, mostly things not recently used.

    Even though you have 4 gigs of RAM in your system, it might not be enough if the operating system has over 4 gigs of data it is processing. Eventually you'd need virtual memory. Even Bill Gates was wrong in the 1980's when he said 640K ought to be enough for anybody, because the people who did graphic photo work needed megabytes of memory just to hold a photograph in memory at the time.

    If there was no virtual memory on your Vista computer you'd get "out of memory" errors that used to be quite common on 1970's and 1980's 8 bit computers that had less than 64K of RAM. My old Timex/Sinclair 1000 had 4K of RAM and that 16K add-on pack didn't always connect right so my BASIC programs always got the "out of memory" errors. Back there there was no such thing as hard drives and the T/S 1000 only used a cassette tape and not a hard drive for secondary storage. For some reason the quality of the Sinclair computers in the USA were not as good as in the UK as they teamed up with Timex and had poor quality and Atari and Commodore beat them in the USA while in the UK the Sinclair series got Sir Sinclair Knighted.

    But your question is quite funny in a way, as it shows your ignorance of how a computer works, and shows how low in quality Slashdot's article publish system has become. Computer Science 101 can easily answer your question. But then there are no such thing as stupid questions, only stupid people, whom the US Philosopher Ron White says cannot be fixed, but I disagree that they can be educated to be smarter.

    --
    Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
    1. Re:Hello Noob by Tony+Hoyle · · Score: 1

      Except it's simply not true any more. If you've got 4GB of RAM the chances of getting an out of memory on normal loads is pretty minimal. Entire servers these days run without any swap.

      Never heard the term secondary memory used in CS.. in fact it sounds like a confusion of terms, becuase you look like you've confused backing store with the paging file. It may be the way you were taught, but it's wise to keep the distinction. Also not all paging files are permanent - you can page to slow memory (like CMOS RAM) which will still lose its data when powered off - although I don't believe this is commonly done any more.

      In an industry which changes almost daily asking slashdot is probably a good thing to do... one of the reasons there are no stupid questions is the answer isn't always as obvious as it first appears.

    2. Re:Hello Noob by Anonymous Coward · · Score: 0

      But your question is quite funny in a way, as it shows your ignorance of how a computer works, and shows how low in quality Slashdot's article publish system has become. Computer Science 101 can easily answer your question.

      Except that Computer Science 101 does not answer the question. Your funny distinction between primary and secondary memory also indicates that you may have been asleep in CS101.

      If there was no virtual memory on your Vista computer you'd get "out of memory" errors that used to be quite common on 1970's and 1980's 8 bit computers that had less than 64K of RAM.

      Why? Are you psychic now? I have no swap file (or partition) on several of my machines. I've never seen an "out of memory" error on any of them.

      But your question is quite funny in a way, as it shows your ignorance of how a computer works

      I don't think the question showed that at all. I could also say that you reply shows the same thing. Does it? I dunno. The question is actually quite a good one, and your generic rant is quite misguided.

      ...and shows how low in quality Slashdot's article publish system has become.

      Not to mention the comments.

    3. Re:Hello Noob by Corson · · Score: 1

      Even if OSes are generally designed to swap when the physical amount of memory is not enough there still must be some way to detect the maximum amount of memory available, that is, RAM + VM. So why not set that limit to the amount of RAM available? That should avoid VM usage. It seems to boil down to a design issue: if the OS expects the VM to be greater than zero then some VM is required; if not then setting VM = 0 should not be a problem. The way you put it looks like a theoretical limitation.

    4. Re:Hello Noob by sydneyfong · · Score: 1

      How, on earth, did you get that +1 karma bonus?

      God.

      welcome to computer science.

      The subject that deals with these basic concepts here was called "computer literacy" or something like that. Computer science? No. Any (real) computer scientist would laugh at your statement:

      There are two types of memory, primary memory and secondary memory.

      There are in fact, numerous types of memory, although for lay people they usually deal only with these "two types". The general rule is that the faster memory is, the more expensive (and hence less are available on a typical system). You have L1 cache, L2 cache, "main memory", and the numerous different kinds of storage devices. Of course you can label them as "primary memory", "secondary memory", but it's far from standard terminology (outside your "CS101" class), and basically a useless distinction in most situations.

      Besides, everything you wrote is basically at best the state of art in 1990s. Welcome to the new millenia. Where concepts of non-volatile RAM and diskless OSes running entirely on RAM are experimented with, and where the fact that you'd need 4GB of memory cached onto harddisk means you'll be trashing for hours means having a paging file of gigabytes simply isn't practicable.

      At any rate, your post could be written by an average high school kid who did some research on the topic. Not exactly with the quality to label somebody as a n00b.

      --
      Don't quote me on this.
    5. Re:Hello Noob by Orion+Blastar · · Score: 1

      By writing funny comments like you just replied to. :)

      Orion Blastar is my "character" account that writes comments that are meant to be funny. Like writing in a pre-21st century concept of memory and calling someone a n00b. :)

      I guess you weren't smart enough to "get it"? ;)

      In most of my comments I leave the smiley faces off and see who gets the jokes.

      --
      Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
    6. Re:Hello Noob by Orion+Blastar · · Score: 1

      Oh it has been used and is found in most encyclopedias but you are confusing computer concepts with various types and classifications of memory like L1 and L2 cache memory like a n00b would.

      You want a 4G RAM system to hit virtual memory load up several videos, edit huge pictures in Photoshop, open up as many application windows as you can until you finally hit the page file. Sure the average user just surfing the Internet and writing word processing documents and email won't hit that page file, but the above average user that loads a lot of things into memory will.

      --
      Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
    7. Re:Hello Noob by Orion+Blastar · · Score: 1

      Wikipedia says otherwise you are confusing computer concepts with types and classifications of memory like a n00b would.

      I took Comp Sci 101 in 1986, I was awake the entire time. I even graduated with honors.

      --
      Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
    8. Re:Hello Noob by Orion+Blastar · · Score: 1

      Well a form of VM is used when a computer goes into standby mode or hibernates. This is to save power, when the computer wakes up it pulls data out of the hibernation VM file into main memory.

      --
      Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
    9. Re:Hello Noob by Orion+Blastar · · Score: 1

      Also Wikipedia but I digress.

      --
      Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
    10. Re:Hello Noob by Orion+Blastar · · Score: 1

      Actually sometimes instead of out of memory errors you get blue screens or a system crash instead. Such is the curse of Windows. Unless you use a different OS that does not require as much memory like a Dumb Terminal, Thin Client, or Network Computer that stores data on a remote computer.

      --
      Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
  107. OT: by JazzLad · · Score: 4, Funny

    Perhaps set up a small ramdisk and pf to that?

    --
    "If you have nothing to hide, you have nothing to fear." - Every fascist, ever
    1. Re:OT: by Reziac · · Score: 1

      Yep, and I wonder why I didn't think of it myself, since back in the DOS era, RAMdisks were routine for a lot of similar uses. Windows must rot the brain. :)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    2. Re:OT: by Tacvek · · Score: 1

      Interestingly, at least for a short period of time, even a GNU/Linux system would have better performance with swap on a ramdisk than with no swap at all.

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
    3. Re:OT: by Reziac · · Score: 1

      I'd never heard of anyone putting the linux swap on a RAMdisk...!!

      Have heard of folks who turn it off entirely, tho.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    4. Re:OT: by Tacvek · · Score: 2, Informative

      For a short period of time, it was a really useful technique on LiveCDs if there was no swap partition on-disk, or you wanted to preserve the on-disk swap partition for forensic analysis. I'm fairly certain it has been much improved since then to the point where this does not really buy you anything. I was never aware of the technical reason for this to be true, but it clearly was some sort of inefficiency in the use of "plain" RAM, which the swap system did not suffer from.

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
    5. Re:OT: by Anonymous Coward · · Score: 0

      One of the reasons one may use Ramdisk and pagefiles on the ramdisk is if the
      computer terminal is a diskless workstation thus everything has to be in memory.

  108. Warning, paradox of slashdot law by plasmacutter · · Score: 1

    This UID and mod combination is in direct violation of the most fundamental scientific law of slashdot: UID and mod points granted are always inversely proportional.

    It does, however, exist.

    The breakdown of this fundamental law was referenced by nostradamus as the first sign of the end times, and as such I think it's time to ready my space helmet and silver broadsword.

    --
    VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
  109. A few other options by Plekto · · Score: 1

    One of the most onerous problems facing users of Windows are the 2GB per process and 4 GB total limits.(often only 3.5GB or so actually usable) This seems to be a corporate decision by Microsoft rater than an actual limitation of the hardware, as all of the modern processors will allow 38 bit addressing.

    http://en.wikipedia.org/wiki/Physical_Address_Extension

    32 vs 38 bit might not seem like a lot, but it will allow up to 64GB of ram on the OS. Note how the Windows 32 bit builds are crippled on purpose. Linux, BSD, Mac, and so on all allow it with a simple tweak($0 and a couple of minutes - bad Microsoft!) Also, most motherboards can only fit 8GB anyways. Some can fit 16, but that's it. You need special hardware to get anything approaching really large amounts of memory.

    1: Get an Acard ANS9010. MWave sells it for about $250. This is a ram based drive. Not a SSD but a real DDR2 ram disk and perfect for sticking a swap file on as well as Photoshop and other swap files. It even has a battery and a CF card slot to do on the fly backups of the device when you shut down. Better than the I-Ram as once it's off, it's off - the battery only exists to power it long enough to dump the contents to the flash drive.

    This solves the speed problems and the lack of extra memory slots on most motherboards at the same time.

    2: Another dirty $0 trick is to put the swap file on a second drive on an otherwise unused controller. I use my single IDE port for this - it's my temp storage drive and so it sees no real use. But the difference is massive. I can quit a major gaming title and be back to the desktop in under a second. My drive with the applications on it and the paging file never fight for bandwidth or time. Yes, the second drive thrashes for 1-2 minutes while it's cleaning up all of the garbage files, but I don't slow down.

    Note - Both of these together? It's astounding how fast Windows (or even Linux) runs like this.

    1. Re:A few other options by Tony+Hoyle · · Score: 1

      Technical point - Windows can do 3GB per application with the /3gb switch on boot.

      No I don't know why that isn't the default by now either...

    2. Re:A few other options by Zan+Lynx · · Score: 2, Informative

      The answer to why /PAE and /3GB are not defaults is 3rd party drivers.

      Yes, believe it or not, there are Windows drivers that believe user-space pointers and kernel-space pointers will always and forever be in the same 2GB memory spaces they have always been in.

    3. Re:A few other options by rdebath · · Score: 1

      >> No I don't know why that isn't the default by now either...

      Because windows runs out of space for it's paging tables and other system data if the amount of physical RAM is more that about 16GB (maybe 12GB if the PCI address space is large) and the /3G flag is on. Plus before it hits a hard limit it's DMA buffers are reduced, these are buffers for devices that cannot DMA to an address above 4GB. This may impact performance for cheaper devices.

      Of course some drivers can't cope with /3G but these are rather rare nowadays.

    4. Re:A few other options by drsmithy · · Score: 1

      One of the most onerous problems facing users of Windows are the 2GB per process and 4 GB total limits.(often only 3.5GB or so actually usable) This seems to be a corporate decision by Microsoft rater than an actual limitation of the hardware, as all of the modern processors will allow 38 bit addressing.

      It's an engineering decision. Lots of drivers for cheap and nasty hardware break when PAE is enabled.

      PAE can be enabled in server versions of Windows and all versions before XP. However, if you've got 4GB+ of RAM, you're better off using x64.

  110. short and simple answer by Gunstick · · Score: 1

    if you can do without a paging/swapping file/parition, then just do it.
    If at some point your system then crawls to a halt or is refusing to start processes (out of memory) then you know why that paging area is needed.

    4GB is enough? Could still be short in some circumstances.

    --
    Atari rules... ermm... ruled.
  111. Re:Vista reserves 1 GB by et764 · · Score: 1

    I think the issue really has more to do with address spaces than reserving memory, although the end result is similar. Windows (and probably most other operating systems) typically maps the lower half of the address space for the current process, while the upper half in all processes is mapped to the kernel. If you think of memory addresses as signed values, positive addresses are for user mode and negative addresses are for the kernel. If you can't address the memory, obviously you can't use it, which is where the 2GB limit comes in.

    The advantage of doing things this way is that the kernel is present in every process. This means when someone moves the mouse and triggers an interrupt, you don't have to switch to the mouse handler process to take care of the interrupt, you can do it from the context of whatever process happens to be running. It also lets you make system calls without having to fiddle around with the address space too much also.

  112. Windows swapping is brain dead by SpoddySpice · · Score: 1

    The way windows handles virtual memory is the reason why I have ran with no paging file on my home Windows XP machine (1GB RAM) for the past 5 years. Prior to this, when using multiple applications that made use of most of the available physical memory there would be considerable delays whilst the previously inactive application was paged back in despite not exceeding the available physical memory. I assume that this was paged out for disk cache in order to attempt to improve overall performance. However, consistency in response time is much more important to me than possibly having cached something. In addition, if allocated memory ever exceeds the total physical memory even by a small amount then performance became so appalling that I would prefer the application that was leaking memory to be killed than to wait for 5 minutes whilst the system swaps.

  113. Re:Vista reserves 1 GB by dmbrun · · Score: 1

    Isn't it only the server versions of XP that you can tweak userspace to 3 GB?

  114. So put it on the desktop. by Estanislao+Mart�nez · · Score: 1

    Might not be a bad idea, except that when you wanted to find it again you wouldnt have a clue.

    So put it on the desktop, and make the desktop capable of showing you the contents of your files. When your desktop gets cluttered, then you set aside 15 minutes to file away or discard the items in it.

    You might answer that many users' desktops would then get insanely cluttered; my reply to that is that many people's desks are insanely cluttered, so that's ok. The UI doesn't have to solve the user's character flaws.

  115. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    Nice! I have an HP a1140n MCE that I bumped up to 4GB with Crucial's help. System only shows 3.11GB and I couldn't get to the bottom of it.

    Thanks for that info d3vi1.

  116. Try to be precise... by pikine · · Score: 1

    Let's be careful with the notion of virtual address space and page/swap file. Virtual address space is a hardware feature that allows any physical memory to be mapped to any address seen by the program in the granularity of pages (typically 4kb), and that part is almost free thanks to TLB. Virtual address space also allows an address to be backed by no physical memory, in which case the operating system will be notified if a program tries to access that address. If there was formerly a memory page swapped out to disk, the OS brings it in (possibly swapping another page out) and continues the program. If not, the OS aborts the program. Virtual address space and page/swap file are altogether called virtual memory management.

    I could be mistaken, but I thought Windows requires each physical memory page to be backed by something on disk, either page file or memory mapped files (e.g. all executables and dlls are like that, which is why you can't remove executable files on disk when the program is still running). I think that's why the ask slashdot poster sees as much usage of "virtual memory" (here used to mean page file) as "physical memory."

    --
    I once had a signature.
    1. Re:Try to be precise... by fm6 · · Score: 1

      I could be mistaken, but I thought Windows requires each physical memory page to be backed by something on disk, either page file or memory mapped files (e.g. all executables and dlls are like that, which is why you can't remove executable files on disk when the program is still running).

      It obviously doesn't require code to be "backed up" by swap data, since you're allowed to set the swap space to zero. (Not recommended, but it does work.) I believe that memory mapping is indeed used to load executable files into RAM, but that doesn't make use of virtual memory any faster.

  117. Mark Russinovich and David Solomon covered this by compasseng · · Score: 1

    Mark Russinovich, (of sysinternals fame), did a series of videos with David Solomon, and this is one of the topics they covered. So this information comes from them and that video. I suggest everyone check it out some time, those guys probably know more about Windows than most people.

    1) No paging file == no crash dumps. Windows writes crash dumps to the paging file on the boot volume. So if you want a full memory dump, you'll need to match your paging file size to your physical memory size.

    2) Modified private virtual memory is the only memory that gets written to the paging file. Not code. Code can be read from the same place it got it from in the first place. And only memory that isn't referenced for some amount of time gets paged. So my understanding of that is even though you disable your paging file, CODE can still be "paged out".

    3) So, it's slightly more efficient to have a SMALL paging file than none at all. Some memory allocated by software may be used once then never touched again. The paging file gives Windows a place to put it, so the paging file essentially becomes write-only. Then those pages are freed up for the memory manager to use.

    4) If you're going to use a paging file, the correct size to use is the sum of the private bytes of user-space programs plus the kernel private bytes. This is known as the "commit charge" which you can see in the lower left hand size of the built-in task manager. That is the "potential page file usage", not the amount of actual paged-out memory.

    Personally, I've been running without a paging file for years without issues. Unless I need to do a crash dump analysis.

  118. Re:Vista reserves 1 GB by lbschenkel · · Score: 1

    This split is for the process address space, it has nothing to do with the actual amount of RAM in the machine. It exists so a process can go from user to kernel space and back without having to update the page tables, resulting in a faster transition.

    The only relation this split has with physical RAM is that if a process has 2 GB of address space and the computer has more free RAM than that the process cannot use it all without tricks like AWE/PAE.

  119. The real problem is the GUI by phr1 · · Score: 2, Interesting

    which is written as if it were just like any other compute task, to be scheduled as the OS sees fit (maybe with bumped up priority, but that's not enough to make sure the right thing happens). It instead has to be scheduled as a realtime task with guaranteed bounds on the response time for low-overhead user operations, which means locking stuff in RAM even at the cost of more swapping on less interactive tasks. That also means turning on realtime kernel support in systems that don't already have it active. I've thought for a while that the Linux window system should be rewritten by game programmers, who tend to have some clue about how to identify the parts of an interactive program have to be responsive, and to make those parts actually be responsive.

    1. Re:The real problem is the GUI by sowth · · Score: 1

      Realtime priority causes lockups if the program isn't written properly. Believe me, I've tried it out on several programs (the X server, mplayer, and others) with disastrous consequences.

      What you probably want is the nice value. Giving the X server say -5 or -10 does seem to help a little. Then again, what you want is immediate response, which tuning the kernel's number of timer ticks per second (CONFIG_HZ) and turning on kernel preemption helps much more. I think both are new in kernel 2.6.x. This increases overhead and possibly risk unstability, but your perceived speed will increase.

      With mplayer, back when I had the ticks per second at 100, I noticed frames would sometimes stall then skip through really fast for a split second. At higher speeds (300 or 1000) the problem disappeared.

      You may be interested in: Which is better -- the preempt patch, or the low-latency patch? Both! .... Feature: Robert Love Explains Variable HZ

  120. Re:Vista reserves 1 GB by unfunk · · Score: 1

    I think he might actually be referring to Vista's... interesting tendency to allocate ~33-50% of your physical memory upon boot.
    I have 6GB installed in my machine, and it's currently using 2.25GB to run Firefox with a handful of tabs, VLC, Windows Explorer, Winamp, and the Sidebar. God only knows how it uses that much to do so little, but I'm not fussed - it's not as if RAM is expensive these days.

    An interesting note though - I worked out a while ago that these days, you pay more per chip in a packet of potato chips than you do per megabyte of RAM. Go figure.

  121. Windows internals best described by navonodt · · Score: 1

    I find this blog the most informative of all thing windows internals http://blogs.technet.com/markrussinovich/ He explains it better that anybody

  122. Why not continue gracefully? by Anonymous Coward · · Score: 0

    In a low memory situation without paging, can't the OS reserve enough RAM to produce a pop up asking if you would like to turn on paging temporarily at least? Or even do it automatically if there is sufficient disk space?

  123. no swap space by Skapare · · Score: 1

    I run one of my Linux systems with no swap space. What I did was after calculating the most RAM I expected to need, I doubled that amount. That machine has been the most stable of all of them. I should do this more often.

    --
    now we need to go OSS in diesel cars
  124. Virtual memory can have costs in modern systems by frovingslosh · · Score: 1

    Yes, lots of the memory mapping is done by the CPU. But it still needs to be done. One important issue is if the manipulation of addresses and page tables has a cost in cycle time. Sure, this is much less than the cost of swapping pages in and out of main memory from and to a hard disk, but it's still a cost. If every single instruction (or most of them) cost extra cycles because virtual memory is being used without any valid reason to do so, then that cost adds up fast.

    I don't know of the exact timing issues in this case. It likely even depends on the processor make being used (AMD vs. Intel) and even the processor family. There may also be extra costs involved in how cache memory is dealt with. But I certainly expect that there is an overhead cost, and no real justification to doing things this way except that some programmers don't appreciate the issues involved at a low level.

    --
    I'm an American. I love this country and the freedoms that we used to have.
  125. Is DisablePagingExecutive relevant? by LesFerg · · Score: 1

    There usedta be a number of windows tweaking guides online that recommended setting the registry entry DisablePagingExecutive, which
    "Specifies whether kernel-mode drivers and kernel-mode system code can be paged to disk when not in use"

    That at least could reduce some of the paging out, but I haven't researched which O/S versions it applied to or if it is still relevant.

    Other recommendations I have seen recently suggest when you have a large amount of RAM, just create a small paging file of around 512mb, to stop certain kernel processes from spitting the dummy.

    --
    If I had a DeLorean... I would probably only drive it from time to time.
  126. Maxmem by yadaslash · · Score: 1

    With XP, I had a similar problem related to a Maxmem setting in the boot.ini. I had just added another stick of mem, but sysinfo didn't reflect it and there was major swapping. I got rid of the maxmem option, which was set by an old Matrox video driver, and all was right in the world. MS on maxmem: http://msdn.microsoft.com/en-us/library/ms791488.aspx There might be something similar in Vista.

  127. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    I've turned off a few unecessary services in Vista (DWM, Themes, Server, Security Center, etc) and got the "Memory" section of the task manager to report 271MB at the lowest, right after a reboot. This would climb to around 300MB after a full day of usage (after exiting all running programs, of course).

    So as to running Vista on less than 1GB it's very possible, as is running it on 512MB. Sure, to make it at all usable you have to turn off some un-needed features which requires a bit of skill, but it's still possible.

  128. I just disabled it on my ASUS Eee PC by Joce640k · · Score: 1

    And the boot time went from three minutes to about thirty seconds.

    It used to have about 300Mb of swap file after bootup, which is dog slow on the Eee's SSD. This is despite task manager showing 700Mb of unused RAM.

    Whatever Windows is doing, it's doing it wrong.

    Note to EeePC owners: Get a 2Gb RAM module and disable the swap file. You'll be glad you did.

    --
    No sig today...
    1. Re:I just disabled it on my ASUS Eee PC by Reziac · · Score: 2, Interesting

      My understanding is that Windows uses the pagefile primarily for single-use and rarely-used stuff, a great deal of which is read only at boot-time or when programs start up. So it can indeed "fill up" even when there's plenty of RAM left over. And you don't really want rarely-used data cluttering RAM if your RAM supply is limited.

      BUT... "rarely used" is a relative term. There is a registry setting (which I don't know off the top of my head tho I'm sure a search would find it) that forces Windows to keep all that "rarely used" OS-related stuff in RAM instead of paged out, and I gather this setting improves performance immensely -- for the same reasons as killing the pagefile entirely does (reads from disk are painfully slow compared to reads from RAM).

      As to the slow boot -- did you have the pagefile set permanent? and preferably on its own partition so it can't become fragmented? Temporary pagefile that has to be written at boot time, plus fragmented all to hell (which does nothing for stability) due to the disk being fragmented, is about the slowest/worst way to do it.

      First thing I do on any machine that's going to have a pagefile is give the nasty thing its own partition, which the user is forbidden to use for anything else. If for some reason a separate partition is impossible, I kill the pagefile and all tempfiles, defrag, then reset the pagefile at a fixed permanent size, so it won't refragment.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    2. Re:I just disabled it on my ASUS Eee PC by gullevek · · Score: 1

      I heard a rumor that the eee pc windows version can only handle 1GB ram. Urban Legend?

      --
      "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
    3. Re:I just disabled it on my ASUS Eee PC by Spad · · Score: 3, Informative

      HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management

      DisablePagingExecutive

      0 = Drivers and system code can be paged to disk as needed.

      1 = Drivers and system code must remain in physical memory.

    4. Re:I just disabled it on my ASUS Eee PC by Reziac · · Score: 1

      Thank you! That's definitely the setting I was thinking of.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    5. Re:I just disabled it on my ASUS Eee PC by Joce640k · · Score: 1

      I heard it was the Linux version which had this limit.

      It's certainly not true for Windows - I have the proof in front of me.

      --
      No sig today...
    6. Re:I just disabled it on my ASUS Eee PC by gullevek · · Score: 1

      Hehe, I heard it the other way around. That the XP installed on the eee PC is limited to one. But good to know. Now I can upgrade the memory.

      --
      "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
  129. Re:Vista reserves 1 GB by tigerhawkvok · · Score: 1

    Vista will use excess RAM to preload some bits that you might use frequently. This is particularly obvious if you upgrade your RAM from high level to higher level in Vista. My at-boot memory usage was ~30% with 4gigs installed; when I installed 8gigs, the at-boot memory usage was unchanged.

    I had more RAM, so it filled more RAM. Straightforward. I've not had any issues with its memory management.

    --
    Blog
  130. Re:Vista reserves 1 GB by The+MAZZTer · · Score: 2, Insightful

    The amount of physical memory you have has nothing to do with the 2gb|2gb split or 3gb|1gb split. You can use your full 3gb either of physical memory either way, since the virtual mappings (which is what is split) is different for each app, so two apps can each use 1.5gb of user space and take up 3gb total memory.

    The actual reason for the /3GB flag is to enable OS support for special applications which explicitly opt-in for up to 3gb of memory, usually to help boost performance (they can have a larger cache or buffer or whatever)... normal apps will still only be able to use up to 2gb because for compatibility. Apparently some apps use the highest bit of a 32-bit pointer to store a boolean, since with 2gb of user space that highest bit is always 0. Adding an extra 1gb allows that bit to be 1 which could seriously confuse the program, likely causing a crash.

    SQL Server includes support for 3GB, IIRC.

    I'm not sure if there's a downside to using 3gb (there must have been for it to be optional and hidden like that) especially since apparently Vista turns it on by default... however IIRC while each app gets it's own 2gb/3gb of userspace, kernel address space is shared between all apps, so your kernel only gets 1gb total memory. That includes all running drivers. I imagine the XP team thought it was better to allow for the total 2gb for drivers, especially since most apps couldn't take advantage of the full 3gb anyway (as I described above).

  131. Hibernate = yes, virtual memory = no, life good. by mildness · · Score: 1
    I was thrilled to have a rocket-fast system again - until I tried to hibernate my laptop. Note that the hibernation file is unrelated to the swap/paging space.

    Sorry, I have hibernation on my laptop and desktop and use it several times a day. I've also turned off "virtual memory" a long time ago.

    This runs most esceptionally on X SP3. Turn off your theme while you are at it. That is a resource hog too.

    Good luck

    Bill

    --
    bamph
  132. Switch to an OS (and CPU) without Virtual Memory? by itsybitsy · · Score: 1

    Well you could always switch to an operating system that doesn't use virtual memory. Check out http://www.minix3.org./ Sure they might add virtual memory eventually but in the meantime you'd have a system without it.

    You'd also have to use a processor chip that doesn't use virtual memory look ups. The extra hardware used to look up virtual addresses and map them to either physical or virtual (page file) pages requires a lot of extra clock cycles on each instruction the processor executes that involves loading or storing to or from memory addresses. We're talking a lot of extra cycles even for pages that are in physical memory.

    Many micro-controllers don't use virtual memory. They also have the benefit of being dirt cheap compared to Intel's and AMD's behemoths. They also consume much less power. Check out this computer: http://www.makezine/controller.

  133. Linux had the opposite problem by spitzak · · Score: 1

    I remember the frustration of using a Linux desktop in the morning. All night various things had been running and as they were loaded it swapped out the desktop programs. But then it stayed like that, because nobody was using the desktop programs.

    When you tried to use the desktop in the morning, it was *really* slow, because it now had to swap out all that stuff it had loaded, and then swap in the desktop programs. After awhile it would return to normal speed.

    I believe Windows tried to address this. They tried to get the "nightly" programs to at least write themselves out to the swap file, so that getting the desktop programs back required only 1/2 as much work (only reading them in, and not having to write out the nightly programs). Probably more significant, they keep track of the "active" process and continuously swap in that process even if it is doing nothing.

    This is all from 8 or so years ago. Nowadays Linux seems to work fine. I don't know if it is because the swapping was fixed, or because a modern machine has so much memory that the desktop programs don't get swapped out. It is also possible that some of the crap that ran at night has been eliminated. Meanwhile it does seem that Windows attempts to solve this have backfired because they cause far more swap writing than is necessary.

  134. Re:Switch to an OS (and CPU) without Virtual Memor by itsybitsy · · Score: 1
  135. good articles about Window memory model by ykliu · · Score: 2, Informative
    1. Re:good articles about Window memory model by epine · · Score: 1

      Long ago I had a subscription to the System Internals newsletter. It was fascinating to peek behind the curtains, but as Linux matured, sadly I came to regard these excellent newsletters as episodes of reality TV. It was like peering into the details of a private life that ought to remain private, for the sanity of everyone involved.

      Funny to contrast those two links by Russinovich. The first makes you think to yourself "abandon common sense, all those who enter here". In the second, he's saying "why is it that no-one preaches common sense about the size of your page file?" Eh?

      Because too much of the Windows virtual memory architecture is a ritual of waving dead chickens. An ordinary person can't keep straight in his mind which parts require a dead chicken and which parts don't, so we hew to our mimetic talismans.

      At one point he is running a contrived process to exhaust his system's commit limit, and the process explorer view of memory doesn't manage to point the finger at the flagrant transgression. So when Windows configures my pagefile limit to three times my 4GB system memory, or whatever notion it gets, I feel like it's sitting there daring me to shrink it: feel lucky, punk?

      I've known forever that it's a stupid formula relative to what a pagefile *ought* to be doing. But I don't know it is *actually* doing what it ought to be doing, unless I wish to wade into encyclopedia Russinovich, which is entertaining, but not worth a long term commit charge. For all I know, some badly coded device driver requires the pagefile to be three times larger than Walmart, for a reason no sane OS could possibly dream up.

      I also wonder about the strange neglect of the orphan memory over 4G in Windows 32.

      I understand you can't map this memory into any user process on speaking terms with a (badly coded) device driver, but why the heck can't this otherwise dormant pool of memory be used as a preferred chunk of RAM based pagefile?

      The OS kernel has complete control of page loading. It could certainly load the page as an above 4G to below 4G page copy, rather than an expensive disk operation. No badly coded device driver discombobulated as a result. Heck, a clever Northbridge might even do this on your behalf.

      Some of this is valid technical limits. Some of this is a limit of corporate will, bamboozled behind technical limits.

      Having said all that, I don't understand the original complaint.

      I run XP at work with a pretty heavy workload. I have a desktop manager with nine desktops. I have a start script that reloads most of my key applications into their assigned desktops. (Unfortunately, I haven't figured out how to get the Firefox session manager to restore windows to their previous desktops.) It takes about ten minutes for my system to settle down after a reboot. But after that, the delays associated with switching into a long idle desktop have never struck me as unbearable.

      When I have seen terrible application switching delays, it was usually on some system geared for video games, under far less non-game load than my development system at work (which is a very ordinary machine).

      Another huge culprit I've seen is background indexers which thrash the file cache. On my gf's laptop, all of the nasty delays were eventually traced to a WiFi network browser. Then there are the geniuses that run some high-end OpenGL screen saver with massive textures, who then wonder why it's all a bit sluggish when the screen saver exits.

      It's pretty rare I've seen a system where the pagefile itself was to blame for XP slowness. My experience is that XP doesn't page out excessively unless something else is pressuring it to do so. If you then disable the pagefile, that something else will be forced to run more slowly, while your main apps will remain responsive. If that something else is a passel of viri, or a posse of anti-viri, then I can see how disabling the pagefile might be perceived as progress.

  136. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    MICROSHIT VISTAIDS!

  137. Fragmentation still wastes memory. by spaceturtle · · Score: 1

    If you have a single 32 byte fragment in a 4KB page, you cannot release the page back to the OS. If you can reduce memory fragmentation by 1% you reduce the amount of memory you need to request from the OS by 1%. There is still work being done on allocators that minimize fragmentation. It is not clear how you can defragment memory after it has been allocated though. It would be very hard to safely update the pointers in a C program to point to the new memory locations after defragmentation. Possibly these memory defragmenters move around pages of virtual memory so that the kernel can allocate 8KB and larger chunks of physical memory (Kernels typically bypass VM and prefer pages that are physically adjacent). I understand that the motivation for the 4K stacks in the Linux Kernel was the difficulty in finding two adjacent free physical pages. This would be even more of an issue on Windows which apparently use 12K stacks.

    1. Re:Fragmentation still wastes memory. by qw0ntum · · Score: 1

      Right, I was referring to external fragmentation (between pages) as opposed to internal fragmentation. You are quite right though.

      --
      'Every story, if continued long enough, ends in death.' --Ernest Hemingway
    2. Re:Fragmentation still wastes memory. by ZosX · · Score: 1

      Isn't the lower limit for reasons of performance...as in less chunks to maintain and keep track of?

  138. Tsk tsk tsk. So close minded. by Valdrax · · Score: 1

    Gentle answers is what 6 years in customer support teaches you.

    That, or hating everyone ;-)

    Why can't it be both?

    --
    If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
  139. Virtual Memory vs Virtual Addressing by BaverBud · · Score: 1

    I've always disliked the usage of "Virtual Memory" to describe virtual addressing. "Memory" is an object. Virtual Memory implies an object. It is the memory presented to an application on a system that does virtual addressing. Addressing is an action. You can't say "My computer does virtual memory." It doesn't make sense. However, saying "My computer does virtual addressing" does. (And you can't really say "My computer has virtual memory", since it's not an object IMHO.)

    --
    Baver
  140. Interesting, and wrong by ratboy666 · · Score: 1

    If an application requests 3GB of memory (your example), it is expecting to do something to that memory. Fortunately (for performance reasons), its use of that memory is still in the future.

    Basically, the request can be treated as a request for an address space and a potential allocation of memory.

    The actual memory doesn't have to be supplied until the application does some with it (or, hopefully, just before). This effect can be usefully exploited to amortize the cost of paging out.

    In other words, the OS doesn't have to swap out on such an allocation.

    Of course, the actual availability of memory has to be accounted for. Linux uses this approach, with poor availability management:

    Quoting "man malloc"

    " By default, Linux follows an optimistic memory allocation strategy.
                  This means that when malloc() returns non-NULL there is no guarantee
                  that the memory really is available. This is a really bad bug. In
                  case it turns out that the system is out of memory, one or more pro-
                  cesses will be killed by the infamous OOM killer. In case Linux is
                  employed under circumstances where it would be less desirable to sud-
                  denly lose some randomly picked processes, and moreover the kernel ver-
                  sion is sufficiently recent, one can switch off this overcommitting
                  behavior using a command like:

                            # echo 2 > /proc/sys/vm/overcommit_memory
    "

    --
    Just another "Cubible(sic) Joe" 2 17 3061
    1. Re:Interesting, and wrong by jellomizer · · Score: 1

      I wasn't trying to explain any particular approach of how any OS does memory management. Different OS's do different methods. When I mean allocate I mean it in the old sense of the term of reserving the space and filling it with data. thus causing a need for paging. When talking computer science theory of these concepts you shouldn't get tied up to the hacks and tricks that real life has done to push the speed up.
      The theory is correct and you can create conditions that force the OS to act in that way. I am not paging expert but the question of the article why is Virtual memory need with todays systems with a lot of RAM which I feel I correcly answered. Just because Linux or Windows does it better then my simple theory is besides the point because what happens if you actually use all that memory .

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Interesting, and wrong by ratboy666 · · Score: 1

      But its NOT a trick. Indeed, you just used the words "reserving memory".

      Imagine a restaurant. You make a reservation for (say) 9pm. The table is yours then, but not now. The restaurant can use the same table for an early seating, or, if already occupied, doesn't have to evict the current diners.

      Rplace table/diners with physical memory. Replace reservation with virtual address space.

      If I understand your original argument, you are arguing for paging to disk, in order to maximize RAM usage. I believe you even argued that aggressive paging was good. I am indicating that the time required for paging (i/o) is significant, and can slow user processing for little to no gain. Effective paging is not paging, unless it is really needed. The goal for an effective paging routine is to exploit ideas like the above to make paging less painful if it is needed.

      Why load code and not use it? It costs [disk time] to load code, not [memory time]. If code IS used, will it not be used again? Look at Vista -- trying to predict WHEN a program will be loaded, in an effort to amortize the time (the same idea as the paging above, but sort of in reverse). Same idea with other preload schemes.

      Look at the Unix "sticky" attribute.

      As to paging to disk -- a big idea is that code can be "paged out" WITHOUT writing. After all, the code pages are in the original executable file. Saves the writing! That is "good paging". The actual physical memory doesn't need to be touched UNTIL the application actually writes to it. Which means that physical memory can be both "held in reserve" and "in use for a purpose" AT THE SAME TIME (it is code RIGHT NOW, but if the other application issues a WRITE, it becomes data after an exception -- note that no disk i/o occurs at all).

      I was just pointing out that a "(exclusively) keep x amount of memory for potential use" scheme is very naive, and can even be considered wrong. A good pager will accommodate these ideas (and more). Consider: EVEN if the policy were to keep an amount of memory "in reserve", why couldn't that memory keep programs that have been recently used? Better, programs that (hopefully) WILL be used? (following the model of Vista). The most effective use of memory would be to 0 (zero) bytes NOT in use at any time, and have memory to give to applications on an on-demand basis. THAT is what we are aiming for.

      But -- it does make it difficult to answer the question "how much memory do I have?". It is also true that this question doesn't actually mean much, because there is a much simpler answer to the question "How efficient is my pager?". Just pick a load, and run it with paging and without, and characterize it (time spent, and amount of i/o).

      --
      Just another "Cubible(sic) Joe" 2 17 3061
  141. Linux uses 2Q, not LRU by spaceturtle · · Score: 1

    I don't know about BSD, but Linux now uses the 2Q allocator. This means that the cache will be released shortly, unless it is accessed a second time. This should prevent updatedb etc. from forcing out all other pages out of RAM by trying to cache the entire contents of the harddisk.

  142. reminds me of someone by anacarda · · Score: 1

    At my previous work, a work colleague (new IT person in another location) had the bright idea of placing the paging file in Windows onto a RAM disk. This sounded pretty pointless to me, but yeah... maybe would work quite nice in Windows, since it does stupid things :) I try not to use Windows now, Linux seems to only use swap memory when it needs to (ie: all memory is used)...

  143. Seymour Cray said it best by haeger · · Score: 1

    How about a quote from Seymour Cray?

    "Virtual memory leads to virtual performance."

    Seeing how he managed to build the fastest computers I'd say he had a point.

    .haeger

    --
    You are not entitled to your opinion. You are entitled to your informed opinion. -- Harlan Ellison
    1. Re:Seymour Cray said it best by Anonymous Coward · · Score: 0

      Also attributed to Cray, though I do not know if the attribution is accurate:

      "Memory is like orgasm. You can fake it, but it's better when you don't have to."

      RAM speeds are measured in nanoseconds, disk access times were in milliseconds last I looked.

      Therefore any VM system that's badly designed, or just designed based on the wrong load assumptions for your use, or overloaded will perform appalingly,

  144. Re: dictate swap file behaviour by An+anonymous+Frank · · Score: 1

    system.ini:
    [386Enh]
    ConservativeSwapfileUsage=1

    Use this on WinXP to have it drop it's insecurities, and use paging only when it actually needs to.

  145. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    > In Vista the split for 3G/1G of RAM is default.

    Wrong, 32bit Vista is still 2/2 by default. The system needs to be booted with a specific switch, to enable the 3/1 split, which was only intended for server class apps that do most of their own caching etc (e.g. SQL Server).

    Note that in 64bit Vista, 32bit processes can use all 4GB of (32 bit) VA.

  146. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    No offense intended, but you need to do some reading.

    > Windows XP, by default, the userspace (ring3) will have at most 2 GB of the physical RAM

    Wrong. The split you refer to (2GB kernel, 2GB user) is VIRTUAL ADDRESS SPACE, not physical memory. There is no fixed allocation of physical memory between user/kernel...!

    The upper 2GB of the 32bit address range is always the kernel, the lower 2GB is mapped to whatever user mode process is currently executing.

    > In Vista the split for 3G/1G of RAM is default.

    Wrong. The VA split in Vista 32 is still 2/2. It can be booted to run as 3/1, intended for server class apps that manage their own caches (e.g. SQL server) and want maximum VA space, and are marked as such in the .exe header.

    Note that Vista 64 bit allows 32 bit user mode processes a full 4GB of VA space.

    > Actually on a system with 4G of RAM running in 32bit mode, you can't use all of them even if you try (in Windows XP),

    Ok, now you're talking about PHYSICAL memory, and this is not a Windows limitation.

  147. HMO FTW by Tensor · · Score: 1

    Go work in an HMO and then call me to talk about scrapings of the gene pool ...

    1. Re:HMO FTW by strikeleader · · Score: 1

      Are you referring to the upper management? You know, the one's that have very large salaries and deny basic services.

  148. problem is apps, not page cache by Chirs · · Score: 1

    The problem here isn't the page cache, but applications that don't properly tell the kernel that the data they're reading in from disk are not going to be used again and so shouldn't be cached.

    It's amazing how many programmers still don't know about madvise().

  149. Re: dictate swap file behaviour by Whiteox · · Score: 1

    Not for XP only older WinX
    XP doesn't need or use system.ini or win.ini

    --
    Don't be apathetic. Procrastinate!
  150. Life without paging by Animats · · Score: 2, Informative

    QNX, the real-time operating system, does not page to disk. (Not for most processes, anyway. Read on.) The GUI has a bar in the lower right hand corner which shows how much memory is in use; if memory fills up, processes have requests for more memory rejected.

    The big advantage of this is consistent performance. Hard real time works. There are no pauses waiting for the disk. This is what you want for entertainment applications, like video players, audio players, and games.

    It's possible to set up paging for specific programs, though. GCC has paging, so that huge programs can be compiled, somewhat slowly, on smaller systems. By default, though, paging is not used. Provided that applications aren't bloatware, this works quite well.

    It's something to think about for Linux. Should programs be paged by default? Maybe that era is over.

    1. Re:Life without paging by vadim_t · · Score: 1

      Well, I don't have a "normal" usage pattern, but yes, for me it's needed.

      IDE + several VMs + many web browsers + compile -j2 makes my RAM usage such that I had to upgrade from 4 to 8GB RAM, and still managed to bring my box to a halt due to too much swapping once.

      Swapping works so long it's not excessive. Have an unused IDE paged to disk so that I can open a web browser is somewhat better than forcing me to shut it down and reopen later. The problems begin when something really wants 7GB RAM, and 4 is all that's available.

  151. NOT Even "Virtual" Memory in Windows (USE IT!) by IBitOBear · · Score: 1

    Okay, all the digs asside, the windows paging file isn't actually "real" virtual memory in the Unix/SunOS/FreeBSD/Linux/Real-Operating-System.

    Let me explain...

    In most "real operating systems" (e.g. modern, shared, multiprocessing, virtual memory supporting, etc) the virtual memory system has "nothing" to do with paging or swapping memory out to disk per-se. In these systems each process in the system lives in its own (usually identical) separate memory space. In this space an particular address, say five (5) is typically private to the process and may be at any physical address in electrical memory.

    The fact that it may be anywhere includes the fact that it may be nowhere in electrical memory at all. That's where paging and swapping come in, the pages that haven't been used lately, and which may not be used at all can be copied out to slower storage.

    Even more important, a virtual address that has never been used (yet) then they memory may never exist. So even if you never page/swap a single lick of memory, they could have allocate huge memory regions they intend to fill later. The total amount of memory allocated but not used in all the process could even exceed the total physical and available paging/swapping memory. This is called "over-committing memory".

    Its important and cool and vital, but this _isn't_ what really happens in windows.

    In windows the processes don't (necessarily) live in their own separate spaces. More importantly every element of the process is a "relocatable" image element. EXE, DLL, FOT, CPL and all those other "file types" are actually variants of the EXE format. And in all these formats there are a whole bunch of places in each file where, when it is loaded into the "virtual memory" the executable text and data references have to be "fixed up". This is so that a compiler can make all the DLLs (etc) the same way, but they can be loaded into the process memory "wherever the code will fit." (That's oversimplified but true enough for this explanation.)

    So anyway, in a "real" os, the process definition (e.g. the theoretical model of how the process will exist in memory) makes it possible for the image of the program elements in the process (executable) text files to be "final". That is, the process elements dont need fixing up.

    The benefit of this in a real environment is that pages of the program that aren't being used can be "forgotten" for free. If the process needs that piece of the program file it can just read it back in. (This is also why you cannot replace a running program without getting "text file busy" etc.)

    But windows cannot "forget" a page of text for free because if it needs it again, it will have to rerun the fixup step, which may involve re-fixing up the entire process image.

    So what happens in Windows is that After the fixups, the fixed up image is written to the pagefile immediately. This is why you will _always_ see windows using the pagefile. This is also why windows will tell you that the "maximum page file size" is slightly less than half the physical memory. Any one cell/page in the pagefile exactly maps to one location of physical memory. Then, after that, windows can afford to replace one (and only one) physical memory page with alternate contents.

    So why must you _always_ use it?

    Because if you _don't_ use the windows page file, the kernel cannot overcommit memory for processes.

    See most windows programmers, by default, don't know how to tell the compier and library how _not_ to ask for huge virtual memory layouts. So without the assurance of overcommit windows will kneecap itself and prevent you from running programs that you could otherwise run because most of that overcommitted memory will never be used.

    This is because there isn't an operating system on the planet that can create memory or swap space out of thin air. In linux process can be killed and process text can be dropped and overcommit can be marshaled. In windows there are none of these last-resort options (practical

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  152. That's about how much REAL Memory you are using by rdebath · · Score: 2, Informative

    If you consider the "REAL" memory to be that stuff that's normally labeled "cache".

    Example this Athlon 64 had 1MB of physical memory on the CPU divided into "pages" of 8 bytes. If your working set is less than a megabyte you will be running entirely from this memory and running very very fast.

    As soon as you start 'paging out' to the so called "main memory" your performance takes a dive.

    The only differences between this and the level normally mentioned are speed, size and the fact that this level is usually controlled completely by the hardware.

  153. Re:... everyone is very good at something. by macraig · · Score: 4, Insightful

    Ummm... no. There are a statistically significant number of humans who aren't notably good at anything. I have unhappily encountered too many of them, both in and out of tech work. This is akin to actually believing that "all men are created equal" merely because it would be really really neat and make you feel all warm-and-fuzzy inside if it were true.

    Even if your pollyanna perspective was true, being competent at some task doesn't directly equate with an absence of dumbassery. There are numerous species of "dumb" creatures that can be trained to memorize some task and then mimic (repeat) it perfectly ad nauseum... including H. sapiens. An ability to memorize and mimic doesn't equate directly with intelligence. It's a precursor, a prerequisite, perhaps, but not the Real McCoy.

    A shocking number of humans, including many regarded as "average" by testing standards, never actually reach a state of true intelligence. Too many of them are profoundly ignorant and quite determined to remain that way.

  154. Re:Vista reserves 1 GB by dmitriy · · Score: 1

    Who modded parent up? Totally misleading.

    Windows /3GB switch controls amount of virtual memory available to a process. Not physical. Virtual. The rest of virtual memory space goes to OS. Low memory (2 or 3 GB) is user process visible (ring3) memory. The upper 2 or 1 GB are ring0 memory. No need to change memory mapping (no need to flush TLB) on a simple syscall that goes back to the same process. Linux does the same thing. [OSX prefers to give userland 4GB virtual memory]

    The fact you need /3GB switch illustrates that there are applications that need more than 2GB of virtual space per process. What if you run a number of these apps? Does 4GB look like a lot of memory now?

    In fact, Crysis on 64bit Vista with very high settings and res can start swapping to disk because it outgrows 4GB. This is a single app plus graphics drivers.

    And, the #1 reason to have virtual memory: memory-mapped files.

  155. Re:Vista reserves 1 GB by dmitriy · · Score: 1

    Extra extra: the reason 32-bit XP-SP2|Vista limit address space to 4GB (that is, PCI space combined with memory) is because they don't trust driver writers to do the right thing when DMA buffers straddle 4G boundary.

  156. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    The 2GB limit is not physical ram, it is virtual address space. Each 32-bit usermode process has its own 2GB of virtual address space, which could be backed by physical RAM. The kernel's 2GB virtual address space is static across all processes.

  157. Good article on Windows physical memory addressing by WebManWalking · · Score: 1

    You may not like that this article isn't flattering to Windows AT ALL, but it does reveal physical memory addressability limits, which may help your understanding of the problems: http://www.appleinsider.com/articles/08/09/03/road_to_mac_os_x_snow_leopard_64_bits_santa_rosa_and_the_great_pc_swindle.html

  158. 'nuf said by Anonymous Coward · · Score: 0

    Encrypted swap

  159. Reading your post made me sad by Sits · · Score: 1

    This is totally off-topic but can you tell me whether you came into contact with the top parts of humanity through your work in emergency services too? Is it just the proportions of the parts of humanity that you are likely to come into contact that changes compared to desk jobs?

  160. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    You have this a bit confused. Let me try to explain it. On 32-bit Windows a virtual memory address is 32 bits allowing you to address up to 4GB. By default, all 32bit Windows systems split the virtual address space evenly. So 2GB of virtual address space is reserved for kernel and 2 GB for user mode. For some applications, like databases, it may be necessary to allocate more virtual memory space to user mode and less to kernel mode. The 3GB switch was created for this scenario. When using it, kernel mode will get 1 GB of virtual address space and user mode will get 3 GB. But it is important to note that this is all related to virtual memory, it doesn't matter how much physical memory (e.g. RAM) you have.

    Now as far as physical memory there are separate issues. Again, on 32 bit systems, you can normally only reference 4 GB of virtual memory unless you have some extension mechanism like PAE. You are correct in that some people are seeing Windows reporting ~3 GB of physical memory when they have 4 GB installed. You are correct in stating that this can be because hardware installed on the system has reserved the physical memory (video cards are common for this) or it can be because of BIOS or other system limitations.

    Of course, on 64 bit the limitations on physical/virtual memory are much more relaxed.

  161. Why swap? by nikanth · · Score: 1

    The topic should be why swap? On Linux you can run without swap! Don't use outdated OS ;)

  162. Depends on whether you have different types of RAM by Sits · · Score: 3, Informative

    If you have caches of a size smaller than your real RAM, the order in which you try to access memory really CAN make a difference because cache is many times faster than regular RAM and will try and do things like speculative readahead. If what you are working with is already in the cache by the time you request it then you won't stall for as long.

    If you are forever causing the cache to become flushed and forcing the cache to be refilled with a different contents (perhaps because you are causing a large number of random memory access and the cache's readahead is getting your future access wrong so it has to be turned off) then performance will by comparison be slower than a sequential memory access workload.

    The above is of course a gross simplification (and doesn't apply if what you are reading fits entirely within cache and is already there). If you have the technical chops you can read more about how order of access can have an impact on speed in Ulrich Drepper's what every programmer should know about memory on LWN.

  163. Re:Vista reserves 1 GB by TailGunner · · Score: 0

    I've run Vista on less than 1GB (512MB) and it ran fine. Vista used 800MBs on your system, because vista adjusts its memory usage based on how much memory is in the system. I think I had 400MBs used on the 512MB system, enough for simple IE sessions and a little quicken which is all the client required.

  164. Or in retail... by rubypossum · · Score: 1

    Once upon a time I worked as a salesman at Sears. Anyway, I had a guy storm out of the store because I refused to discount a television if he didn't take the remote. This was in the late 90's by the way, not the late 70s.

    --
    I have a theory that the truth is never told during the nine-to-five hours. - Hunter S. Thompson
  165. Re:Vista reserves 1 GB by shutdown+-p+now · · Score: 1

    Here is the blog post by Mark Russinovich which explains the issue with 4Gb on 32-bit Windows in more detail.

  166. There is a downside to no page file by Toreo+asesino · · Score: 1

    in that programs that are essentially sleeping; checking for mail or somesuch task (and there's quite a few) have to stay resident in physical memory.

    That sounds ok at first, but it's often better to page them out as they're rarely doing anything so the memory they use is better off used for caching or something like that.

    Windows is pretty good at side-lining such programs so it can give processor active processes more physical memory to play with, which ultimately speeds up your machine.

    --
    throw new NoSignatureException();
    1. Re:There is a downside to no page file by swilver · · Score: 1

      Actually... no.

      It can potentially speed up your machine, because, like all caching algorithms, the decision to cache or not cache something is just a best guess.

      Also, caching only brings benefits when data is used more than once. This is especially important. So.. for example, copying a large file once will not benefit from caching. Copying an entire disk multiple times (assuming the disk size is greater than your physical memory), will never benefit from caching (ignoring stuff like read-ahead). Scanning your entire disk for virii won't benefit from caching either...

      Yet all of those things will contend with your active programs for that precious physical memory. If you ever wondered why stuff is slower than normal and doesn't work instantly when you come back to your PC (after leaving it running for a night for example), the reason is that Windows thought it would be a good idea to waste physical memory to improve performance WHEN YOU WEREN'T EVEN THERE! Only to annoy you with sluggish performance when you DO want to do something... Me, I don't care about performance when I'm not at the keyboard... but when I'm back, I expect everything to work the way I left it.

  167. swappiness=0 is NOT swapoff -a by phr1 · · Score: 1

    I am runnning swappiness=0 right now, and some stuff got swapped out when I copied a few dozen GB of files from one disk to another.

  168. Paging a true story. by upuv · · Score: 1

    When called into help a particular company with it's IIS web systems I was able to bring the site back to life by doing a few simple things.

    Of 20 Load balanced IIS servers.
    1. Buy from local shop sticks of ram for 2 of the box's bringing total ram to 3Gig.
    2. Disabling the Page file.
    3. Only load balance the site to those 2 box's.
    4. Power off the other 18.

    Total time to implement 6 hours.
    Site performance went from +30 sec per page to around 6 second. ( Heavy pages )

    Biggest challenge convincing the architects and management that less was more even after implementation. They simply didn't believe it even after it was working in production.

    2 Days after I left they undid what I did for them. The site now sucks again. Apparently I bruised some ego's and that couldn't stand.

    Oh well. Some people will never learn.

  169. Not just about virtual memory by noppy · · Score: 1

    Dont forget virtual memory also allows process isolation (aka protected mode) to happen. In 32-bit environment, each process gets its own copy of 2GB of virtual memory or 3GB if they are compiled with /3GB flag.

    x86 system are designed in this way so they could not corrupt each other accidentally. In practice, you can have any program crashing as often as it wants, without bring down the entire system.

    Also, when they say "Windows reserves 2/3GB of memory for user mode process" or "Windows reserves 1GB of memory for kernel space", it means that is the absolute upper limit for memory usage. You should read it as "each process cannot allocate more than the 2/3GB limit, trying to do so will result in 'Out of Memory' exception", rather than "That process exclusively own the 2/3GB, nobody else can use it".

    Mark has a good explanation about this. http://blogs.technet.com/markrussinovich/archive/2008/11/17/3155406.aspx

  170. The scrapings of the gene pool... by Hurricane78 · · Score: 1

    I'm intrigued... tell me more...

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  171. SSD and paging by blue_teeth · · Score: 1

    I understanding SSD has finite write capability and having paging/swap on SSD would eat away its life. How does one overcome this? Page/swap to a regular spinning disk?

    Thanks
    blue_teeth

    1. Re:SSD and paging by Hognoxious · · Score: 1

      SSD disks (or so the department of redundancy department told me) have a wear-levelling algorithm to reduce this. I suppose the problem can't be 100% eliminated, though.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  172. Re:... everyone is very good at something. by mirkob · · Score: 3, Insightful

    Ummm... no. There are a statistically significant number of humans who aren't notably good at anything.

    to be more precise a lot of people are not good at anything that we know and value, they could be good at stupid things (soccer strategy) and never know it, never make others know and certainly never apply it to something good.

    but teoretically anyone could have some bright (but unuseful/unused) capacity.

    There are numerous species of "dumb" creatures that can be trained to memorize some task and then mimic (repeat) it perfectly ad nauseum... including H. sapiens. An ability to memorize and mimic doesn't equate directly with intelligence. It's a precursor, a prerequisite, perhaps, but not the Real McCoy.

    you forget a prerequisite of intelligence evolution, THE NEED FOR IT.
    if they could live their lives in a dumb way many lazy person never try to reach an higer lever of intelligence, never ever feel their lack of it!

    A shocking number of humans, including many regarded as "average" by testing standards, never actually reach a state of true intelligence. Too many of them are profoundly ignorant and quite determined to remain that way.

    the deepnes of their ignorance is an huge problem because they never perceive their ignorance, and many of the few that perceive it refuse to believe it and assault the condition that make them feel stupid.

    that is the sad problem.

  173. Bloathware by eiapoce · · Score: 0, Troll

    I have a system with Windows Vista Ultimate (64-bit) installed on it

    If you install this bloathware then you have to expect that 4Gb is not enought...

  174. Vm guests by mccaffer · · Score: 1

    Interesting posts so far, but they all assume that the host is running on the metal. What are the recommendations for running VM guests which tend to have crap disk access speeds?
    I've turned swap off and had real performance improvements, but hell, occasionally it crashes (not a huge problem).

  175. Re:Can't hibernate - my observation by red+crab · · Score: 1

    I am using a 3.25 GB RAM machine with Windows XP on it. Was using a PF size of 2048 MB. After reading the post, i lowered it to 128 MB, well below the Windows recommended 4603 MB. To my surprise, there has been no negative effect on the system performance. The resource hungry Java apps which I use frequently in fact seem to be running much faster. As a tech support pro, I've always been recommending higher PF sizes for those running apps with large mem requirements. Seems that I got it wrong till now.

    And yes, Linux uses a much less amount of swap, almost a fraction of what Windows PF uses for running the same Java app under similar conditions on machines with identical configuration.

  176. Re:virtual address space, virtual memory, swapping by Anonymous Coward · · Score: 0

    If I remember correctly, on DEC VAX systems, there were both pagefiles and swapfiles (PAGEFILE.SYS and SWAPFILE.SYS). The difference between them was that the pagefile was for individual pages of a process's working set, whereas the swapfile was used when an entire process was moved out to disk - akin to hibernating a process. You tried to avoid getting to a point where the system started swapping rather than only paging, as everything s.l.o.w.e.d d..o..w..n t...o a c.....r.....a.....w.....l

  177. Re:Vista reserves 1 GB by TheThiefMaster · · Score: 1

    No. However last time I tried it it broke my 8800GTX, because it couldn't map 768MB of system address space to itself anymore.

  178. Virtual Memory = Physical Memory + Swap space by Zoxed · · Score: 1

    Maybe I spend too much time on *NIX, but for me:

          Virtual Memory = Physical Memory + Swap space.

    So the question should then read "Why use a swap file..."

  179. fragmentation by Anonymous Coward · · Score: 0

    RAM can get fragmented to the stage where in total there's plenty of it free, but not in a big enough single chunk to satisfy the requirements of an application.

    Using some silly numbers by way of example....

    • Start with 100 bytes of free memory
    • Allocate a block of 10 bytes...this is at address 0
    • Allocate another block of 10 bytes...this is at address 10
    • Allocate another block of 10 bytes...this is at address 20
    • You now have 70 bytes free and available for allocation
    • Release the second block of memory
    • You now have a total of 80 bytes free, one block of 70 and another one of 10.
    • Ask to allocate 75 bytes....no can do from physical memory...time to hit virtual memory
  180. Windows: experiments show it's not possible by Bozovision · · Score: 1, Interesting

    I went to a talk given at Microsoft Research, here in Cambridge, UK, a year or two ago, the theme of which was the forthcoming changes we can expect to see in operating systems.

    One of the issues that was discussed was the use of virtual memory/swapping - the technique was invented in Cambridge I think. The idea behind virtualising resources is to be able to share resources amongst competing programs. But in a world of 8GB RAM, the point was made that RAM is no longer a limited resource which needs sharing, and consequently, except for when you are running programs like simulations which need vaaaast amounts of RAM to run, virtual memory isn't needed.

    The speaker said that Microsoft had done some experimentation with turning virtual memory off on computers with large amounts of memory, but that it hadn't gone well. One problem is that some programs are written with the assumption that virtual memory is present and will be needed, so they explicitly swap pages in and out. These programs die. Unfotunately at the moment Windows is one of these.

    So, good idea in principle on a modern system running a set number of tasks, but not possible at the moment in practice.

    Jeff

    1. Re:Windows: experiments show it's not possible by krray · · Score: 1

      One problem is that some programs are written with the assumption that virtual memory is present and will be needed, so they explicitly swap pages in and out. These programs die. Unfotunately at the moment Windows is one of these.

      Alternate solution -- Take 8G and split it. 4G is real memory and the other 4G is a RAMDISK ... used for the Paging File. It's an idea out of an OLD playbook, but it can / does work... Certainly not "out of the box" though.

  181. Pride & Prejudice by tubegeek · · Score: 1

    We're way off topic here, but - try being a Math teacher some time. "Oh, I don't know how to add and subtract, my kid does that for me." WTF? Are you kidding me? So you're OK being ignorant? Gaaaaah!

    1. Re:Pride & Prejudice by Siridar · · Score: 1

      Oh yes, I realise the attitude exists outside of computers. I'm a bit of a shadetree mechanic, and after giving a friend's car a (much needed) service, I told her to keep a eye on it as, well, its got 200,000 kays on it, and it doesn't look like anybody has serviced it in a while, so hey, oil and water will probably need to be checked on.

      I asked her the other day if she checked the oil. The answer I got? "well, the little oil-can light hasn't come on like it did before, so yeah, I've checked the oil!"

      *facepalm*

  182. The question is valid - Caches aren't always good by Lemming+Mark · · Score: 1
    The article's question is by no means a silly one, despite what some people on here might think. It's a very valid and relevant concern and it has to do with some fundamental questions of OS design.

    One reason that an OS kernel will swap out even when it's not actually forced to do so is because it thinks it can get better overall performance by having something else in the memory instead. You don't have to run out of RAM, just have your OS decide there's something different that would be more useful to have quick access to. So whatever your OS is doing is a strategy that's intended to improve overall throughput in various common cases.

    I'm sure there are plenty of replies here already that point this out. I think it's worth noting, though, that optimising for overall throughput - whilst good on a server - is not necessarily best for interactive response times.

    Consider the following: every time your CPU switches between tasks, it wastes some processing power. There's an overhead that must be paid in order to do multitasking. Modern OSes interrupt tasks when a timer fires, no matter whether they're still using the CPU - this is the pre-emptive multitasking that makes our interactive experience reliable and (mostly) free of lock-ups. However, since we're interrupting tasks that could have continued to make use of the processor, we're paying a penalty in the overhead required to switch tasks at all. If we'd allowed the task to run until it was complete, or waiting for IO, we'd eliminate that overhead, since the CPU wasn't busy anyhow. We're actually wasting CPU time and therefore reducing throughput (overall work done in the system) in order to achieve a better interactive experience (amongst other things).

    Paging in order to make space for caches can be like this. The OS is looking to improve the system's overall efficiency but (depending on what's running) not necessarily the user's interactive experience. For one thing, the OS paging strategy is not even guaranteed to work - it can slow things down if it makes the wrong decision. Secondly, it's not (on a general purpose OS) optimising for interactive experience, it's a compromise between that and throughput. Potentially we're actually damaging our enduser experience by tying ourselves to algorithms that are partially designed to improve throughput on a server-style or mainframe-style workload. Sometimes you actually want to reduce throughput in order to improve user experience; where you draw the line depends on your particular job. Sometimes real-world throughput isn't hurt significantly / at all by improving your response times - the pre-emptible kernel introduced in Linux 2.6, for instance.

    Not using swap is and / or using a ramdisk is a hack that shouldn't be necessary if the OS understands and optimises perfectly for the use patterns you're interested in. OSes can't do perfectly in reality and they do a pretty good job. They could still be better, so questions like this are very relevant and are based firmly in reality.

    If the facility doesn't seem to be necessary for your usecase, do you really want it? With modern computers, often the answer is still "Yes" but it's still right to ask.

  183. Words from Mark Russinovich by Sturdy · · Score: 1
    I recently read an amazing blog by the Windows kernel master himself, Mark Russinovich.
    http://blogs.technet.com/markrussinovich/archive/2008/11/17/3155406.aspx

    Some of it blew over my head, but other bits were very interesting. In the article, he explains physical, paging, and virtual memory usage - and my favorite, the only REAL way to calculate what the size of your paging file should be! (How many opinions have you read on that one?!)

    If you're curious, here is the short version of how to calculate your needed paging file size:

    1. Open all of your normally used applications with your typical data set,
    2. Open Task Manager to the Performance tab
    3. Look at the Commit Charge (K) Limit
    4. Subtract the amount of your physical memory from this number
    5. The result is basically all you need for a paging file.

    Hope that helps! I suggest you read the rest for more info on this approach.

  184. 4gb for vista?? srsrly? by maclizard · · Score: 1

    Vista Ultimate (out of the box) is going to use a lot of memory. 4gb might not be enough here after a couple updates. Anyway, I run Ubuntu Hardy on AMD64 3300XP+ with 1gb of RAM and 5gb swap and I rarely notice any slowdown at all. The bottom line is that swap is NOT bad, if you have the disk space for swap then use it.

  185. Lack of Problem Solving skills by zildgulf · · Score: 1

    The major problem I see in my country (USA) is that much of our primary education system did not emphasize problem solving skills in the 50's, 60's, and 70's, based on my experience deal with people my age and older. I personally can't speak for anything later than that.

    I think the reason for that was that learning to problem solve requires lots of time (in teaching and practice), is not Scantron(TM) friendly (which is still used in schools around here), and even normally bright kids would rather learn how to make high scores on the SAT or ACT to get into the college of their choice and possibly a scholarship than spend oodles of time in practicing problem solving skills.

    As a result, we have tens of millions of Americans that cannot problem solve themselves out of a paper bag.

    These people were not even allowed to touch a computer back decades ago and now they are on the "innerwebs" by the millions. Many of these people had AOL but they want DSL/Cable Modem and abandoned the once "idiot-proof" domain of AOL (which hasn't been seriously broken since 7.0).

    Mathematically speaking:

    Theorem of "LOTS OF FAIL on the Internet and LOTS of frustration at the help desk"

    Let "Wide open Internet" be A;
    Let "Millions of people that are not familiar to computers" be B;
    Let "Millions of people that can't problem solve" be C;
    Let "LOTS of FAIL!" be D;

    Therefore:
    D = ABC

    Q.E.D.

  186. Re: jerks on the phone by TheLoneGundam · · Score: 1

    Maybe we need to create a Bugzilla site to track the bugs in various "releases" of the human hardware/firmware/software (hey, no one is sure ) like the guy you were "quoting". Of course, I don't think the manufacturers/developers are producing any patches so it might be futile.

  187. Don't let Frank hear you say that. by Hellburner · · Score: 3, Funny

    It's a FESTIVUS miracle.

    You insensitive clod.

    Where's my aluminum pole?

  188. virtual memory .. by rs232 · · Score: 1

    "Is there a reason why my system should even be using the virtual memory anymore"

    I've wondered that too. I recall when DOS couldn't handle extended memory, so a used it as a fake drive and ran tha apps from there ..

    --
    davecb5620@gmail.com
  189. Re:to Mikael by Anonymous Coward · · Score: 0

    Something similar happened to my phone company. Lightning struck something, which caused everyone's phones lines to stop working in the neighborhood. But they were able to reroute traffic, and had stuff working within a few hours.

    If I called (via cell phone) and someone told me I wouldn't have a land line for several days, I'd like to know why your company didn't have something like this already planned through.

    Don't blame me for paying $15 a month. That's how much your rate is. Do you expect the customer to voluntarily offer to pay more money? Ensuring you have a good recovery system planned, is your problem, not the customers.

    I'm not denying the lawyer is an idiot, but you shouldn't begrudge him because he expects your service to work as advertised. It sounds like your company has the headless chicken people in charge. Maybe if they did their job right, you would never have to hear from the idiot lawyer.

  190. What Virtual Memory Really Means by Spinlock_1977 · · Score: 2, Insightful

    Long before Windows, virtual memory was 'invented'. Given that, the term has a specific meaning. As others have mentioned, it is a method for making programs believe they have unlimited memory space, whilst sharing the actual available physical memory between numerous programs. This 'feature' has a cost - references to memory must be translated from a virtual address to a physical one, by memory management hardware (and sometimes software). Until most recently, Intel processors used a separate chip to manage this. AMD put their memory controller onboard a few years ago. In terms of memory performance, Intel lagged for the past few years because their outboard memory controller consumed extra time to do its job. Moving the controller onboard removes an electrical interface or two, thus speeding things up and generally improving efficiencies.

    The original post, I thought, was brilliant. Why are we devoting all this chip real estate (or, in the past, chips), to sharing a rare resource (memory) when that resource is no longer rare? Grant, virtual memory gives us other advantages such as ensuring one program doesn't write in the memory space of another, but surely there are other ways to do that. If we did away with virtual memory and returned to the old (ack! DOS) days of physical memory references, we could devote that chip real estate, power quota, etc to other worthwhile pursuits, like making my twitter pages load faster.

    --
    - The Kessel run is for nerf herders. I can circumnavigate the entire Central Finite Curve in a lot less than 12 parse
  191. Re:... everyone is very good at something. by Anonymous Coward · · Score: 0

    There's a difference between being stupid and ignorant. There's no shame in being ignorant. We all started out ignorant. We just have to work to overcome it. Stupid is for those that refuse to try.

  192. (GentleAnswer && HatingEveryone == TRUE); by Zero__Kelvin · · Score: 1

    Why do they have to be mutually exclusive?

    --
    Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  193. There is one thing I haven't read anyone mention.. by Anonymous Coward · · Score: 0

    And that is that, in Windows, the paging file SHOULD be as large as your total allocated memory (physical + swap) - because it contains a continously updated image of the ENTIRE virtual memory model - including whats in your physical RAM.

    This is used for situations like kernel panics (aka blue screens) to generate crash dumps... among other things...

    So my interpretation of the OP is that his computer isn't using any swap space - his paging file probably stays very close to the actual allocated RAM (I'm not sure how the update mechanism works, but I imagine it's dirty-cached writes managed by the disk controller... but I might be assigning far too much intellignce to Microsoft engineers with that assumption... but if some sort of cache is involved, one would imagine there is some amount of hysterisis between the two measurements)

  194. Ignorance and ignorance by jandersen · · Score: 1

    Ignorance is simply lack of knowledge; I think what you are griping about is stupidity; which is something people have to learn first. Look at children - nobody is more honestly ignorant than a young child; and what is it children are more than anything else? No, the answer is NOT "tender and tasty when cooked well"; they are curious. Stupidity is what you get when you believe that "curiosity killed the cat" and that sort of nonsense.

    That old guy you know, he has kept his curiosity alive; and research has shown time and again that when you keep challenging your brain, it becomes more resistant to the deterioriation that so often hits you in old age. So, if you end up one day thinking that it has become simple and easy, it is probably time to go and learn something entirely new, like Chinese or playing renaissance lute.

  195. ReadyBoost by liquidlovemonster · · Score: 1

    What are peoples experiences of Windows vista's ReadyBoost?

  196. Solid State Disks... by Anonymous Coward · · Score: 0

    Will this argument still be relevant in 2 years when everyone runs OS off of a SSD?

    1. Re:Solid State Disks... by Anonymous Coward · · Score: 0

      The current issue does not involve "page faults" related to ram vs disk swapping.

      It concerns "page faults" related to cpu instruction cache vs regular memory swaps, so this "page fault" term as utilized previously in this discussion thread is antiquated:

      "The gap between processor and memory speed continues to present a major performance bottleneck. Applications spend much of their
      time waiting because of cache and TLB misses. For example, on the Intel Itanium 2 processor, the SPEC JBB2000 1 server bench-mark spends 54% of its cycles waiting for memory. While the majority of stalls are from data access, instruction related misses such as instruction cache misses, ITLB misses, and branch mispredictions also contribute. Zorn [18] notes that Word XP, Excel Xp, and Internet Explorer have large code working sets, and that much of the latency users perceive is caused by page faults fetching code."

      link

  197. it is the way Windows operates by jgranto · · Score: 2, Insightful

    I know I am late in replying, but maybe you'll look down this far. The simple fact is, regardless of how much RAM you have, there are some things that Windows wants to page. Period. So, you really have to situations when the system pages (grossly simplified):

    1. The system is low on physical memory (RAM). This is what people USED to encounter a lot. With RAM being cheap nowadays, this happens far less. When this happens, your system will slow down a lot, and it is considered a Bad Thing(tm). The reason the system slows down is that RAM is fast and disk is slow. Paging (aka using the swapfile) is a slow process compared to RAM. Similarly, there are wasted cycles as the system determines that it has to page, so this type of virtual memory use needs to be avoided.

    2. Paging as architected. Windows, regardless of the amount of RAM, will page certain things. Even if you had 32GB of RAM, it would still page some stuff. This paging should not affect performance.

    You are experiencing paging type #2, most likely. It is possible you are thrashing your system's 4GB of memory through the use of big applications, but unlikely. If Task Manager or perfmon show lots of free physical memory, you are paging normally and should not be concerned.

    Of course, it is possible that you have an application improperly paging data, artificially causing situation #1, which would be bad, but this is unlikely. If you see lots of disk access and experience system slow-down, this is an indication something is wrong.

  198. Two answers: by octogen · · Score: 1

    Why Use Virtual Memory In Modern Systems?

    1. Every application on a modern system is running in its own virtual address space, and these virtual addresses are then mapped to (different) physical memory addresses. This is called "virtual memory".

    You are talking about swap space, not virtual memory.

    I have a system with Windows Vista Ultimate (64-bit) installed on it, and it has 4GB of RAM. However when I've been watching system performance, my system seems to divide the work between the physical RAM and the virtual memory, so I have 2GB of data in the virtual memory and another 2GB in the physical memory.

    2. Just because Windows has poor memory management doesn't mean that swap space is bad in general, or is an outdated concept.

    We are running AIX on a pSeries with 576 GB of main memory and lots of swap space, and it doesn't do this. It's a software problem - all you need is better memory management.

  199. The intended question is perfectly clear by Archtech · · Score: 1

    Not a helpful response. It is obvious the article uses "VM" to mean "page file" or whatever the Windows jargon for that is.

    I immediately understood the question, which is a simple and natural one. "Why does Windows appear to use only 2GB of the 4GB RAM available before starting to page on a large scale?" Why start using VM mapped to disk, when there is plenty of much faster RAM (apparently) going begging?

    It's typical of Slashdot that this small, and quite transparent, misuse of terminology touched off hundreds of replies arguing about tech support and how stupid users are. A good tech support person would ignore the incorrect term, answer the intended question, and only then (if it could be done tactfully) explain the difference and the importance of using exact language when asking technical questions.

    --
    I am sure that there are many other solipsists out there.
  200. answer by Anonymous Coward · · Score: 1, Informative

    Here's exactly what you're looking for:

    http://www.tomshardware.com/reviews/vista-workshop,1775-6.html

  201. thats a moot point by Anonymous Coward · · Score: 0

    because long time mac users don't really add to technical discussions, they're that stupid and so are you for even cluttering up slashdot with this useless bit of trivia.

  202. mod parent up by FiloEleven · · Score: 1

    A reasonably accurate car analogy? Is this some kind of hoax?

  203. stay nice about this? by bgd73 · · Score: 1

    I asked the same question back when 64mb was 110 bucks delivered....
      virtual is not virtual, it is a silently written wherever you or the os puts it, ready to be read as fast as any memory. the slowness of it all is the write. once written, who cares...if the functions are called very often, the writes and deletes of real memory unnecessary. To Free up the other "physical" called dynamical ram for dynamical things. Very simply answered? How much memory is used is NOT performance...and it is never a dumb question.

  204. Re:... everyone is very good at something. by FredFredrickson · · Score: 1

    The fact is, I started off very optimistic, years ago, and believed that all men were created equal. I believed that the only obstacles were people's can-do attitude.

    Years in the tech industry (specifically tech support) have definitely jaded me. I cannot help but agree with you completely! And after a while, you realize, despite your attempt to be humble about it- you can't help but realize your thoughts seem a bit conceited and elitist.

    I personally try not to be elitist, or too self involved. But it's hard to ignore the facts. There are so many people who don't have basic critial thinking skills, let alone the desire to develop them, I cannot help but start to think poorly of my fellow species.

    It's frustrating, and lonely, and annoying- all rolled into one. It's hard to relate to people in general.

    --
    Belief? Hope? Preference?The Existential Vortex
  205. Re:bad tech support? by eleuthero · · Score: 1

    In all of this, I really expected to see someone comment about bad tech support experiences as a counter to these--more than half of the people I've talked to in various tech support departments are sitting in front of a screen clicking a mouse to advance to the next problem-solving step because they themselves have no clue what they are doing. And then customer billing support is even worse!

  206. A side-thought regarding "stability" by Anonymous Coward · · Score: 0

    Let me start by saying my technical expertise ends at the boarder of self-built PCs and playing with Linux distros just enough to crash those same PCs many times. I do want to ask though, from a crash/recovery perspective doesn't the use of page files increase the OS's ability to reassemble data that would have otherwise been lost during an improper shutdown? Since that information resides on a HDD, it doesn't disappear with the loss of power like it would if stored in RAM (though again I don't have the tech experience to know whether it would be accessible on reboot).

    I ask because that big glowing power button appeals to the less computer-inclined when things start slowing down or going wrong. Since they represent the majority of users, Microsoft (and any for-profit OS developer) would want to minimize the damage their ignorance could do, right?

  207. Re:... everyone is very good at something. by belphegore · · Score: 1

    A shocking number of humans, including many regarded as "average" by testing standards, never actually reach a state of true intelligence. Too many of them are profoundly ignorant and quite determined to remain that way.

    ...and about 50% are below average.

  208. You need RamDoubler by Anonymous Coward · · Score: 0

    You need RamDoubler... Maybe even two licenses!

  209. Elections are over, forget Palin already by Anonymous Coward · · Score: 0

    I know watching Palin was traumatic, but really, with a little professional help you should be able to get over it rather quickly...

    1. Re:Elections are over, forget Palin already by macraig · · Score: 1

      Trust me, the trauma wasn't watching Palin, it was the daily gymnastics required to avoid watching Palin that were traumatic!

      (I thought your quip was funny and worth a mod, but what do I know.)

  210. Since you mention Vista, go to the horse's mouth.. by TheNetAvenger · · Score: 1

    Since you mention Vista, go to the horse's mouth..

    There are several good whitepapers on this from NT engineers at Microsoft.com.

    If you are aren't in the mood to read, go to channel9.msdn.com and look up topics on NT kernel, Vista, etc.

    There are some really good explainations about VM and specifically how NT works and what Vista does differently in contrast to XP and previous version of NT memory management.

    Do you need one, No.

    Should you have one, well it probably doesn't make much of a difference in terms of performance on Vista. Vista doesn't use or dumpt crap to the pagefile in the 'sense' that you or many people would think based on previous OS memory management schemes.

    Since you are using Vista, I would say, leave it on, as there are a few performance benefits, like speeding up hibernation, and applications that are written to 'allocate' RAM, but then dump that to the pagefile as it probably won't use it very often. (Even though memory allocation on NT is dynamic, some application developers know what they are doing and will take advantage of the pagefile to hold bitmaps or other things it seldom references, and there is no need to keep them in physical RAM, and they often don't go the extra step to check for pagefile size/presence and just assumes the system has one, as it use to be required years ago.)

    On XP turning off the pagefile can help performance, as XP uses a more conservative method to dump applications to the pagefile, but again, if you are using applications like I describe in the paragraph above, you are losing RAM that isn't used for much, so then it comes down to how much 'extra' RAM you have and if you have a chance of ever hitting the celing, which is kind of a 'duh' logical conclusion.

  211. Two words... by iliketrash · · Score: 1

    "Any thoughts on this matter or could you explain why the system is acting this way?"

    Leaky browsers.

  212. Lower limit not just for performance. by spaceturtle · · Score: 1

    The lower limit on Fragmentation? Not really. If you have a hundred more mallocs than frees, you'll have to track one hundred mallocs and perhaps another hundred chunks of free space. A smarter algorithm can use clever heuristics to avoid some fragmentation at the cost of performance, but if anything this would usually result in less chunks of free space. At the end of the day no matter how smart the algorithm or how many chunks it manages, if you allocate memory in 32bytes chunks and then free all but one 32 byte chunk from each 4K page, you'll end up with 99% fragmentation.

    1. Re:Lower limit not just for performance. by ZosX · · Score: 1

      No I meant the size page size...like the 12k you mentioned that windows uses. Is there a reason for it to not be say 1k vs the 8k and 12k linux and windows uses?

  213. Smaller stacks generally give better performance. by spaceturtle · · Score: 1

    The smaller the stack size, the easier it is to allocate memory for the stack, but also the harder it is to write drivers etc. that don't overrun the stack.

    Most allocations in a paging system are done by page. A 8k stack on x86 means that you need to find two adjacent free pages, finding two adjacent pages can be difficult. A 4K stack means that you only need to find one page, i.e. so long as there are pages free you can easily allocate a 4K stack. Thus there is little benefit to having a stack smaller than 4K, having a 1K stack would save a small amount of memory, but wouldn't make it any faster to allocate a new stack.

  214. You say potato ... by ErkDemon · · Score: 1
    So the Windows user is supposed to "know better" than to use the terminology defined in the Microsoft dialogs, the Microsoft help system, the Microsoft online help, the Microsoft technical support website, the MSDN developer network technical support materials and books, and the MS Windows technical definitions???

    Technical terms sometimes have different meanings in different contexts. Most grown-ups can deal with this. A "turtle" in the US isn't always the same as a "turtle" in the UK, and a UK "fanny" is not the same as a US "fanny". These little linguistic inconsistencies are just part of life, and anyone who's done any tinkering at all with Windows should have come across this piece of MS terminology (virtual memory, not turtles).

    And if someone doesn't have at least a passing acquaintance with the Windows settings, or with the Windows literature or technical materials (in other words, if they haven't used the product in any depth, or RTFM), then they probably oughtn't be giving out technical advice on it.

    1. Re:You say potato ... by jon3k · · Score: 2, Insightful

      Windows never says that virtual memory is a memory paging file. They have a section titled "Virtual memory" with an OPTION for the size and location of the memory paging file, which is a feature of the virtual memory subsystem. I'm sorry if you don't understand the difference, I've explained it as simply as I can.

  215. Separate pagefile partition (/hd) by ErkDemon · · Score: 1

    First thing I do on any machine that's going to have a pagefile is give the nasty thing its own partition, which the user is forbidden to use for anything else.

    Excellent advice! Another step to boost performance is to have that partition on a separate physical disk drive. Sod's Law says that the pagefile will often be most active when you're loading and saving conventional files (or launching apps), because that tends to be when things are moving into and out of memory, or when a document's edit history is being wiped. So a problem that happens is that the harddrive is being asked to read and write files to one part of the disc, while the pagefile changes are demanding that it reads and writes to a different part of the disc.

    So even if the two sets of files are individually nice and contiguous, in practice the poor HD heads spend ages scooting back and forth between one region of the disc and another, and since those seek operations are pretty slow compared to the actual data transfer, the result can be a noticeable slowdown and a noisy HD desperately thrashing the heads between the two r/w areas.

    OTOH, if both sets of data are on their own separate physical drives, then you have two independent sets of heads each smoothly doing their own thing. Potentially much faster, and you notice a marked reduction in rattly noises.

    I wouldn't be surprised if it reduced HD wear, too -- do you remember the old IBM "DeathStar" drives that could expire after a matter of months when you ran an OS on them, because they were originally designed as "streaming" media drives and couldn't cope with the heads being continually wrenched about by a constant stream of seek requests?

    1. Re:Separate pagefile partition (/hd) by Reziac · · Score: 1

      Separate HD is usually better, yep -- tho sometimes there's nowhere to install one (frex, crappy OEM machines with only one HD mount, or without adequate cooling**). Also, if your only choice in a second HD is one that's significantly slower than the main HD, that's not progress, performance-wise. Reduced wear-and-tear, tho, is probably a good point.

      I remember the "DeathStar" HDs (glass platters?? What were they thinking?!) but wasn't aware they were meant as streaming-media-only drives -- who on earth did that, in that timeframe?? IBM must have been on bad drugs that week.

      (** Someone gift me a Dell that chronically overheated. I gave the poor thing the standard cooling that any cheap clone has, and its temp dropped *40*F degrees!!)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    2. Re:Separate pagefile partition (/hd) by ErkDemon · · Score: 1
      On further reflection, I don't honestly know whether the early DeskStars were truly //designed// as media-only drives, or whether IBM decided to call them "media drives" when they realised that the drives had a tendency to damage data if you subjected them to the sort of intense local activity that you'd expect if you tried to use them to host an active OS filesystem or a swapfile.

      I remember running a diskcheck on a DeskStar, and noticing that you could make out where the partitions were, because there were a clump of red damaged sectors showing up at the locations of each partition's file allocation table. I suspect that when there was a lot of continuous "seeking" going on, warpage due to the heat buildup plus the abrupt deceleration at the end of a seek might have resulting in the heads occasionally hitting the disk surface, dunno.

      Since then I've gotten quite fond of using 2.5" laptop drives in desktop PCs. They're slower and more expensive, but they also run cooler, and you can fit more of them into a confined space, even with heatsinking and space for air circulation.

    3. Re:Separate pagefile partition (/hd) by Reziac · · Score: 1

      Very interesting about the bad sectors clustering around the partition table -- might be indicative of head crashing, especially if the bad spots tended to grow. In my experience, heat buildup tends more toward random bad sectors all over the disk (similar to what power spikes do).

      That marketing "repurposed" the poorly-designed disks seems possible... what I do wonder is how anyone *could* design a truly DUD hard disk when there's 20 years of mature tech to draw on, and AFAIK the Deskstars weren't anything groundbreaking -- other than using glass platters, or so I've understood 'em to be -- I know of a couple cases where the platter BROKE during ordinary use. Tempered glass will stand a lot of heating and cooling, but it WON'T stand up to repeated small direct impacts -- like a head crash. I'd expect that would cause small fractures on the surface.

      Using laptop drives is an interesting solution :) Not near enough disk space for the buck for me, tho I ought to put one in my Luggable (laptop? what's that?? :) as they're less shockable than regular HDs.

      My own approach to HD cooling: I always leave a vacant drive bay, or at least half an inch of space between drives, and try to have a fan blowing across or between 'em too. I like those bottom-mounted double fans, tho they won't fit in my Raidmax cases due to the shape of the drive mounts -- OTOH I like Raidmax for having 10+ drive bays AND for ensuring sufficient vent space between each HD, plus the side fan is well placed for cooling the HDs.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    4. Re:Separate pagefile partition (/hd) by ErkDemon · · Score: 1
      Yep, those dual bottom-mounted HD fans are a great problem-solver - cheap, too! :) I used to fit one to every 3.5" harddrive on principle. Trouble is, at one point I ended up with a tower PC with a total of 14 fans in, which was pretty noisy!

      My conversion to 2.5" HDs was after I'd upgraded my laptop a couple of times, so I already had a couple of spare drives kicking about, and I wanted to build a quiet "mini" PC for music. Screw a 2.5" HD to an alu plate, and screw a couple of sections of rectangular "U" alu extrusion to the sides, and you have a nice easy-to-handle heatsinked unit with no exposed circuitry, that's the same width as a standard HD, but much thinner - you can cram a LOT of those into a confined space without them getting especially warm.

      I don't think I'd ever buy a new one to use just as a separate "swapfile" drive (as you say, the "bangs per buck" aren't attractive), but since the drive wouldn't need to be high-capacity and wouldn't be holding actual user-files, there's always the option of "pre-used" drives. If a PC-servicing place has been upgrading laptops for years, and has accumulated a pile of low-capacity used 2.5" drives that nobody wants to buy, they might let you have a batch for next to nothing, dunno. The IDE adaptors might end up costing more than the actual drives.

  216. getting rid of mechanical disk cache by ErkDemon · · Score: 1
    Yeah, head-seek "thrashing" is a killer.

    If your RAM requirements go up, and its difficult to upgrade a machine, you might also try the compromise solution of plugging in a fast external memory card, and using that external volume for a fixed-size swapfile.

  217. Re:Smaller stacks generally give better performanc by ZosX · · Score: 1

    That certainly answers my question. Thanks. :)

  218. Three possible issues by WindShadow · · Score: 1

    1 - you are misinterpreting what you see, the O/S has swap (as it should) but it not using it.

    2 - you have so much stuff running (or the OS does) that the excess must be paged out to swap. This is possible with VISTA.

    3 - the OS is just doing a bad job handling memory. I don't see anything like this on Linux, so it's not a feature of "modern operating systems" but may be a feature of a legacy system like VISTA.

  219. Re:Depends on whether you have different types of by Anonymous Coward · · Score: 0

    Locality of reference helps caching at the L2-cacheline size and below. So about 128 bytes. Now the virtual address can't change because that would mess up all the pointers, so you can only change the virtual address translation table... which is at a granularity of 4KB or so. Not gonna help with caching issues. Plus, just cramming all used memory together wouldn't be good anyway, sometimes it's a good idea to leave gaps to prevent false sharing (because only one core can be using a particular cacheline at once).

    But usually memory fragmentation means fragmentation of heaps which are used by memory management components of most programming languages' runtime libraries. That's a different issue entirely, there's no speed advantage gained by the memory being sequential but it allows the programmer to use array indexing and pointer arithmetic.

  220. Just set swapiness to 0. by Anonymous Coward · · Score: 0

    Oh, yeah....

  221. Re:Vista reserves 1 GB by Anonymous Coward · · Score: 0

    I have tried this and it greatly hindered performance with a 4g ram setup using vista hp 64, therefore you are busted.

  222. Current memory allocator still has problems by Sits · · Score: 1

    Basically the current kernel memory allocator does not typically stop long idle memory being swapped out to make room for pagecache in the updatedb case (you can see the the Linux swap problem being discussed back in 2004 when the allocator had already been set). The classic "OpenOffice left overnight is swapped out by early morning updatedb run" problem is still here (because OOo memory has been idle for so long).

    While there is an madvise option to make mmaped memory dodge the page cache there is a need for more. As recently as 2007 there have been attempt to try and let userspace warn the kernel that what it is going to do shouldn't stay in the pagecache, but it's unclear how far it progressed. The current solution seems to be "don't run updatedb".

  223. Funny... by Terrorwrist · · Score: 0

    Half of the slashdotters on this topic are talking things way off topic.. You all are insensitive clods! ;)

  224. Compatibility by JSBiff · · Score: 1

    I didn't respond to most of these responses right away, as I wanted to think some more on the issue based on everyone's replies. Not sure if anyone will ever see this at this point, but here goes. . .

    "what's the issue with simply saving the undo data, along with each revision".

    If you can do that in a 'metadata' block in the filesystem, seperately from the actual file data, fine. But a text file does not have any concept of a journal of changes. If you create a new file format with that info, fine, but that is no longer a text file. So, you do have the issue of making sure that files remain the basic data that they are. Notepad, as our example, is designed to work with text files. Most other data file formats do not have the ability to save undo data in them (perhaps doc or odf do?).

    Also, what if I am using a USB flash drive formatted with FAT32 or NTFS? Those don't support that, so I would still need the 'old style' save capability.

    In fact, I would argue that for the most part, any type of functionality like this would have to be implemented at the O/S filesystem level, not the application level, although the applications *also* need to be changed so that if they detect a filesystem that supports this, they start auto-saving or continuous saving, but revert back to 'traditional' behavior when using a 'legacy' filesystem.

    The biggest roadblock to this is that it requires every (well, most, anyhow) application to be updated to be compatible, before you start to see the advantages. That is, you need first the filesystem to be changed (to support the seperate-from-the-file-data change journal), then additionally the apps. Any 'legacy' application could still potentially interrupt your system reboot even with this new capability.

    Do I think auto-versioning filesystems are a good idea? Heck yeah. But I'm not sure that applications having a 'save' button is really that big a deal, to worry about updating thousands of applications to get rid of it. Also, you still need to decide what directory/volume to save the file to, somewhere. Maybe when you first create a new document, before you type anything into it (or, as the case may be, record audio, record video, create graphics, create models, create level maps, etc).

  225. Re:Memory exists to be used Ah, in RAM by ta+bu+shi+da+yu · · Score: 1

    I'm currently marvelling at how wonderfully puerile and completely useless that comment was.

    --
    XML is like violence. If it doesn't solve the problem, use more.