Re: [NTLK] [OT] Re: speed: OS X's fault

From: Steven Scotten <>
Date: Sat Sep 26 2009 - 01:34:30 EDT

First, Bob, thank you for your clear explanation of VM versus swap.
Those terms are often used interchangeably, I imagine because virtual
memory addressing is what made using swapfiles possible (at the OS

On Sep 25, 2009, at 11:30 AM, Bob Carls Dudney wrote:

> (I can't imagine why it's useful to protect swap via RAID. Weird.)

Sorry, I should have been more specific. It's RAID0. No protection at
all. It's done to maximize performance because hard drives are so much
slower than RAM. So if a hard drive is used for jobs that RAM is
usually used for, things get very slow. Photoshop likes to have its
own swap drive because otherwise it is competing with the OS for reads
and writes.

> I've no experience with an app that does its own swapping, but
> presuming Photoshop's swapping is completely independent of VM, if
> you have adequate RAM to run Photoshop and your other apps without OS
> X needing to swap RAM to disk, you'd probably be very pleased at the
> performance boost with swap off (at least on 10.5 or less -- sounds
> like Snow Leopard is better at VM. I can't try since PB can't run
> 10.6.)

I'm not sure if this will be useful to you or not, but on the G4 PB
with 1.25GB of RAM, just turning on the machine under Leopard would
leave 400+MB "green" or free according to Activity Monitor. Which
means 800ishMB were in use. On the Mac Pro with 32GB of RAM just
turning on the machine takes 2.5GB or more. That didn't change much
from Snow Leopard to Leopard. What it tells me is that OS X has a
number of things that it thinks it needs to do in RAM but will
preemptively use swap for in order to preserve free memory.

As far as Photoshop is concerned, I don't think that anything other
than the speed of the swap drive matters. Photoshop works with large
files and potentially keeps many levels of undo taking up to the full
size of the file. Before Photoshop had more than one level of undo,
the rule of thumb was that Photoshop would need three times the size
of the file in RAM. You have a 1.5GB file, you need 4.5GB of RAM free
or else Photoshop is using swap. Now that Photoshop has up to 32
levels of undo you potentially have a lot of RAM Photoshop wants.

How does the swapping you're referring to relate to the "Page Ins",
"Page Outs" and "Swap Used" reported in Activity Monitor? On my PB
right now, with Safari, Mail, iTerm and Terminal (why both? I dunno)
Skype and Navicat all open I have 360MB of Page Ins. Page Outs and
Swap Used are both 0. I've been assuming that means that the OS isn't
doing any swapping.

On the Mac Pro while running Photoshop, I've had Photoshop swapfiles
in excess of a half terabyte while Activity Monitor said the Page Outs
and Swap Used were both 0. I've been assuming that means that the OS
wasn't doing any swapping.

It's also my understanding that OS X will use available RAM for a disk
cache. That's the explanation I've been given for why I can use up all
my 32GB of RAM running Photoshop while Photoshop itself (32-bit
application) can only see a fraction of that.


The NewtonTalk Mailing List -
The Official Newton FAQ -
The Newton Glossary -
WikiWikiNewt -
Received on Sat Sep 26 01:35:11 2009

This archive was generated by hypermail 2.1.8 : Sat Sep 26 2009 - 16:30:00 EDT