The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.
 Next page →

    Question on Vista Page File

    Discussion in 'Windows OS and Software' started by jb1007, Oct 17, 2007.

  1. jb1007

    jb1007 Full Customization

    Reputations:
    165
    Messages:
    1,230
    Likes Received:
    0
    Trophy Points:
    55
    Hey guys.. I set my page file to 1.5x the amount of ram.. 3067mb but in task manager it shows my page file as being 5000mb. Are these two figures not talking about the same page file or am I missing something? Thanks..
     

    Attached Files:

  2. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    I'm guessing Vista just got the terminology wrong. That figure probably shows your virtual memory (which is pagefile + RAM). That should be 5GB as far as I can figure out.

    Can any Vista-users confirm?
     
  3. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    I would recommend letting Vista manage the page file and don't worry about it.
     
  4. jb1007

    jb1007 Full Customization

    Reputations:
    165
    Messages:
    1,230
    Likes Received:
    0
    Trophy Points:
    55
  5. R4000

    R4000 Notebook Virtuoso

    Reputations:
    736
    Messages:
    2,762
    Likes Received:
    0
    Trophy Points:
    55
    Hmm. My pagefile shows as 995M/6323M, but I have 3GB of ram.........
     

    Attached Files:

  6. jb1007

    jb1007 Full Customization

    Reputations:
    165
    Messages:
    1,230
    Likes Received:
    0
    Trophy Points:
    55
    So that would be about right ... 3gb of ram + a 3300mb page file or so = 6300
     
  7. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    1.5x your RAM is an ancient rule of thumb that is completely out of place in modern systems. Set your page file to be 500Mb-1GB, and run with it. You've got 2GB of RAM, you won't be swapping a ton out to the pagefile. If you do manage to use much of the pagefile, you'll kill your general performance task switching and whatnot and be restarting anyway. I don't know why people insist on wasting gigabytes of hard drive space they will NEVER USE.
     
  8. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    Setting your own pagefile settings is also an ancient rule of thumb. Again I will say, just let Windows handle it and worry about more interesting things.
     
  9. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205
    I have to agree with you. Windows does a really good job all by itself. The ONLY good reason I have ever seen given for doing this yourself is IF you create a defragmented space and put your fixed size pagefile there. That allegedly speeds up things a bit, but for me I don't think it's worth the effort.

    Gary
     
  10. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    Right. That "alleged" speedup is yet another unsubstantiated rumor that floats around in the tweaker circles. Having a contiguous file potentially and theoretically can improve performance, but only if that file is read in sequence. The usage scenario of a page file is mostly not sequential reads.
     
  11. Silas Awaketh

    Silas Awaketh Notebook Deity

    Reputations:
    891
    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    I have 4 GB of RAM, so I disabled the page file. Did I do anything wrong?
     
  12. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    Yes. Leave the page file settings alone. Let Windows handle it!

    Windows is not designed to run without a pagefile, and it can cause your system to crash. The conventional wisdom that the pagefile is only used when you run out of RAM is WRONG.

    Leave the page file settings alone. Let Windows handle it!
     
  13. jimc

    jimc Notebook Consultant

    Reputations:
    130
    Messages:
    269
    Likes Received:
    0
    Trophy Points:
    30
    I used to not have a page file and it ran just fine, and I'm talking about 2GB RAM. No heavy stuff though; I use it for internet, software development, light gaming, etc. I do agree that having a page file can potentially increase performance but I have no idea how little or how much. And having the page file in continuous range does improve seek time I think.
     
  14. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    Anecdotal evidence can be compelling, but don't mistake it for the science of the matter. You may not have seen problems, but that doesn't mean they weren't there, nor does it mean others would not see them.

    As many programs run they allocate RAM. Often they may allocate much more RAM than they need. In this case, the system can detect that and allocate those unused portions to the pagefile. Without the pagefile, the system must lock actual memory, and that greatly reduces that available for other programs.

    There are also times when you WANT things paged out to disk. All that junk in your system tray, for the most part, is idle. It may have a few memory segments in use, but by and large they are idle. In that case, you need the disk pagefile to actually get you MORE RAM available to what you are doing right now, because the system can offload those items to disk to make more room for photoshop or bioshock or whatever.
     
  15. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    Huh ? what does that mean ? Why use the page file if you are not running out of RAM as it involves extra operation and is slow ?

    While I agree that in general one should not disable the page file feature, I find the above sentence odd.
     
  16. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    Your confusion indicates you are basing your assumptions about how virtual memory works on the very conventional wisdom which I just pointed out was wrong. That "conventional wisdom" is basically the idea that:
    The computer has 2 buckets, 1 is RAM and 1 is pagefile. You fill up the RAM bucket until it's full, then you start to move stuff into the pagefile bucket.​
    This is not how it works.

    The fact is that you are always "running out of RAM", because every process has allocated to it 2GB of RAM (on a 32bit system), and much more on a 64bit system. An important thing to note is that there is a very big difference between allocated RAM and RAM that's actually being used. Allocated RAM is that which could be used if needed, but may not be used yet. Even though it's not used, the system has to plan for it and somehow and make a good effort to make it available if it does need to be used.

    Programs in RAM are divided into pages, and the system keeps track of which pages are in use and which are not. It can move the pages not in use onto disk to free up space for other programs in real RAM. For example, if you are using Word and are not currently using a table, the program code that generates a table can be moved to disk. That's very simplistic and might not actually be the way that function of Word works, but that's the idea.

    Without this functionality, you would be using your very expensive RAM to hold lots of unused code, which then REDUCES that amount of RAM you have available to do actually useful things, like disk caching and readyboost.

    I won't reiterate what I said in post #14, but that still applies here.

    To understand more about how virtual memory generally works, please see:
    http://en.wikipedia.org/wiki/Working_set
    http://en.wikipedia.org/wiki/Virtual_memory
    http://en.wikipedia.org/wiki/Paging
     
  17. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205
    But, if I remember correctly, every application does not automatically get allocated 2GB. If my app knows it needs less, doesn't it get less? And then if it latter realizes it needs more, it can request more, up to the 2gb limit?

    It's been a long time since I had to do any low level memory allocation in applications it's all so abstracted now, thankfully.

    And if my supposition is true then, isn't chimpanzee's comment sort of true? Namely, that until all actual RAM is utilized no page file use would occur. I realize this is VERY simplistic and given the system processes alone and ignoring any applications that might be run, pagefile use is always in play. But ONLY, and I think this was chimpanzee's point, because the 2gb of physical memory is already over allocated before the first user app gets a chance to run.

    Gary
     
  18. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    The thing is that you WANT the pagefile to be used, otherwise you have a bunch of unused code taking up RAM, when that very expensive system component could be doing better things, like disk caching or other system tasks. The ideal situation, which Vista aims to reach, is that 100% of your RAM is used all the time for useful things. Unused code sitting in RAM causes a performance penalty in this regard.
     
  19. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    or to put it another way, sure, as long as there's enough RAM, you want your data in RAM. But *if* you run out of RAM at some point, you don't want to have to wait for Vista to first move 500MB data to the harddrive, before your game can continue, do you? A 5+ second freeze?
    Instead, you want it to have guessed this in advance, and *already* moved some unused data to the harddrive, so it can free up memory in an instant.

    So yes, the pagefile does get used before you run out of memory. But it does so in the background, without you really noticing (windows is just shuffling data that hasn't been used for hours out to the pagefile, in order to ensure there's free RAM to cover upcoming requests), because that's better than waiting until the last moment, and then being forced to pause the application for 5-10 seconds while the pagefile catches up.

    Not true.
    The application only gets allocated as much as it requests. (Rounded up a bit)
    It's very easy to prove. If you're a programmer, write a program that accesses a random memory address. If the program was allocated a full 2GB, it'd be allowed to do this. Instead, you get an Access Violation.
    Instead, the application *believes* that it's got a full 4GB of memory to play with, and the OS has to keep this illusion unbroken. So when the application tries to allocate memory, the OS must be able to provide it. But like GMail, it relies on most people not using the resources they have available (GMail would fall apart if everyone used all their storage space, and no OS would be able to cope if all applications used a full 2 or 4GB memory)
     
  20. Silas Awaketh

    Silas Awaketh Notebook Deity

    Reputations:
    891
    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    Dayyum! :( Guys, I only use these programs with Windows Vista Home Premium - Winamp, uTorrent, Opera, Windows Live Messenger. Do I really have to allocate 3 GB of my hard-disk, the for page file? 4 GB isn't enough? Sorry, some of those words, were very technical for me to understand. :)
     
  21. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    Do I need to use a bigger font or something? Maybe some colors?

    Leave the page file settings alone. Let Windows handle it!

    If you're that low on disk space where the space would matter, you have bigger issues to worry about (like do I really need all <s>that pr0n</s> those movies)
     
    Last edited by a moderator: May 8, 2015
  22. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205
    In a word, YES. You do need it.

    The fact the some of these words were very technical says you should, as OREV suggests, just leave it to Vista to manage the pagefile. I don't mean that as ANY sort of slight. Just that, using anything other than Vista managed settings for the pagefile, is something that should be played with ONLY by someone who fully understands the ramifications (sorry for the pun). Pagefile manipulation does NOT belong on a tweak page, where I too often see it. Even seasoned old farts, like myself, who have been programming microprocessors since the 8008, should leave it the hell alone!


    Gary
     
  23. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205
    Yeah, I see that. Good point. You want the paging to be a bit preemptive. A page marked a "optional and unused" (my terms), has no NEED to be in memory.

    Gary
     
  24. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    You are mixing addressing space with allocated memory(be it RAM or page file). Many programs do over allocate but not that many program do it the way you described. Page files does allow more efficient use of RAM though it still doesn't change the fact that if you need to actually swap, you are out of RAM.
     
  25. Silas Awaketh

    Silas Awaketh Notebook Deity

    Reputations:
    891
    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    You missed underline!
     
    Last edited by a moderator: May 8, 2015
  26. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205

    The operative word in that last sentence being "need".

    But as Jalf and Orev pointed out there is another situation where paging will occur. The algorithm can, and should, be premptive in paging out unused pages to free up memory so it does not always NEED to do so in response to a memory allocation request. Again I am working from distant assembler coding memories, but as I remember it, when an app allocates memory it can indicate which pages are and are not to be considered pagable. And when Vista sees such pagable ones unused for a length of time it will preemptively swap those out in anticipation of other requests. That's a gross oversimpification of course.

    Gary
     
  27. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    That's really the crux of the matter and why it's often difficult to describe to people, especially the ones who make those tweak guides. It's a very complicated issue, and the common wisdom just does not explain it very well.

    I'm not yet a geezer (getting there though), and I already expect that these systems, that are supposed to be faster and better with every generation, should be doing this stuff by themselves. That's why I say to leave it alone.
     
  28. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    Doesn't sound like good idea to me. It makes unnecessary disk IO(which is very slow and spinning up disk means shortening battery life and waking up the CPU shortening battery life too).

    Beside, it seems to work against the idea the idea of making good use of memory. Why swap things out when there is no memory request to fullfill ? Who knows what the next memory access is from ?

    Alogrithm like this would mean the disk and CPU never sleep.
     
  29. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    While I agree with that, I don't think disable them(if there is enough memory) or setting to fix size really have that bad an effect.

    In fact, there seems to be only fixed size swap space on linux and both Windows and linux can run without swap space just fine(given enough RAM for the intended setup).

    The way Windows manage swap(auto expand/shrink of page file) is for convenience(to avoid OOM), not necessary for performance.

    Though there is already different view about must the swap space be very large(and in the case of Windows auto mode, unlimited) to avoid OOM or it would be better to really let the OOM happens to have a better idea of how much RAM the setup really needs. If given a reasnable sized swap and OOM still occurs frequently, it means the setup is under-speced. This is particularly important for server.
     
  30. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    Well, you've read how it works. There's nothing else I can say if you don't agree with it.
     
  31. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205

    And letting the OOM errors occur is NOT the proper way to find out the setup is under-speced. That's the job of performance monitoring. I, for one, would NEVER want to see an OOM error on a server just because I was unwilling to give up a couple of gigs of hard drive space. My users on the server would not be very happy with me.

    If you want to run without a page file, go right ahead. At least we both agree it's not a good idea for tweak pages to suggest this to the uninitiated.

    Gary
     
  32. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    No. You're assuming that it *always*, *constantly* does this.
    Why should that be the case?
    Data is swapped in and out when the pagefile/RAM situation changes enough to warrant it. If the amount of free RAM goes from 3GB to 1.2GB, Windows might find that it's time to preemptively swap some of the rarely used data out to avoid suddenly running out of RAM. That means the disk won't be unnecessarily spun up. Of course there's some disk IO, but who cares? You're not waiting for it, because it's done *before* it's needed, so it can be done in the background.

    The OS has a fairly good idea. If some bit of data hasn't been used for a while, then the odds that it'll be used now are *very* low. (way below one percent).
    Also, just because it's copying the data to the pagefile doesn't *necessarily* mean that it'll be evicted from RAM. It could write to the pagefile, and still keep the RAM copy until it becomes necessary to delete it (but once that happens, it can instantly delete it without having to wait for a pagefile copy to complete)

    No.

    True. Fixed size isn't harmful, but why bother when you might as well let Windows manage it?
    And yes, Linux can run without swap space if it doesn't run out of memory. So can Windows. It's the if part that makes it a terrible idea. And unfortunately, some crappy Windows software *relies* on the existence of a pagefile. They shouldn't, but the world is full of crappy coders.

    The only reason there is a different view on this is that you just made it up. This is quite possibly the worst possible way to test whether you have enough RAM. Sane people do this with performance monitoring software. Windows itself comes with plenty of that for simple tasks like this.
    And most people would rather see a performance alert when they have too many pagefile accesses, than a crash because you failed to set a pagefile at all.
     
  33. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    That is IMO a very rude sentence. Unfortunately, off-hand I cannot provide direct link to the blog I read. But below is one that reference it :

    http://www.debian-administration.org/articles/550

    Go to comment #15 and read.

    Note, I said there are different views about this swap space issue.

    The above link in fact mimic what Windows does as on linux, swap space don't auto grow(and I am wondering, why not ?).
     
  34. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    Is that how Windows works or how you think it works or how you want it work ?
     
  35. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    It bothers me, and I know what I am doing. I would rather see OOM.
     
  36. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    Doesn't seem to say that "letting your system crash with out-of-memory errors so that you know how much memory to buy" is a good strategy. But if it does, ok, I was wrong, you didn't invent it. But it's still a terrible strategy.

    Well, I don't have a big problem with a fixed pagefile size, unlike some on this thread. But disabling the pagefile entirely is a different matter, and you shouldn't do that. But ultimately, they're different OS'es, and for historical reasons, Linux uses a swap partition, which makes it impossible to use a dynamic, OS-controlled size. Also, I suppose you could say that the dynamic pagefile approach means you'll crash if you run out of harddisk space (Suddenly no room to expand the pagefile)

    It is roughly how Windows works. Of course it's simplified and I dont know all the details of how it's implemented, but that is basically how it works, yes. The only thing I'm not sure about is whether data is instantly evicted from RAM when it's written to the pagefile, or of the OS keeps the in-memory copy alive as long as possible. That part is how I want it to work. :)
     
  37. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    Then I'd argue that you don't know what you're doing. ;)
    If you know what you're doing, you avoid OOM entirely, whether by letting Windows manage the pagefile, or by making it big *enough*
    But you'd never "rather see OOM".
     
  38. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    That is how you want your system to work, not how I want my system to work.
     
  39. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    "But a Linux machine with 8G of RAM and 16G of swap is almost certain to be unusable long before the swap space is exhausted. Therefore giving the machine less swap space and having processes be killed (or malloc() calls fail - depending on the configuration and some other factors) is probably going to be a better situation."

    This to me basically means what I said. Beside, it is not that your system would crash, just some processes would fail. Whether that is a good or bad strategy would depends on situation.
     
  40. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    I happen to be using a VPS that effectively does this, i.e. putting a hard cap on memory available. And yes, I know it is painful as what I got is a 256M slice where I see more OOM faults than my 64M + 512M swap.

    Whether to disable it again depends. What is the difference between a machine with 1G RAM + 2G SWAP or a machine with 3G RAM with no swap ? Both would give OOM fault when the memory need exceed 3G. So if you said I should not disable swap on the 3G machine, I should either increase the swap of the 1G machine or let it grow automatically. By same logic, it would lead to a conclusion that I must have unlimited disk space with auto grow swap.
     
  41. jketzetera

    jketzetera Notebook Evangelist

    Reputations:
    143
    Messages:
    328
    Likes Received:
    0
    Trophy Points:
    30
    Orev, let me first say many thanks for your Vista clean-install guide. You are clearly a very informed guy that also is willing to lend a helping hand to his fellow men, which is awesome. Kudos and respect to you!

    With that said I have to disagree on your position regarding Windows virtual memory and page file settings.

    First off, your position on the unequivocal benefits on letting Windows manage the page file is as anecdotal as the opposing view, Taking Microsoft’s word regarding virtual memory management is as scientific as taking Microsoft’s word regarding Vista being the most secure OS ever (or similar corporate boiler plate served by …. well corporations and their agents).

    As you probably have guessed by now, I am no friend of windows virtual memory management and its page file. My bad experience with windows virtual memory comes from the time when I owned an ultraportable laptop with 768 MB RAM and a 4200 rpm hard drive, running Windows XP (long time ago).

    I noticed that when I was running more than one application and leaving some of them minimized, XP would page the minimized applications out after a certain time period (or at least substantial parts of them) to the page file. This would happen despite that the system had several hundreds of megabytes of unused RAM.

    My problem was that if I clicked on a minimized application, the application most often had to be retrieved from the page file on my very slooow hard drive. The effect would be that my system ground to a halt until the application had been retrieved from the page file.

    Obviously Microsoft’s “excellent” virtual memory management prioritized using my RAM for file cache purposes and happily paged out my minimized applications to do so. This made me furious and I started asking around if disabling the page file would be a solution to my problem.

    I got similar responses as in this thread and assurances regarding the “excellent” Windows NT/2000/XP virtual memory management and the dangers/disadvantages of disabling the page file.

    However, I could not stand the disk trashing and disabled the swap file despite all warnings and I was amazed with the effects. No more paging out of my minimized applications, no more frequent disk accesses to my slow hard drive. The subjective performance increase I experienced was significant.

    I realize that the above description is subjective but I will offer a theoretical user scenario and would be very happy if you could explain what possible benefit a user would gain from enabling the page file in that scenario.

    The usage pattern includes using Word, Excel, Outlook, PowerPoint, Internet Explorer, WinAMP and Skype, all running simultaneously. The system has 2GB of RAM and these applications (and their data) all comfortably fit in the system RAM.

    A system without a page file would not page parts or all of the minimized applications and their data to the page file. Thus the user would experience immediate access to minimized applications and the data during his happy multi-tasking work day.

    Somewhere around here proponents of page files would object and say something like “your wasting valuable RAM that could be used for file caching, which would increase the speed of your system”.

    That might be true if the hard drive access pattern involved lots of random reads and/or writes (e.g. web/database/fileserver or a workstation running hard disk intensive projects). However, the most intensive read and writes from the scenario above is probably due to browser caching.

    In a scenario where the user applications and their data fit in RAM with room to spare and the user driven I/O pattern consists of browser caching, editing word, excel and powerpoint files and similar, it seems quite stupid to page out open applications and their data to hard drive to free RAM for file cache usage.

    The file cache manager might gain a few hundreds of megabytes but what good will that do when your hard drive has 30GB of data? Well, if you are very lucky, the word file you were about to open might already be cached so it will open instantly but the probability of that is very low. Since most laptop drives of today have an access time of below 20ms and impressive sequential read/write performance you will not be waiting very long for the system to load an uncached word/excel/powerpoint file anyway!

    In summary, I am yet to be convinced of the benefits of using a page file on a desktop/laptop computer if the following is valid:

    1. The applications and their data comfortably fit in the system RAM with RAM to spare.
    2. The hard drive usage pattern does not include massive amounts of random reads and writes.

    If anyone believes the contrary, I am very much interested to hear how use of page file would increase system performance in the above scenario, which is a scenario that I believe is applicable to most laptop users.
     
  42. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    No, it is how I'd say someone who "knows what he's doing" wants his system to work. :)

    No, it's bad. *If* you want that result, there are far saner and more robust ways to achieve it.

    Unlimited? How does that work?
    You simply need *enough* pagefile to prevent crashes. On a 32-bit system, you're limited to 4GB of virtual memory in the first place, so that places a hard cap on how much swap space is meaningful. And if you never ever need more than 2GB of memory, Windows won't need to create a big pagefile.

    You're right. *If* all your working data fits into RAM, and is known to *continue* to fit into RAM, there's obviously nothing to be gained by using a pagefile.
    The question is, when it no longer fits into RAM. Would you like your Word document to crash because you ran out of memory? Or the game you've been playing for two hours without saving?
    And since no one wants that, the question becomes "how sure am I that I'll *never*, not even for a nanosecond, run out of memory?"
    Well, how sure are you?

    Then there's another side of it, which shouldn't be a factor, but because of sloppy coding, sometimes is.
    A few applications actually require a pagefile.
    I think someone mentioned that a version of Photoshop did that. I have the artistic talent of a concussed duckling, so I don't use it, and haven't tested it myself. It might have been some other application. But it's the unfortunate reality, some apps are stupid enough to require the existence of a pagefile, regardless of how much RAM you have.

    However, you're right on one point. XP's paging algorithm is far from perfect. I've noticed the same thing before. An that leads back to the above. If you know with absolute certainty that you won't need more memory than you have RAM, then you know something Windows doesn't, and you'll be able to do a better job. But usually, you won't know this. You might say that you don't *usually* need that much RAM, or that you've never seen that much being used... Which doesn't guarantee anything. Windows has to play it safe, it has to be able to serve memory requests quickly, which means it can't allow the RAM to fill up completely, because that'd cause unacceptable delays before a memory allocation can be handled.

    There is one more side to this. It's not just how much memory you have free. it's also how fragmented it is. It's perfectly possible to have 2GB of RAM free, and yet be unable to allocate a chunk of 200MB. Which means you'll get an out-of-memory error anyway.

    It doesn't. It increases the reliability and scalability of your system. Not performance.
    Good paging performs pretty much as well as no paging, but in addition, also avoids out-of-memory errors.
    Bad paging performs worse, but still avoids the errors.
     
  43. Silas Awaketh

    Silas Awaketh Notebook Deity

    Reputations:
    891
    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    I disabled page-file in Windows XP Pro at least 3 years ago. I never had ANY problems with it. I only had 512 MB of RAM then. My tasks were watching movies, and surfing the Internet, with maybe Winamp playing in the back-ground. Never.

    Same goes for Windows Vista I think? I have 4 GB of RAM, 3.5GB of which Vista Home Premium recognizes, and I use the same applications, maybe their new versions in some cases. So I've disabled page file on my laptop as well. I don't see no problem, but I wanted to make sure.

    Can you explain that further?
     
  44. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    Ok, if you want to be that specific, you mean all 32 machine must have a VM size of 4G.

    What do you mean by that ? It check for the presence of a system page file(or query the OS that it has page file) ?
     
  45. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    No, a 32-bit machine has an address space of 4GB. Having 4GB of virtual memory is optional.

    Apparently. I know it's stupid, but.... (Well, I assume that's how they do it, but never underestimate the ingenuity of bad programmers... ;))
     
  46. chimpanzee

    chimpanzee Notebook Virtuoso

    Reputations:
    683
    Messages:
    2,561
    Likes Received:
    0
    Trophy Points:
    55
    Let me ask the question again, in the context of 32 bit CPU, step by step.

    What is the difference between a 1G+1G swap system and a 2G no swap system(beside performance) ?
     
  47. jketzetera

    jketzetera Notebook Evangelist

    Reputations:
    143
    Messages:
    328
    Likes Received:
    0
    Trophy Points:
    30
    When I discussed page file vs no page file with some people previously, one of the arguments used against the no page file scenario was that it was bad for the system performance because not using the page file would prevent the paging out of lesser used pages. The argument went that the paging out of lesser used pages would result in more free RAM. That RAM would in turn be used for the file cache, which would supposedly speed up your system.

    My argument was that unless your usage scenario entailed heavy random read- and/or writes to the hard drive, adding a few hundred megabytes of RAM (the RAM now available since some of your applications/data had been preemptively paged to hard drive) would make little difference. Today it is not unusual to have 30GB of data on a laptop drive so having just a few hundred of megabytes of additional file cache will not significantly increase the probability that the word/excel/powerpoint file that you are yet to open will be cached before you try to open the file.

    Also, unless your data files are very fragmented it takes negligable time to load e.g. a 2 megabyte powerpoint file as today's hard drives have access time below 20ms and impressive sequential transfer rates.

    As I personally get extremely annoyed when Windows has decided to page out my open applications and I have to wait for them to be paged in from disk, I make sure that my systems have sufficent RAM and I always disable the page file.
     
  48. jimc

    jimc Notebook Consultant

    Reputations:
    130
    Messages:
    269
    Likes Received:
    0
    Trophy Points:
    30
    I don't know if you tested it in the real world, but it doesn't have to be this way. AFAIC, it's perfectly fine to map segmented physical memory into a continuous virtual memory range, because the mapping is done on a page (usually 4KB) basis.

    It's the first time I heard an application requiring a page file. I'm not a heavy Photoshop user but you might be talking about the scratch space, which is used as temporary storage by Photoshop.
     
  49. jketzetera

    jketzetera Notebook Evangelist

    Reputations:
    143
    Messages:
    328
    Likes Received:
    0
    Trophy Points:
    30
    Well, naturally I cannot be sure (damn it, I need to stop answering rhetorical questions ;-).

    However, from my own experience I have run out of memory only on a rare occasion and I have been running without page file for more than three years.

    I have never lost any data and I am not afraid of doing so. I guess I can thank the historical instabilities of Microsoft’s operating systems, leading to many application developers incorporating auto-Save functionality in their apps.

    E.g. should I be working on a document and get an out of memory error that kills my application word/excel/powerpoint and several other applications would have auto-saved my work and I would lose a few minutes of work at most.

    However, I have never lost any work at all during the very few times I received out-of-memory errors (and never did the system completely crash).

    Interestingly enough it was the same app (not recently used) that died on all times when Windows went out of memory. I wonder if that is just a coincidence or if Windows starts to kill the least used processes in an out of memory situation.
     
  50. orev

    orev Notebook Virtuoso

    Reputations:
    809
    Messages:
    2,829
    Likes Received:
    1
    Trophy Points:
    56
    "Anecdotal" means something that is based on a personal story (or "anecdote"), which a person then uses to conclude is the truth as it applies in all empirical situations. I think you have my point of view and yours backwards. That fact that *you* had no problems is anecdotal, while my position is based on how virtual memory and page files work.


    Jalf: You've been making some good points, but I wanted to correct you on this. A virtual memory system is intended to avoid this situation. The MMU keeps a map of where all the free segments are, and can present a unified virtual view to the application, even if the segments are scattered in different physical locations.

    That's not the point of a disk cache -- to guess what you will need and load it into RAM first. Vista is trying to implement that with readyboost, but that's only for program files, not data. The disk cache is mostly used when writing data back to disk.

    Also, disk cache is only an example of what the system can use the RAM for, so do not get hung up on that as the only thing.

    Yes, it's strange, but if you have no pagefile, Photoshop will complain about it. It's not talking about scratch space, it's talking about the pagefile. I assume it's because photoshop can easily eat up all of your RAM.
     
 Next page →