Results 1 to 16 of 16

Thread: ok, now my virtual memory is acting funky

  1. #1
    master of the wierd people Member Ibrahim's Avatar
    Join Date
    Dec 2007
    Location
    Who cares
    Posts
    3,855

    Default ok, now my virtual memory is acting funky

    well, this isn't so much a problem, as much as it is an inconvenience:

    my performance options, especially the virtual memory, keeps resetting itself. I frankly don't know why. I try to keep it at the recommended 9102 MB, but everytime I restart the computer, it keeps resetting to 6240 MB

    I only noticed this recently, so I do not know how long it's been doing this.


    srsly, my computer is weird.
    Last edited by Ibrahim; 03-15-2012 at 23:12.
    I was once alive, but then a girl came and took out my ticker.

    my 4 year old modding project--nearing completion: http://www.twcenter.net/forums/showthread.php?t=219506 (if you wanna help, join me).

    tired of ridiculous trouble with walking animations? then you need my brand newmotion capture for the common man!


  2. #2
    Member Member slysnake's Avatar
    Join Date
    Jun 2010
    Location
    Gillingham, Kent, England, UK.
    Posts
    607

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Ibrahim View Post
    well, this isn't so much a problem, as much as it is an inconvenience:

    my performance options, especially the virtual memory, keeps resetting itself. I frankly don't know why. I try to keep it at the recommended 9102 MB, but everytime I restart the computer, it keeps resetting to 6240 MB

    I only noticed this recently, so I do not know how long it's been doing this.


    srsly, my computer is weird.
    You could always try changing the CMOS battery on your motherboard, when they are running low they often reset settings on your PC :)

  3. #3
    Senior Member Senior Member Tellos Athenaios's Avatar
    Join Date
    Feb 2006
    Posts
    12,252

    Default Re: ok, now my virtual memory is acting funky

    What does CMOS have to do with Windows kernel parameters?
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    “ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  4. #4
    Nobody expects the Forum Administrator Lemur's Avatar
    Join Date
    Jan 2004
    Location
    Wisconsin Death Trip
    Posts
    15,728

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Ibrahim View Post
    virtual memory, keeps resetting itself. I frankly don't know why. I try to keep it at the recommended 9102 MB, but everytime I restart the computer, it keeps resetting to 6240 MB
    You're running Win7, correct? Seems this is not an unknown issue. A fix that worked for one poster: "Disabling AFS.sys (sc config afs start= disabled) did the trick. Hope this helps others as well."
    "Those are my principles, and if you don't like them ... well, I have others." — Groucho Marx

  5. #5
    Senior Member Senior Member Tellos Athenaios's Avatar
    Join Date
    Feb 2006
    Posts
    12,252

    Default Re: ok, now my virtual memory is acting funky

    Feel free to disregard this, especially as it might be a tad patronising too, but insatiable curiosity drives me to ask: why do you need that much anyway?

    Virtual memory as you call it, or pagefile, is what is more traditionally in OS design known as "swap". Swap is space on disk which is reserved for your kernel to dump things it doesn't need right now so it can make the most of what RAM you have. You also need it for things like hibernation because then a snapshot of the "state of play" is made on your PC, written to RAM and a few knobs are in BIOS/EFI are twidled with so that next time you start the machine it can restore this "state of play" from swap.

    So with that in mind: what do you need approximately 8.5GiB of swap for? I mean if you have about 8GB of RAM then it sort of makes sense to have that much for the purpose of hibernation, but since you call it a "performance" option I don't think you have...

    To me it sounds like you found a formula to calculate "optimal" size somewhere on the Internet, as a way of tuning performance. Okay that makes sense if you have little RAM to play with. But if you do have a lot of RAM you want to get as close to a minimal amount of swap as possible, and if you don't hibernate you may not want it at all.

    Consider that your kernel must do "accounting" of the memory which it hands out to programs as well as of the memory which has been written to swap. It does so by creating a big sort of spreadsheet which simply lists chunks of this memory whether they're in use or not, and whether they're in swap or not (among other things, quite a a lot of other things, in fact -- which is why this accounting is "expensive"). This means that if you can't actually use almost all of your memory having "more of it" reduces performance (more overhead in accounting) rather than enhancing it.

    My considered advice would be not to fight with the OS over what the optimal amount of swap is. It's a losing proposition, especially when it comes to "performance".

    The big exception is of course if you run programs which do a lot of data crunching and do all of it in RAM. Like protein folding, databases, betting statistics, trading, and so on. But that's a bit specialist work, and anyway you don't want to do any of that on Windows due to its rather poor I/O performance.
    Last edited by Tellos Athenaios; 03-20-2012 at 22:13.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    “ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  6. #6
    Nobody expects the Forum Administrator Lemur's Avatar
    Join Date
    Jan 2004
    Location
    Wisconsin Death Trip
    Posts
    15,728

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Tellos Athenaios View Post
    My considered advice would be not to fight with the OS over what the optimal amount of swap is.
    Actually, this is an excellent point.
    "Those are my principles, and if you don't like them ... well, I have others." — Groucho Marx

  7. #7
    master of the wierd people Member Ibrahim's Avatar
    Join Date
    Dec 2007
    Location
    Who cares
    Posts
    3,855

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Tellos Athenaios View Post
    Feel free to disregard this, especially as it might be a tad patronising too, but insatiable curiosity drives me to ask: why do you need that much anyway?
    because the computer (ironically?) is calling for that? I specifically mentioned that in the first post here....and from what I understand, i7's pretty much demand it (so yes, 8 GB of RAM)


    my performance options, especially the virtual memory, keeps resetting itself. I frankly don't know why. I try to keep it at the recommended 9102 MB, but everytime I restart the computer, it keeps resetting to 6240 MB
    and no, I don't think it's patronizing.


    @ Lemur: that's actually why I posted here: this simply didn't work. mainly because I don't have it...somehow.
    Last edited by Ibrahim; 03-23-2012 at 02:52.
    I was once alive, but then a girl came and took out my ticker.

    my 4 year old modding project--nearing completion: http://www.twcenter.net/forums/showthread.php?t=219506 (if you wanna help, join me).

    tired of ridiculous trouble with walking animations? then you need my brand newmotion capture for the common man!


  8. #8
    Iron Fist Technical Administrator Husar's Avatar
    Join Date
    Jan 2003
    Location
    Essen, Germany
    Posts
    11,115

    Default Re: ok, now my virtual memory is acting funky

    But who recommends it and how did your computer demand it?

    Did it talk to you or display a message that said it demands more virtual memory?

    As far as I can tell, Tellos explained why you don't need more and just because some random guy elsewhere claims he got 1 fps more with larger virtual memory(that's what this sounds like to me anyway) I wouldn't think it's recommended or demanded in any way.

    Or did you get any bugs or serious performance troubles?


    "Topic is tired and needs a nap." - Tosa Inu

    Ron Paul 2012!!!

  9. #9
    master of the wierd people Member Ibrahim's Avatar
    Join Date
    Dec 2007
    Location
    Who cares
    Posts
    3,855

    Default Re: ok, now my virtual memory is acting funky

    But who recommends it and how did your computer demand it?
    I already mentioned who (or rather, what) is recommending this.


    anyhow: no, it doesn't just give me a popup: it only shows it in the performance settings, under the advanced options thing. here is a picture for evidence:



    as I mentioned, I don't think it's a problem, I just find it unusual that it is resetting itself.
    Last edited by Ibrahim; 03-29-2012 at 02:36.
    I was once alive, but then a girl came and took out my ticker.

    my 4 year old modding project--nearing completion: http://www.twcenter.net/forums/showthread.php?t=219506 (if you wanna help, join me).

    tired of ridiculous trouble with walking animations? then you need my brand newmotion capture for the common man!


  10. #10
    wicked, evil Moderator Xiahou's Avatar
    Join Date
    Aug 2002
    Location
    in the cloud.
    Posts
    8,726

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Tellos Athenaios View Post
    My considered advice would be not to fight with the OS over what the optimal amount of swap is. It's a losing proposition, especially when it comes to "performance".
    I haven't examined the issue in depth for Win7, but I know in XP and Server2003, I would regularly set virtual memory to a static size. (Generally 1.5x RAM- which is what Windows uses for its "recommended" value)

    My reasoning is that when Windows has to grow the file between its min/max sizes, it can lead to significant drive fragmentation. The swap file would grow, spreading chunks around your partition, which then might have other files fill in around it and even backfill the space when the swap shrinks.... rinse, repeat.
    Last edited by Xiahou; 03-31-2012 at 00:56.
    "Government is not reason; it is not eloquent; it is force. Like fire, it is a dangerous servant and a fearful master."

    George Washington

  11. #11
    Senior Member Senior Member Tellos Athenaios's Avatar
    Join Date
    Feb 2006
    Posts
    12,252

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Xiahou View Post
    My reasoning is that when Windows has to grow the file between its min/max sizes, it can lead to significant drive fragmentation. The swap file would grow, spreading chunks around your partition, which then might have other files fill in around it and even backfill the space when the swap shrinks.... rinse, repeat.
    My reasoning is that any sane OS would prioritise swap over userland files. So it would simply make sure to leave a continuous block of $max_swap in the partition and thereby avoid fragmentation entirely.
    Last edited by Tellos Athenaios; 03-31-2012 at 16:45.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    “ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  12. #12
    wicked, evil Moderator Xiahou's Avatar
    Join Date
    Aug 2002
    Location
    in the cloud.
    Posts
    8,726

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Tellos Athenaios View Post
    My reasoning is that any sane OS would prioritise swap over userland files. So it would simply make sure to leave a continuous block of $max_swap in the partition and thereby avoid fragmentation entirely.
    I guess you don't consider XP and 2k3 sane OSes then? I'd be surprised if it functioned much differently in Win7, but I have 8GB of RAM so my pagefile rarely sees much use.
    Last edited by Xiahou; 04-01-2012 at 02:29.
    "Government is not reason; it is not eloquent; it is force. Like fire, it is a dangerous servant and a fearful master."

    George Washington

  13. #13
    Senior Member Senior Member Tellos Athenaios's Avatar
    Join Date
    Feb 2006
    Posts
    12,252

    Default Re: ok, now my virtual memory is acting funky

    Quote Originally Posted by Xiahou View Post
    I guess you don't consider XP and 2k3 sane OSes then? I'd be surprised if it functioned much differently in Win7, but I have 8GB of RAM so my pagefile rarely sees much use.
    Eh no, the fact that setting a fixed amount of swap works at all is due to the fact that the OS assumes/requires a minimal amount of swap. That's what you are setting: the size of the pagefile. Now, in its default config Windows assumes 1.5 times RAM as reserved for swap and wants to allocate something of that size as a single pagefile. However it will permit pagefile to grow beyond this when you start to use more then pagefile + RAM of memory, if it can find more bits of free disk space to use as pagefile. This of course does fragment the pagefile but the crucial part of the scheme is that the fragmentation is temporary, for instance the swap file will be reduced to its original size with the next reboot. So it is a mitigation to avoid a worse scenario of OOM.

    The point of using a single contiguous file has nothing to do with fragmentation per se, because swap is effectively memory mapped anyway -- allowing you to mimise the I/O you need to do down to the pages you actually want to read/write. So fragmentation is very much a secondary concern, what matters is that if it is a single file (or partition) then you can optimise the location of it and you can also bypass file system logic entirely by doing raw disk I/O. A level or two of indirection is removed, speeding up the process considerably. That sort of thing gets a lot more difficult when you are dealing with fragments, in the sense that you do not know in advance where they are so you need the services of a file system to do lookup and translation for you.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    “ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  14. #14
    wicked, evil Moderator Xiahou's Avatar
    Join Date
    Aug 2002
    Location
    in the cloud.
    Posts
    8,726

    Default Re: ok, now my virtual memory is acting funky

    I'm not talking about page file fragmentation- that's a non-issue. What it results in though is disk fragmentation. Sure, the swap is recreated on boot- but what about the normal files that filled in around the swap file fragments while the computer was running? They're not going anywhere.

    Perhaps an illustration is in order...
    Spoiler Alert, click show to read: 
    swap file = *
    normal files = |
    ***|||||
    swap file grows....
    ***|||||*
    files are written to disk..
    ***|||||*||
    swap grows again
    ***|||||*||*
    ***|||||*||*|||
    -reboot- swap file returns to initial size...
    ***||||| || |||
    but the disk is still fragmented. Then more file fragments can fill in those spaces, so when the swap grows again it fragments a new chunk of your disk. Over time, this can get really ugly.


    Linux wisely gets around this issue by having an entire swap partition. In windows, I usually set the pagefile to a static size. Moving the file to its own partition is an option in Windows, but Windows kind of expects there to be a pagefile on the system drive and you lose some things if its not there- like crash dumps.
    Last edited by Xiahou; 04-06-2012 at 05:08.
    "Government is not reason; it is not eloquent; it is force. Like fire, it is a dangerous servant and a fearful master."

    George Washington

  15. #15
    Senior Member Senior Member Tellos Athenaios's Avatar
    Join Date
    Feb 2006
    Posts
    12,252

    Default Re: ok, now my virtual memory is acting funky

    I'm not sure how much of an issue that is compared to the volume of size changes incurred by normal files. I expect that disk fragmentation due to swap changing its size is a tiny fraction (normally it only happens when you overtax your machine to the tune of using 250% of RAM capacity, basically) compared to what a bit of light office usage or browsing (cache) would inflict. Really the whole issue of disk fragementation is, while valid, more of a marker of poor FS implementation or poor choice of FS for the given medium (rotational vs tape vs flash).

    Btw, you can have a swapfile in Linux too if you're so inclined.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    “ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  16. #16
    Amphibious Trebuchet Salesman Member Whacker's Avatar
    Join Date
    Nov 2006
    Location
    in ur city killin ur militias
    Posts
    2,934

    Default Re: ok, now my virtual memory is acting funky

    Using a swap partition in linux is generally required and highly advised, even for the most modern distros. I've always made it a point to match the system's install RAM capacity to be safe. Worked like a charm for over a decade now.

    I've let Windows control my swap file size ever since I started using XP, it's been fine and I've never had any issues. The only time fiddling with it ever produced any tangible performance results was with Win2k, and the gains were absolutely minimal if at all.

    "Justice is the firm and continuous desire to render to everyone
    that which is his due."
    - Justinian I

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO