Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: is this ok? my sys gives me 8gb of virtual memory when i already got 8gb of ram  (Read 15154 times)

0 Members and 1 Guest are viewing this topic.

ilovedota2

    Topic Starter


    Rookie
    • Experience: Familiar
    • OS: Unknown
    isnt it too much? i never really go past having 50% memory usage. can i just not use virtual memory to save storage space?

    also are there bad consequences if i delete hiberfil.sys ?

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Quote
    are there bad consequences if i delete hiberfil.sys ?

    Yes, you can remove it. The dubious advantage is that you have more disk space. But it you have enough disk space there is no benefit by removing it.

    In other words, Microsoft put it there for a reason. Hibernation is a cool feature and can be real handy.

    If you want to be away from you PC for twenty Minutes,  just put it into hibernation and when you come back it will return to where your were.  It saves power and reduces heat build up.

    It is your choice. Unless your are really cramped for drive space, there is no noticeable performance gain by removing it.

    Note: before defragmenting you could  delete hiberfil.sys, but that recommendation is not from Microsoft. Really, I found no recommendation from MS to ever delete ithe hibernation file or the page file.


    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Stop looking at resource manager...especially with 8G of RAM.
    " Anyone who goes to a psychiatrist should have his head examined. "

    Gray1989



      Rookie

      Thanked: 2
      • Yes
    • Computer: Specs
    • Experience: Guru
    • OS: Windows 7
    Your virtual memory always starts off to be the same size as your installed RAM. also before removing hiberfil.sys first disable hibernation. i have 16gb ram and set myself a 1gb pagefile with kernel paging disabled. i rarely go over 40% ram usage (but i have hit over 90%)
    If you are reading this post, I am no longer going to be active at this website. I have found the conflict of interest regarding members/moderators here to be too much for me to want to continue. I only came here to help and yet some people feel that questioning my skills and/or motives is a good way to spend time, while protecting the motives of those who choose to spend their time doing so. I am staying away from forums for a while. Back to programming.

    Allan

    • Moderator

    • Mastermind
    • Thanked: 1260
    • Experience: Guru
    • OS: Windows 10
    Follow patio's advice above - just leave it alone and don't worry about it.
    « Last Edit: April 07, 2012, 04:50:07 AM by Allan »

    Gray1989



      Rookie

      Thanked: 2
      • Yes
    • Computer: Specs
    • Experience: Guru
    • OS: Windows 7
    Assuming you're not running a 30-60gb ssd/hdd as your main drive you could leave it. I would recommend if you don't really have 100 things open at a time though to lower the value to a set size of 1024MB to 4096MB. of course if you don't know how to properly modify the setting just leave it
    If you are reading this post, I am no longer going to be active at this website. I have found the conflict of interest regarding members/moderators here to be too much for me to want to continue. I only came here to help and yet some people feel that questioning my skills and/or motives is a good way to spend time, while protecting the motives of those who choose to spend their time doing so. I am staying away from forums for a while. Back to programming.

    Allan

    • Moderator

    • Mastermind
    • Thanked: 1260
    • Experience: Guru
    • OS: Windows 10
    There is not reason to change the pagefile setting from system managed.

    Gray1989



      Rookie

      Thanked: 2
      • Yes
    • Computer: Specs
    • Experience: Guru
    • OS: Windows 7
    Certain software, usually games, will require you to have a pagefile of at least a certain size, and is the only reason i even have one on my system. The performane increased is only noticed when switching between opened programs or reopening a previously opened program since startup. The basic sweet spot with pagefiles is basically make it as small as possible while maintaining system stability. Windows can guarantee stability by automatically adjusting the pagefile but presetting the value depending on your system and how you use it can be a much better and even more beneficial alternative, especially in systems with more than 4gb ram. An 8gb system as as much physical memory as a 4gb system has physical and virtual memory combined on a default windows installation. I'm sure he has virtual memory to spare.
    If you are reading this post, I am no longer going to be active at this website. I have found the conflict of interest regarding members/moderators here to be too much for me to want to continue. I only came here to help and yet some people feel that questioning my skills and/or motives is a good way to spend time, while protecting the motives of those who choose to spend their time doing so. I am staying away from forums for a while. Back to programming.

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Certain software, usually games, will require you to have a pagefile of at least a certain size
    No, they don't. Unless they are very old. Actually, I've only ever seen this with mac programs, since there is no way for a Windows program to even see if the system is using pagefiles, or what it's limits are set to on various drives.

    Quote
    The performance increased is only noticed when switching between opened programs or reopening a previously opened program since startup.
    Because disabling, or having a small pagefile, forces more of the memory allocated by each process to remain in physical memory, rather than being mapped into a pagefile after a period of disuse. This often results in more physical memory fragmentation, too, which isn't usually something that affects performance but it does affect the ability of the kernel allocator from being able to allocate memory efficiently. I believe that the system keeps a bit of the pagefile reserved for the purposes of the kernel allocator to allow for the creation of such contiguous areas. It is usually applications that make large demands on the Virtual Memory Manager for memory but do not actually touch many of the pages that would cause the most problems on systems with no pagefile or a very small pagefile.

    Quote
    The basic sweet spot with pagefiles is basically make it as small as possible while maintaining system stability.
    The size of the pagefile is unrelated to system stability. The worst that can happen with no pagefile is frequent out of memory errors. The actual problem of course is that most programs are not designed for a scenario where VirtualAlloc() fails; the use of a pagefile ensures that any application can use the full address space it is given.

    Quote
    Windows can guarantee stability by automatically adjusting the pagefile but presetting the value depending on your system and how you use it can be a much better and even more beneficial alternative, especially in systems with more than 4gb ram.
    No, it cannot. The only thing you can ever gain from such a symposium is more disk space, Speed improvements can be realized, but only by way of choosing faster disks or disks with more contiguous space to allocate for a pagefile. On it's own, The pagefile doesn't add "stability" to the system; the Virtual Memory manager is just better able to work with one. Stability is questioned only by way of applications typically not handling low memory or out of memory conditions very well.



    Quote
    An 8gb system as as much physical memory as a 4gb system has physical and virtual memory combined on a default windows installation. I'm sure he has virtual memory to spare.
    To user programs, there is absolutely no difference between physical and virtual memory.

    The problem here is that many people think Virtual Memory is only used when physical memory is close to exhaustion. This is not the case, mostly because Virtual Memory and the pagefile are not interchangable terms. Virtual Memory is what every single program uses. That Virtual Memory is then either mapped into physical pages in RAM or into the pagefile; the address in that processes virtual address space is what is used as a memory handle. Either way, all memory allocated by any program is allocated as "Virtual Memory" as part of that application's virtual address space, regardless of whether it truly refers to physical memory or pages in the pagefile.

    The Memory Manager is designed to try to keep as Much Physical Memory free as possible, without jeopardizing system response time too heavily. If you leave an application idle in the background with memory allocated, eventually it's physical memory will get paged out to make more room in RAM, as well as help keep free memory blocks contiguous. If you limit the size of the pagefile, you limit the amount that can be paged out, this forces that memory to stay in RAM; this doesn't really help, since the algorithm for determining what get's paged out is rather accurate about which applications are more heavily used.

    The problem with setting a limit on the pagefile size is you are setting a hard limit on the total commit charge of the system. With a System Managed size, the pagefile will grow and shrink as necessary to accommodate demands made by the various applications running on the system. With a set Pagefile size (or maximum size) you are setting a hard limit. No matter how hard you try you will not be able to have more memory allocated than your physical memory size plus your pagefile maximum size.

    I believe much of the confusion lies with people thinking that the pagefile is similar to the swapfile used by 16-bit windows-(win386.swp) but this is not the case; Virtual Memory and pagefiles take advantage of the processor's Protected Mode Virtual Address space which gives each process a set address space that it is free to consume, and then allocates memory based on the parts of those address space that are actually used. Memory is moved to the pagefile and back based on need. With Earlier systems, the Memory manager itself is doing all the mapping to and from the swapfile, without the assistance of the processor's virtual addressing capabilities.

    Anyway, the thing isn't that reducing the size of the pagefile or eliminating it completely will necessarily cause problems, but the fact is that leaving it as system managed will not cause any problems at all either, so I honestly don't understand why so many people are fascinated with screwing around with the size of pagefiles, unless they truly have no idea what they are for. Such people seem to give the impression that they somehow know more about Windows internal memory workings than their peers, but this sort of notion is usually dispelled by simply reading the nonsense that is posted, and is illustrated rather well with the inability to discern between the pagefile and Virtual Memory, which are completely disparate concepts. All it amounts to is bad advice based on vague and completely anedotal or conjectural "evidence" faciliated and amended by a complete lack of any understanding of how the actual memory subsystems work or how the pagefile fits into that equation. May as well stick RAM cards into a voodoo doll of the computer and assert that performance improves as a result.

    Nothing bad will happen if you disable or tweak the pagefile settings (well, actually, disabling it would cause all sorts of slower codepaths in the Memory manager as well as larger page sizes contributing to both memory fragmentation as well as slack space). However nothing good will happen either. Performance will not perceptibly increase; and instead now the memory subsystem is running with arbitrary limitations placed on it. Many programs allocate large amounts of memory, but leave it unused, relying on the virtual memory subsystem to only allocated touched pages. typically, this memory is not added to the pagefile (since it's empty) and only those pages that are actually touched can be paged out; however, such allocations still contribute to a sum that would be used to determine if the set limit has been reached. This is partially why the default pagefile size is larger than the system memory size.

    The only reason for messing with pagefile settings is to change pagefile settings on specific drives in the interest of saving space on certain drives, disabling the pagefile on SSDs for both size as well as preventing writes, or preferring faster drives, as well as preferring physical drives that are not on the same host controller as the drive containing the system partition (for better asynchronous I/O). Much like the now removed option to change the size of the registry on the same dialog, the option of changing the size of the various system pagefile's is only for completeness, and to conform to certain regulatory standards.

    A better way of setting limitations on the size of a pagefile, if it is necessary or desired, is not to use the pagefile limitation options but rather place the pagefile on a separate partition; make that partition the maximum size you want to allow, and then set it to system managed. This has the advantage of making sure that the pagefile is always contiguous. (although this isn't a problem on most systems, then again, neither is setting the pagefile to system managed, either).
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    You deserve three tank yous, BC.
    Hee is your key statement.
    Quote
    he Memory Manager is designed..

    Why do users think a billion dollar company does not hire the best software engineers out there? If any  user really that  way, same should drop Windows and try something else. Like the Mac OS ten.

    Wait, maybe that is not a good idea.
    Quote
    Apple patches 3-month-old Mac OS X security flaw .


    Allan

    • Moderator

    • Mastermind
    • Thanked: 1260
    • Experience: Guru
    • OS: Windows 10
    Certain software, usually games, will require you to have a pagefile of at least a certain size,
    Not true. And please, don't confuse the issue. Thank you.

    ilovedota2 - there is no reason to change it from system managed.

    BCP - good post. Bottom line, there's no reason to mess with the virtual memory settings.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    You deserve three tank yous, BC.
    Hee is your key statement.
    Why do users think a billion dollar company does not hire the best software engineers out there? If any  user really that  way, same should drop Windows and try something else. Like the Mac OS ten.

    Wait, maybe that is not a good idea.

    Quite a tangent to spin off into don't you think ? ?
    " Anyone who goes to a psychiatrist should have his head examined. "

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Quite a tangent to spin off into don't you think ? ?
    I try my bet.  :D

    Gray1989



      Rookie

      Thanked: 2
      • Yes
    • Computer: Specs
    • Experience: Guru
    • OS: Windows 7
    I would like to point out that the size of the virtual memory in your system can indeed be called upon. i have built a program to do so myself and there is more than one method of doing it. Also, i have no reason of lying about virtual memory being needed for certain applications, you can get yourself a copy of guitar hero world tour and try it out yourself. Not the only game i seen that requires it. BTW the stability comment comes from the possibility of both ram and vm being full. Without windows being able to adjust the size of the pagefile upon it being full there would be application errors, crashes, and therefore stability problems. Anyways if there wasn't any use for setting the pagefile size for average home users then i doubt Microsoft would have made it a GUI-accessible option.

    Please try to refrain from assuming i don't know what I'm talking about because I'm always sure when i post
    If you are reading this post, I am no longer going to be active at this website. I have found the conflict of interest regarding members/moderators here to be too much for me to want to continue. I only came here to help and yet some people feel that questioning my skills and/or motives is a good way to spend time, while protecting the motives of those who choose to spend their time doing so. I am staying away from forums for a while. Back to programming.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re-visit BC's Post above...
    " Anyone who goes to a psychiatrist should have his head examined. "