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.

    Virtual Memory in OS X

    Discussion in 'Apple and Mac OS X' started by SP Forsythe, Jun 20, 2011.

  1. SP Forsythe

    SP Forsythe Notebook Evangelist

    Reputations:
    173
    Messages:
    664
    Likes Received:
    0
    Trophy Points:
    30
    Does anyone know if OS X handles virtual memory any differently depending on the main storage device?

    For example, would a MBA with a SSD have potential undue wear on the SSD if the OS was heavily reliant on the SSD for performing virtual memory tasks on a system with a small (2 Gb) main memory allocation with routine multiple apps running?


    If so, is that reason enough that 2 Gb on an MBA is "saving pennies, only to lose dollars" later on?
     
  2. Sonicjet

    Sonicjet Notebook Evangelist

    Reputations:
    93
    Messages:
    400
    Likes Received:
    0
    Trophy Points:
    30
    2GB is way too little for no page file on windows, however....
    Well my new macbook pro has ~ 600Mb of OS 10.6 memory usage when running nothing, less than 850Mb with chrome open, take what you may from that, I don't think that you will touch the Virtual memory, OSX handels memory very nicely, it will fill the ram with OS and App data to load quickly but then remove it if you need that ram, it will not page and thus touch the SSD unless you are using > 2Gb of memory on actual running, operating, applications. I in fact used to run my old Asus UL30Vt with no page file just for that reason, it on windows did not touch 4Gb of usage so with the way more efficent mac I would not worry.

    Use the activity monotor to see how much ram you are using, look at the active number plus the wired number under system memory.
     
  3. SP Forsythe

    SP Forsythe Notebook Evangelist

    Reputations:
    173
    Messages:
    664
    Likes Received:
    0
    Trophy Points:
    30
    Good info , Sonic. However, my point of posting was not addressed.

    Nor am I looking for justification of 4 Gb.

    Specifically I am asking that which I indicated in the first sentence of my original post.
    I am wondering if OS X does anything to limit the intensity of swapping, specifically writes to an SSD, if the Mac is short on physical memory to begin with. Or is the treatment of such identical across all platforms regardless of storage media?
     
  4. Sonicjet

    Sonicjet Notebook Evangelist

    Reputations:
    93
    Messages:
    400
    Likes Received:
    0
    Trophy Points:
    30
    I don't think you understand, I did not justify 4Gb I just said that I didn't come close to 4Gb in windows and I don't think you will have that big of an issue with 2Gb in OSx, if you are not using all of your memory, you are not swapping at all normally, no VM being used at all. I would imagine that Apple has thought about this in designing the machine, also the VM is kept to one location of the drive normally so if it does wear it out you just lose 4Gb, that is how SSDs work , they wear out space, not performance or the entire drive.
     
  5. SP Forsythe

    SP Forsythe Notebook Evangelist

    Reputations:
    173
    Messages:
    664
    Likes Received:
    0
    Trophy Points:
    30
    I take it then your answer to my question is somewhere between a soft "no" and "no comment"?
     
  6. Ayle

    Ayle Trailblazer

    Reputations:
    877
    Messages:
    3,707
    Likes Received:
    7
    Trophy Points:
    106
    OS X will not touch the swap as long as there is free ram. Afaik Apple hasnt done anything special to reduce writes to a ssd since wear leveling is the job of the ssd controller. If you are afraid of having to use your swap just go with the 4gb even though under normal uswge 2gb should be plenty.
     
  7. yuio

    yuio NBR Assistive Tec. Tec.

    Reputations:
    634
    Messages:
    3,637
    Likes Received:
    0
    Trophy Points:
    105
    due to the nature of Virtual memory I HIGHLY doubt it will matter if your on a disk or SSD. basically when ram is full the machine will page out data (lots of random writes and reads if you are doing a lot of paging), if your out of ram there is NO way to avoid this, simple, SSD or not. OS X or Windows.

    So, if you use very little apps at one, 2GB will be fine as it will not/barely touch your swap file and won't wearout your SSD. if you are constantly using all your ram in will beat the crap out of your SSD.

    so, personally I'd buy 4GB, but up to you.

    PS. 2Gb = 256Mega Bytes of ram... B = Byte, b = bits,
     
  8. jackluo923

    jackluo923 Notebook Virtuoso

    Reputations:
    1,038
    Messages:
    3,071
    Likes Received:
    1
    Trophy Points:
    105
    They don't sell "2Gb" ram anymore. The most common type is 16 "Gb" or 32"Gb" variant.

    In otherwords, 2Gb reported on the ram is 2 Gigabyte.
     
  9. H.A.L. 9000

    H.A.L. 9000 Occam's Chainsaw

    Reputations:
    6,415
    Messages:
    5,296
    Likes Received:
    552
    Trophy Points:
    281
    Straightforward:

    No. It doesn't. It sees SSD's the same as HDD's. Apple leaves wear-leveling and garbage collection to the controller, unlike TRIM with Windows. It's an unintelligent system, but it works decent enough... until Apple can come up with something better in their software or firmware.

    If you're apps are eating RAM like candy, get more RAM or live with OSX thrashing random reads and writes to your drive. ;)
     
  10. masterchef341

    masterchef341 The guy from The Notebook

    Reputations:
    3,047
    Messages:
    8,636
    Likes Received:
    4
    Trophy Points:
    206
    the wear leveling will be the same as with anything else.

    you COULD make a tradeoff of time (or add more processing power and add cost) for less writes by compressing all swap data before writing and decompressing before reading. I doubt apple does that in software, but some hard drives do that on their own. Especially SSD's. Beyond that, there is nothing you can do. If a program needs more memory than is available in main memory, you either write to the hard drive or crash.