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 15176 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Code: [Select]
Please try to refrain from assuming i don't know what I'm talking about because I'm always sure when i postGlad you let us know!

Gray1989



    Rookie

    Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
This is a debate that has been going on for a long time over the internet. Even though we have both taken sides here, i understand completely why Microsoft made their decision to make the pagefile relative and even linear to the size of the installed RAM. Really, i do. But when somebody has a system with that amount of RAM, which equals the combined pagefile and RAM size of another still modern computer running the same apps, then lowering the pagefile size helps so much, especially when you have 20 things open at a time like i do. It prevents more of the apps you're using in the background from being paged to a much slower harddrive.

Also, if you happen to have a secondary harddrive kickin around i would definitely suggest moving your pagefile
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
Okay, you know what? There are a ton of "pagefile experts" on forums all over the web and while it is among the most contentious subjects it is also among the least important. Just leaving it as system managed is the best option for 99.9% of users. Arguing otherwise may make you feel important or knowledgeable, but this forum has a lot of truly well informed members who actually  know what they are talking about. So perhaps you would be kind enough to stop beating a dead horse so we can just move on, okay? Thank you very much for all of your input in this matter and your cooperation now.

Gray1989



    Rookie

    Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
I agree with you about the importance of this subject. I have way better things to do with my time than argue. read the thread again and tell me who caused all of this useless bickering
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
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
As a moderator you should be trying your best to not be so personal. I don't think i'm knowledgeable, i am. and I've earned it from years and years of experience, the kind you could never get at a school or job. My experience comes all the way from dos and windows 3.1. I literally taught myself how to format a computer and work with drivers. I was literally fixing computers with DOS boot diskettes when i was 9 or 10 years old. if there's anything left for me to learn i doubt its going to be here
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
I wasn't being personal...nor questioning your skills.
I was merely re-stating that with 8G of RAM this whole discussion other than BC's informative Post is pure nonsense...
" Anyone who goes to a psychiatrist should have his head examined. "

Gray1989



    Rookie

    Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
Not the part about him being wrong and stating that no application could be set to rely on the minimum size of the pagefile to say the least
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.

Gray1989



    Rookie

    Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
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.

Using the Windows Management Instrumentation (WMI), a programmer could easily not only view the status of the pagefile on a running version of Windows, but could also change the pagefile size, etc..
It can even be done with VBScript:

http://blogs.technet.com/b/heyscriptingguy/archive/2006/01/18/how-can-i-change-the-size-of-a-page-file.aspx
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.

JJ 3000



    Egghead
  • Thanked: 237
  • Experience: Familiar
  • OS: Linux variant
no application could be set to rely on the minimum size of the pagefile

I've read that phrase about ten times now and I still can't understand what it means. I suppose I'm just dense. Could you explain what that means? Why the minimum size? and how could it rely on it?
Save a Life!
Adopt a homeless pet.
http://www.petfinder.com/

Gray1989



    Rookie

    Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
I've read that phrase about ten times now and I still can't understand what it means. I suppose I'm just dense. Could you explain what that means? Why the minimum size? and how could it rely on it?

i had a game that required my pagefile to not only exist, buf be set to a minimum size
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.

JJ 3000



    Egghead
  • Thanked: 237
  • Experience: Familiar
  • OS: Linux variant
I had a game that required my pagefile to not only exist, but be set to a minimum size.

Okay. I think I understand now.

Thanks.
Save a Life!
Adopt a homeless pet.
http://www.petfinder.com/

Gray1989



    Rookie

    Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
That Virtual Memory is then either mapped into physical pages in RAM...

Quote
Basically, virtual memory is non-physical memory (yeah, that helps, huh?)

Windows uses virtual memory when it doesn’t have enough “regular” physical memory to perform a task. When it does this, Windows uses your hard drive to store information that normally would be put into your RAM memory.

http://www.worldstart.com/understanding-virtual-memory-and-ram/

That's two misconceptions that I've been able to easily source now. And for a programmer thinking that Windows programs don't have access to pagefile information, is a pretty bad misconception in my eyes.
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.

Gray1989



    Rookie

    Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
