As I mentioned in an earlier post, I’m working on a review of EVGA’s GeForce GTX 285 Mac Edition. I just finished writing a section about GPU memory usage under OS X (since the 285 has a hefty 1GB frame buffer) and thought I’d publish it as a standalone before the review is done. I've been considering doing more things like this in the future, where you get pieces of a review as I finish them before the full thing is done. Let me know what you think.

{poll 136:240}

How Much Video Memory Do You Need in Mac OS X?

Honestly, one of the biggest uses for a new graphics card under OS X is having additional video memory.

The contents of each window and the windows themselves are drawn by the GPU and stored in video memory. Previous versions of OS X either drew windows in system memory and then composited all of them in video memory, or did everything in system memory and just outputted the final scene to the video card. Ever since OS X 10.4, the entire drawing and display process happens on the GPU and in video memory. Ars Technica’s John Siracusa has an excellent explanation of the whole process.

Each window gets treated as a 2D OpenGL surface and all of the character and image rendering, blending and display happens on the GPU. The GPU is much faster at all of this than the CPU so it made sense. The result is much lower CPU and system memory usage. What it also means is that the amount of video memory you have matters.

If you run out of video memory, the GPU has to swap data in and out of system RAM. The trip to system memory is much higher latency than just grabbing windows from video memory, and thus we see performance suffer. Faster memory busses and PCIe 2.0 both help minimize the impact, but it’s there nonetheless.

The issue is never about how many windows you can have open, but how smoothly effects like Dashboard and Exposé run. Those depend on having enough video memory to store/manipulate all open windows.

I ran some tests to figure out exactly how much video memory was enough for a single display. I started with a blank desktop and measured available video memory. On a 512MB card, at 2560 x 1600, you end up with 488MB of free video memory in OS X 10.5.7.

Depending on the contents of the windows you open, their memory requirements will differ. I found that a full height Safari 4 window showing the AnandTech home page was pretty stressful from a memory footprint standpoint. A single Safari 4 window required 7MB of video memory at 2560 x 1600. Finder windows are much cheaper, some application windows are much more expensive (more on this later).

With a single window requiring 7MB, 10 requires about 70MB. Now things don’t always scale linearly and there’s additional overhead for dealing with more windows. At 10 windows that overhead appears to be around 1MB. While a single Safari 4 window needs 7MB at 2560 x 1600, ten will need around 71MB; twenty windows will need 144MB.

Lower resolutions require less video memory. At 1680 x 1050 the cost per 10 windows drops from 71MB to 44MB.

I extrapolated the data out to 130 Safari 4 windows and presented the video memory requirements, dependent on resolution in the graph below:

If you have a 30” monitor running at its native resolution (2560 x 1600), a 512MB video card will get you just under 70 windows.

Note that not all applications play nicely. Take Photoshop CS4 for example. One of its major features is the ability to enable OpenGL acceleration within the application. With each image being OpenGL accelerated you get benefits like being able to zoom and rotate smoothly, the downside is that each image you open in Photoshop now eats up even more video memory.

Under OS X each 12MP image from my digital camera that I open in Photoshop eats up around 56MB of video memory (at 2560 x 1600)! To make matters worse, OS X won’t reclaim all of the memory even if you close all of the images in Photoshop. You need to exit Photoshop to get all of your video memory back.

While it would take 70 normal windows to max out the 512MB of video memory on a GeForce GT 120 at 2560 x 1600, it would take less than nine 12MP images open in Photoshop to do the same. And once again, you don’t get that memory back when you close your images - only after you exit Photoshop. Most other windows in OS X will give you your GPU memory back as soon as you close the window.

If you find yourself doing a lot of work in Photoshop, you’ll want to either limit the number of images you have open at once or disable OpenGL acceleration. And by all means, quit the app once you’re done editing. Of course you could always move to a graphics card with more memory...

Comments Locked

30 Comments

View All Comments

  • Larso - Friday, July 17, 2009 - link

    Speaking of OS X memory usage, why is it that the (all programs quitted) memory consumption just keeps on increasing when the system is not rebooted for days/weeks? I know that the inactive memory is of no concern, but to me it seems that both wired and active memory consumption indeed grows. Sorry if the question is slightly offtopic, but I have not been able to find a good answer anywhere.

    Is it normal OS X (leopard) behaviour? Of course, the software updates mandates a reboot every now and then. But as a switcher, I had hoped that the days of rebooting every now and then, just to make the OS happy, would be over... Not so it seems.
  • Griswold - Friday, July 17, 2009 - link

    I havent rebooted my windows machines just to make the OS happy since the (to me) long gone days of XP. However, the effect you describe can be seen on pretty much any OS because its most likely some driver with a memory leak...
  • uibo - Friday, July 17, 2009 - link

    what you have described here is a memory leak bug or some sort of aggressive caching (which shouldn't happen if your computer is not doing anything).
  • vj8usa - Friday, July 17, 2009 - link

    Can VRAM usage even be monitored in Windows? I'd love to see how much I'm using in Vista, but can't figure out how.
  • iwodo - Friday, July 17, 2009 - link

    What about playing Video, Viewing Image SlideShows .. etc

    By the graph it looks like most of us really only need 512MB Video Memory.
  • SiliconDoc - Thursday, July 30, 2009 - link

    Person who just got the GTX285 for their Mac replacing the red rooster failure.
    " I have a new Mac Pro, a 30" Cinema HD Display and now an amazingly improved image on the screen. I had the ATI Radeon 4870 HD but …Read morewhat a difference 500 more MBs make! Again I say WOW! "
    ----
    http://store.apple.com/us/product/TW387ZM/A#">http://store.apple.com/us/product/TW387ZM/A#
    ATI loses again....
    ----
    Also, suddenly, a 1 gig card is not wanted at an enthusiast site, namely because it's an Nvidia. roflmao - it's soooooo predictable here I can hardly believe this article - and guess who wrote it...rofl
    ---
    Yes, no need for more video memory - a gig is a waste...OSX who needs more vid memory hahahahahahaaaaaaaaaaaaa
    ----
    Leave it up to Derek here to dis Nvidia AGAIN, by asking if the GTX285 with 1 gig is "even neccessary" for OSX... the bleeding bias once again cannot be contained.
    Enjoy a 512 card.
    Good lord.
  • anandtech02148 - Thursday, July 16, 2009 - link

    interesting, is microsoft doing anything similar to this? they have tons of gpus unlike Apple. such a waste for a gpu to just play video games.
  • Flunk - Thursday, July 16, 2009 - link

    Yes, it's called Aero. The big reason why you really need to have a Directx 9.0 GPU to run Vista properly.
  • Voo - Thursday, July 16, 2009 - link

    If we're at it.. is there any known workaround for the Photoshop memory leak?

    Even if you've got a 1024mb card, you'll inevitably run out of memory and things start to get really slow till you restart Photoshop.

    Annoying, but I found no solution on the net :/
  • psychobriggsy - Thursday, July 16, 2009 - link

    I'd imagine that video memory would be:

    desktop X * desktop Y * 4 (32-bit screen) * 2 (double buffering)
    + for all windows
    window X * window Y * 4 (32-bit screen). I don't know if there is a display image and a render image, or if that is configurable in the application itself (e.g., to prevent tearing in videos Quicktime might have a display and render texture, but a normal window doesn't need that).

    So, 2560x1600 would be 16MB a window. Your Safari windows were nearly half-width but full height? That would explain 7MB a window. The desktop is probably 32MB straight up (double buffered), and the background picture another 16MB. However it is possible that Apple uses some form of texture compression for these types of texture.

Log in

Don't have an account? Sign up now