Resolved VM Size - Quad

Discussion in 'PowerPC Macs' started by Ih8reno, Dec 29, 2016.

  1. Ih8reno macrumors 65816

    Ih8reno

    Joined:
    Aug 10, 2012
    #1
    I was curious about this and thought maybe one o you can help me. On my quad with 10gb of ram my vm size is about 40gb. Is this normal or something I should be worried about.
     

    Attached Files:

  2. RhianB, Dec 29, 2016
    Last edited: Dec 30, 2016

    RhianB macrumors 6502

    RhianB

    Joined:
    Sep 3, 2016
    Location:
    Albuquerque, NM USA
    #2
    I was told years ago that VM shouldn't really be more than 2.5x your actual installed memory & ideally 1.5x. If it is more, the OS attempts to use it instead of your installed memory which slows down performance etc (swapping to disc is much slower vs. RAM). This was specifically a discussion in regards to windows gaming boxes but I don't think the os matters much.

    Good luck.
     
  3. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #3
    VM memory size doesn't matter. It isn't written to disk. In simple terms, its fake or ghost memory that doesn't matter to the end user. The number that does matter is the swap number. That is what gets written to disk when ram space gets low.
     
  4. Ih8reno thread starter macrumors 65816

    Ih8reno

    Joined:
    Aug 10, 2012
    #4

    Thank you both! guess I worried for nothing
     
  5. RhianB macrumors 6502

    RhianB

    Joined:
    Sep 3, 2016
    Location:
    Albuquerque, NM USA
    #5
    Your welcome :)

    I have a question for Intell - Is there a way to limit swaps? Do you limit swapping by reducing VM size ie: amount of swappable space? How does one manually adjust this in OSX or is it purely an automated function? Thanks!
     
  6. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #6
    In older versions of OS X you could have some control over the swap size by editing the launch daemon that spawns it. It is strongly recommended to not alter the swap parameters. The best way to limit the amount of swapping done, is to have enough memory and not overload your machine with open processes.
     
  7. RhianB macrumors 6502

    RhianB

    Joined:
    Sep 3, 2016
    Location:
    Albuquerque, NM USA
    #7
    Yeah, I was thinking about some of those older computers like clamshells for example that have less that 1gb of RAM. Then again, with one of those, having a good amount of swappable VM albeit slower is better than having none at all ... and well, doing nothing because you ran out of RAM.

    Thanks! Sorry for hijacking your thread Ih8Reno :D
     
  8. Ih8reno thread starter macrumors 65816

    Ih8reno

    Joined:
    Aug 10, 2012
    #8
    All good, posts like this are great for everyone to learn more about their machines
     
  9. jbarley macrumors 68030

    jbarley

    Joined:
    Jul 1, 2006
    Location:
    Vancouver Island
    #9
    As a point of interest, my G5 quad has just 4GB ram and the vm runs about 40GB...
     
  10. MagicBoy macrumors 68040

    MagicBoy

    Joined:
    May 28, 2006
    Location:
    Manchester, UK
    #10
    Those are windows specific numbers for the page file. They don't have any relevance to OS X.
     
  11. RhianB, Dec 31, 2016
    Last edited: Dec 31, 2016

    RhianB macrumors 6502

    RhianB

    Joined:
    Sep 3, 2016
    Location:
    Albuquerque, NM USA
    #11

    Thanks for clarifying that. So what would be relevant to OSX? Is the correct number 10x the installed RAM? I just checked my 2Gh DP PMG5 with 4GB RAM and it too had a VM of approx 40GB so it seems like OSX likes the VM there. Why such a difference between Windows and OSX?

    I was obviously oblivious to the oblund and obtuse opposition between OSX and the other operating system. Do you care to opine? :D
     
  12. MagicBoy macrumors 68040

    MagicBoy

    Joined:
    May 28, 2006
    Location:
    Manchester, UK
    #12
    Intell covered it in post 3.

    Each process can have 4GB (32-bit) or 16EB (64-bit) of logical (virtual) memory space, so there is no correct number. The logical memory is divided into uniformly sized chunk called pages. The memory manager in OS X then maps logical memory pages to physical RAM or backing store as appropriate. Once the physical RAM runs low then OS X starts utilising the backing store (swap file) and performance will start to suffer.

    There's a few rules for "the other operating system", where the page file defaults to 1.5x system RAM when created. Mainly so it can copy the contents of system RAM to the page file in the event of a blue screen for debugging purposes.
     
  13. RhianB macrumors 6502

    RhianB

    Joined:
    Sep 3, 2016
    Location:
    Albuquerque, NM USA
    #13
    I guess where I am confused is if the VM is irrelevant, then why have it at all and instead just let the OS manage swaps as it typically does? I mean its not like HDDs are tiny anymore. What circumstance would necessitate a user messing with it other than BSOD?
     
  14. MagicBoy macrumors 68040

    MagicBoy

    Joined:
    May 28, 2006
    Location:
    Manchester, UK
    #14
    Ask me on the slack sometime, this isn't the place for Windows memory management!
     
  15. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #15
    Don't confuse virtual memory with swap. They are very different things on OS X and other UNIX based machines.
     
  16. RhianB, Jan 1, 2017
    Last edited: Jan 1, 2017

    RhianB macrumors 6502

    RhianB

    Joined:
    Sep 3, 2016
    Location:
    Albuquerque, NM USA
    #16
    So virtual memory is the drive space OSX allocates for files to be swapped? What I envisioned from the above replies is that VM is not real physical memory rather simply the total amount of drive space that OSX says it will use for swapping if RAM runs short.
     
  17. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #17
    No, virtual memory doesn't go anywhere. It doesn't exist anywhere. Don't look or even think of that number on OS X systems. Swap is not virtual memory. It is created as needed when real memory in the ram gets low automatically by the system. There is no need to for the system to make swap files on the hard drive, as it just takes up hard drive space.
     
  18. RhianB, Jan 1, 2017
    Last edited: Jan 1, 2017

    RhianB macrumors 6502

    RhianB

    Joined:
    Sep 3, 2016
    Location:
    Albuquerque, NM USA
    #18
    Ok. So in regards to OSX, when we talk about swapping, it is the computer swapping files (I assume to the hdd) in the event ram is used up. And I get that Swapping is completely separate from VM, So if VM is literally nothing, existing nowhere then why is it there? What is VM's function? Because what I thought VM was (space OS allocates for swapping) in OSX is actually not that. Sorry for the dingaling questions, I'm just royally confused I guess.
     
  19. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
  20. MagicBoy macrumors 68040

    MagicBoy

    Joined:
    May 28, 2006
    Location:
    Manchester, UK
    #20
    When free physical RAM is low the OS memory manager relocates (pages out) inactive pages held in physical memory to swap. This frees up physical memory for another process to use. You'll tend to notice paging in from swap when you start using an application that has been running in the background and it stutters back into life.

    The TL;DR of virtual memory benefits are :
    1) Being able to utilise more memory than is physically installed
    2) Stability - applications do not have to manage their own memory
    3) Security - isolates applications from one another
     

Share This Page