http://support.microsoft.com/kb/2160852
Quote
RAM is a limited resource, whereas for most practical purposes, virtual memory is unlimited. There can be many processes, and each process has its own 2 GB of private virtual address space. When the memory being used by all the existing processes exceeds the available RAM, the operating system moves pages (4-KB pieces) of one or more virtual address spaces to the computer’s hard disk. This frees that RAM frame for other uses. In Windows systems, these “paged out” pages are stored in one or more files (Pagefile.sys files) in the root of a partition. There can be one such file in each disk partition. The location and size of the page file is configured in System Properties (click Advanced, click Performance, and then click the Settings button).

Users frequently ask "how big should I make the pagefile?" There is no single answer to this question because it depends on the amount of installed RAM and on how much virtual memory that workload requires. If there is no other information available, the typical recommendation of 1.5 times the installed RAM is a good starting point. On server systems, you typically want to have sufficient RAM so that there is never a shortage and so that the pagefile is basically not used. On these systems, it may serve no useful purpose to maintain a really large pagefile. On the other hand, if disk space is plentiful, maintaining a large pagefile (for example, 1.5 times the installed RAM) does not cause a problem, and this also eliminates the need to worry over how large to make it.

Microsoft basically says that it is not "needed" to ever adjust the pagefile, however adjustments could be made depending on system use and installed physical RAM to lower (or even raise) the value. Microsoft has a really good system in place for determining what to page out and what not to page out. All I'm saying is that minor performance gains could be realized by adjusting the value, so that Windows becomes more conservative in what gets paged to the harddrive. The amount of space available for Virtual Memory is a major variable used in the algorithm for determining what gets paged.
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
I would like to point out that the size of the virtual memory in your system can indeed be called upon.


the pagefile is not Virtual Memory.


Most likely these programs that "require" a pagefile to be set are in fact just allocating a ridiculously large amount of memory, and only using pieces of it. This was a common practice with older 16-bit DOS applications, and old habits die hard; the developers and QA testers wouldn't see this "problem" because those blank pages would be paged out and not use up any space (except in the table used to track used pages whose name I can't remember (You can probably use this to increase your own self worth by googling it and claiming you've known it since you were 11)).. Anyway, in such a case they would only consume space when necessary by way of the application writing to that area of the allocated memory. Without a pagefile those empty but allocated pages consume space. On the other hand, some memory allocation functions and their flags can be set by the application to commit immediately or to set various other options (which again, I can't necessarily be bothered to look up and probably remember wrongly), so not all applications that have otherwise identical code paths would encounter the same scenario, and some that make multiple allocations with various flags could be found to have problems in different situations.
 
Quote
i have built a program to do so myself and there is more than one method of doing it.
And yet, you cite no examples. There are plenty of functions to determine the amount of Virtual Memory Committed, the amount of Physical Memory, etc; the size of the page file, etc. And, as I admitted above, this was an erroneous statement on my part. I ask your humble forgiveness, ye of large intellect. However- again as noted above, this was somewhat tangential to my point; since the fact is that the programs and games in question often do not  those functions to determine if and of what size a pagefile is (and honestly, if they do, they are written badly; in that sense either is equally likely). Most of them instead make allocations using the standard memory allocation functions; they might request large chunks of memory, as well; with no paging file this causes problems because all of that data has to then exist in physical memory, simply because it has nowhere else to go. (Actually, I think this is a limitation of the Architecture used by Windows, since *Nix (Gates forgive me) seems to handle the lack of a swap space much better.

Actually, come to think of it, I'm not 100% sure if paging is disabled with no pagefile; I honestly have more important things to do then twiddle about with my pagefile sizes. (I'm not of course saying it's a waste of time, just that I've never been that bored. I did get bored last week and changed processor scheduling to Background services rather than foreground. But then again I mostly did that because the system in question has mySQL running as a service. it would have had SQL Server 2008 but I'm starting to suspect that there are 6-week courses on SQL Server that don't even fully cover the installation.

Quote
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.
I didn't say you were lying. I'm saying you are misguided, or perhaps purposely trying to confuse the issue by using incorrect terminology (arguably, my confusion of Virtual Address Space and Virtual Memory didn't help either). you continue to refer to the pagefile as "virtual memory" when it is not, virtual memory on any protected mode operating system is simply memory. A program doesn't know- unless it explicitly asks- whether some piece of memory it allocated is in a pagefile, a ReadyBoost drive, or is in physical memory; instead it just uses it, and if it's in the pagefile it get's faulted into physical memory. "Virtual Memory"; at least on Protected-Mode Operating Systems- is simply memory. All Applications allocate Virtual Memory; where that data actually ends up is where the "Virtual" part comes from; Removing all options for where it ends up but Physical Memory doesn't change that.


Quote
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.
Fair Enough. Though when I ran, some years ago, with 1GB of Memory and disabled the page file, I must admit that I saw neither a perceptible increase nor a perceptible decrease in it's typical speed.

I did encounter the errors; but I didn't have any crashes. Programs would run out of memory, but usually they had graceful error handling. Those that didn't of course crashed in that situation, and it would certainly be fair to argue- as you have- that this jeopardizes system stability. However, a counter-point to this is that adding a small pagefile doesn't really solve those same problems, which is that there isn't enough Virtual Memory within which to store allocated pages. Virtual Memory being the sum of all memory- (Physical Memory, ReadyBoost Drives and Pagefiles;  I believe the latter two have some overlap for redundancy purposes). Having a pagefile, at least as a I understand it (and, unlike some people I at no point claimed to know a lot, which means that I shouldn't be the one with the burden of proof thereof) allows some changes with the way the Memory Manager works. I don't know if what I remember is outdated information- possibly based on 9x, or not. My understand is that without a pagefile the memory manager has to deal with larger blocks (64K, iirc), as opposed to smaller, 4K blocks that it would with any sized pagefile. My fallible human brain has forgotten the specifics of why this is the case, but I seem to remember the lack of a pagefile being the cause. I don't know if ReadyBoost drives would resolve that, myself.


Quote
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.
I explained several good reasons for changing the pagefile settings, such as disabling the pagefile on an SSD, having a large one on a faster drive
, etc. Windows Managed is a default, and there are of course cases for which performance might be better, specifically by having the pagefile on a faster hard drive. More importantly, those types of settings are important for System Administrators in an enterprise setting; To Move a Pagefile from a Mirrored RAID array to a striped one; or to a basic disk. These sorts of capabilities are important, and being that all the various editions are built from the same master, it would be silly to disable such things in the "Home" Editionm particularly when there are in fact use cases for it.

Quote
Please try to refrain from assuming i don't know what I'm talking about because I'm always sure when i post
Well you consistently refer to the pagefile as "Virtual Memory", which it isn't. It happens to be a storage place that memory data get's virtualized to, but it's not Virtual Memory. (And yes, I will address your suppositions otherwise based on questionable sources, too).


Quote
As a moderator you should be trying your best to not be so personal. I don't think i'm knowledgeable, i am. and I've earned it from years and years of experience, the kind you could never get at a school or job.
If you aren't getting experience by way of either school, or a job, then the only way you are getting it is by screwing around in your spare time. And, of course, this is a source of experience, and it is how I myself learned much of what I know- but there is quite a difference between Learning as a hobby and learning because it's your job. Arguably, the former is typically more "passionate"; but it's also (usually) a lot more casual. You aren't always rushing to make deadlines, or learn some specific technology; "Oh I can always learn WPF later" I used to tell myself; then I basically had to learn it as part of a freelance project. (well, OK, so I chose to use and learn WPF, but I <had> to learn how to use it at that point so it went far less casually). My point is that there are different kinds of experience, and each one of them- School, Job, and as a hobby/spare time stuff, has their own specific advantages. To only follow one of those three, and- with no actual understanding of what the others entail- declare it superior, is rather silly. The interesting part is that for some reason I think the "school" experience is the least valuable, although that's the only one I do not have; and previously I would have said that both school and job experience offered nothing that I couldn't discover on my own, so I guess it's a mental thing. Technically, I've only recently started to gain what one could call Job Experience, everything before that was as a hobby, so following your logic I still possess largely the "superior" experience, from which I draw most of this stuff, since most of my work at this point deals with database access,text processing,WPF, and so forth within the .NET environment and that doesn't come up much on this forum.

Your
Quote
My experience comes all the way from dos and windows 3.1.
I started with DOS 3.22 myself. Didn't have the full install and 'only' a 15MB(aftermarket) hard drive; still better than the 360K floppy though.
I probably haven't been working with computers as long as you have; I myself only really "got into" then around the age of 16.

Quote
I literally taught myself how to format a computer and work with drivers.
I had a Book- Running MS-DOS by Van Wolverton. Do I lose points?

Quote
I was literally fixing computers with DOS boot diskettes when i was 9 or 10 years old.
This is largely irrelevant. I fail to see the logic here. How does you booting computers with DOS (a Real Mode Operating System) floppies to edit CONFIG.SYS and AUTOEXEC.BAT qualify you in the area of dealing with the intricacies of memory management in a Protected Mode Memory Paging Operating System? I mean, if I need some help using DEVICEHIGH, or my AT system gives me that "Internal Stack Failure, System halted" Message (fixed, if I recall, either by adding a FILES= or a BUFFERS= line to config.sys, I forget) , I could see this sort of thing being relevant or helpful, but otherwise it's entirely redundant; it's almost like saying "How dare you question my capability with Photoshop! I'll have you know that I was formatting floppies at a 5th grade level when I was still in diapers!"; the cited expertise- is simply not wholly relevant, and you can't really shoehorn it in there as if it is.

Quote
if there's anything left for me to learn i doubt its going to be here
[/quo
That is an incredibly unhealthy attitude. When somebody- such as yourself- essentially says "I Know Everything"- even in a narrowed scope or context such as a forum like this one- it's rather clear that they do not. Whether by saying that they are trying to prove the idea to either themselves or others depends on the specific case, but the claim is borderline ridiculous except when limited in scope to a very narrow field, and even then, it can often be wrong. Once you assert to know everything about a given subject, you stop looking for new things in that area to learn, and in some ways it becomes a self-fulfilling prophecy; knowing everything about a given subject becomes equivalent to simply ignoring things you don't know about it.
Quote
http://www.worldstart.com/understanding-virtual-memory-and-ram/

That's two misconceptions that I've been able to easily source now. And for a programmer thinking that Windows programs don't have access to pagefile information, is a pretty bad misconception in my eyes.
Except it's not a misconception.

I was drawing everything I wrote out of memory, so naturally there would be abberations, mistakes, misrememberances, etc. I apologize if I gave you the mistaken impression that I was a cyborg or something. Although actually it would be pretty awesome to be a cyborg, though I imagine the novelty of needing a socket wrench to use the bathroom wears off quickly.  While I am glad that I was able to help you feel better about yourself by picking out those particular issues, the fact is that I am actually quite impressed that I only had two such mistakes, which aren't really "mistakes" in that I was more or less simplifying things because I wasn't able to rightly express the particulars while maintaining any measure of brevity. My mistake here is rather trivial, really. I confused Virtual Memory with Virtual Address Space. Wether the passage is accurate with that substitution, I'm sure you will let us know, while ignoring the core of the debate here revolving around the particulars of the effects of having the paging file set to a small size, disabled, or simply leaving it as system managed.

As noted multiple times, Virtual Memory is not the pagefile, but rather, Virtual Memory is the combination of Physical RAM as well as the pagefile. In that sense, I must concede that (actually I think I did above, not sure) having a limited Pagefile size will set an upper limit on Virtual Memory by virtue of the Pagefile typically being the only "stretchy" factor. On the other hand, if you plonk in a ReadyBoost drive you'll add more Virtual Memory, too.


Quote
All I'm saying is that minor performance gains could be realized by adjusting the value
so that Windows becomes more conservative in what gets paged to the harddrive.
The algorithm used is the same, what changes are the variables; in this case only the "staler" data in physical memory would be paged out.
This could (debatably) result in some sort of speed improvement in very specific use cases since a larger proportion of data stays in Physical Memory, But, generally speaking, most people aren't going to fit into those specific use cases. And such changes could be detrimental in some circumstances, as well.

Quote
The amount of space available for Virtual Memory is a major variable used in the algorithm for determining what gets paged.
Is this Virtual memory (Physical Memory+Pagefile+Readyboost and other crap) or just the pagefile? Outside it's use in the standard knapsack problem for memory management I don't think the size(s) of the pagefile(s) are used in any integral calculations. (on the other hand, the solution to the knapsack problem as defined there could be considered important and the "size of the knapsack" (to extend the metaphor) is an important variable in that case.
I was trying to dereference Null Pointers before it was cool.