Page 1 of 1
Turning off Virtual Memory test
Posted: Sat Jul 13, 2013 3:28 pm
by Steve Steele
I've been experimenting with turn off Virtual Memory. (Ah, the good ole' days of System 7 - although it's totally not the same).
I have SSDs and a 26GBs of RAM now. I don't expect to eek out that much more performance but I'm testing it.
For apps like Safari and Photoshop on HDDs this could be a big deal. But with DP on all SSDs I'm not so sure. I'm still figuring everything in DP that gets page swapped.
If anyone has insights or would like to discuss or experiment with this, please chime in.
The cmnd is:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
to re-enable VM type..
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
unload and load are the only differences.
Thanks
Re: Turning off Virtual Memory test
Posted: Sat Jul 13, 2013 3:52 pm
by bayswater
I'll be interested in what happens. I haven't seen a discussion of this since somewhere around 10.3. The advice from the gurus then was that sooner or later, memory allocation for a newly launched process would fail, and the system would go entirely dead.
Maybe with so much RAM you'll never reach that point, but I do recall claims that there could be processes that request VM regardless of the amount of RAM you have.
The question may be entirely academic. It would only work if your system never requests VM for any process. But if it never does, then what advantage is there in removing it?
Re: Turning off Virtual Memory test
Posted: Sat Jul 13, 2013 6:25 pm
by Steve Steele
Thanks for the reply. Did you ever test the VM trick yourself?
bayswater wrote:I'll be interested in what happens. I haven't seen a discussion of this since somewhere around 10.3.
I saw some SL discussions.
The advice from the gurus then was that sooner or later, memory allocation for a newly launched process would fail, and the system would go entirely dead.
Presumably only under certain circumstances, if RAM is running low, or if an app makes a certain call for it. But keep in mind I'm talking about
only running DP (with MIR - which could be important), and only DP related apps.
Maybe with so much RAM you'll never reach that point, but I do recall claims that there could be processes that request VM regardless of the amount of RAM you have.
Right, I read that too. but I'm curious to know what gets pages in DP. I'm assuming audio and sample files. I know a lot more about Mac OS Classic's VM then I do OSX's VM.
The question may be entirely academic. It would only work if your system never requests VM for any process. But if it never does, then what advantage is there in removing it?
True. But in this senario, if the OS and DP (and all that goes with it) don't start paging, then maybe.. who knows?. If samples get paged, perhaps it could make a difference. That's a big if I realize. Especially with SSDs.
I agree that in today's computing turning off VM, which may be of little benefit for DAW users is questionable. But getting every ounce of performance is important enough for me to check it out.
Another poster was having problems with pops and clicks, and his solution was to take his SSD RAID 0 and turn it into JBODs. He said it fixed his problem. Good for him, but I don't entirely subscribe to the SSD RAIDs are not of benefit. And in my spare time, I'd like to dig as deep as I can into optimization. I haven't done that in a while. I've been using DP since 1.6 so, yes, I've read the manual.
I meant to post this video elsewhere but I'll put it here too.
Check this short video out.. This is 2 Samsung 830 256GB SSDs in a software RAID 0. Notice I'm getting about 500MB/s read time on a SATA II bus! That's 200MB/s faster than a single SSD in a SATA II bus. I have no problems with TRIM as I don't write to these drives.
http://www.youtube.com/watch?v=Aw2dBYf3lZs
I'll report back.
Re: Turning off Virtual Memory test
Posted: Sat Jul 13, 2013 6:56 pm
by bayswater
nightwatch wrote:Thanks for the reply. Did you ever test the VM trick yourself?
No I never did. The general consensus appeared to be that the system would become unstable, and there would be very little benefit. I've been able to get what I want by adding RAM.
Although you say all you'll run is DP, remember that there will be a lot more running than that just from the system. Look at all the stuff listed in Activity Monitor when you run nothing. And you can expect DP to lead to the initiation of other system processes too.
But anyway, there's nothing lost by trying it out except the time taken to execute the terminal commands and maybe a couple of cold restarts. I'll be interested in what you get out of it.
Re: Turning off Virtual Memory test
Posted: Sat Jul 13, 2013 7:41 pm
by thenightwatch
bayswater wrote:nightwatch wrote:Thanks for the reply. Did you ever test the VM trick yourself?
Although you say all you'll run is DP, remember that there will be a lot more running than that just from the system. Look at all the stuff listed in Activity Monitor when you run nothing. And you can expect DP to lead to the initiation of other system processes too.
Right. I don't know what parts of the OS load into VM, especially deep levels of the OS. I don't know if all that is publicially documented or if it's available for developers. I know a good developer. I should ask him.
I guess because in Mac Classic it made such a difference, it got my attention. Although this is a totally different deal. In OS classic I used to create RAM disks all the time. I've tried that with OSX too. Helps some. Need more RAM, but maybe I'll try both.
I can't think of what part of DP that could be loaded into VM that would matter since my VM drive is an SSD. So are my samples and audio drives. Both are pulled from a SSD.
So I can't think how disabling VM would help DP at all. MIR and other IRs maybe. I'lI keep my eyes on the Activity Monitor like a hawk.
Peak had an option for how many GBs of audio it would load into RAM.
I'm going to disable VM, reboot (make sure it's still off), launch DP and MIR and run some tests.
Anyway, blah, blah, blah. Hey, I enjoy this stuff.

Re: Turning off Virtual Memory test
Posted: Sat Jul 13, 2013 9:51 pm
by Shooshie
I'm way out of my league here, so take my comments with a grain of salt, but Classic MacOS was not designed for running with virtual memory, so other than providing a quicker CPU recall for recently used data, the benefits were not always that great.
OSX, on the other hand, was designed with virtual memory as an essential part of it. Turning it off may drastically slow things down. The only way to know for sure is to try it, but I'm kind of betting that there is no comparison between Classic MacOS and OS X when it comes to VM. It's as native to OS X as it was alien to Classic MacOS.
Shooshie
Re: Turning off Virtual Memory test
Posted: Sun Jul 14, 2013 11:26 am
by cuttime
If one is not getting any page outs or swaps, then turning off VM should not make any difference whatsoever.
BTW, is "nightwatch" and "thenightwatch" the same person, or is someone pulling the proverbial wool over our eyes?
Re: Turning off Virtual Memory test
Posted: Fri Jul 19, 2013 10:38 pm
by Armageddon
Shooshie wrote:I'm way out of my league here, so take my comments with a grain of salt, but Classic MacOS was not designed for running with virtual memory, so other than providing a quicker CPU recall for recently used data, the benefits were not always that great.
OSX, on the other hand, was designed with virtual memory as an essential part of it. Turning it off may drastically slow things down. The only way to know for sure is to try it, but I'm kind of betting that there is no comparison between Classic MacOS and OS X when it comes to VM. It's as native to OS X as it was alien to Classic MacOS.
I used to use 3rd-party virtual memory programs a lot back in the golden days of Classic, particularly Ram Doubler. Mind you, this was back when I had a PowerBook Duo 210 and had a whopping
4 MBs of RAM to play with. You pretty much couldn't even
run software on that thing without something like Ram Doubler in the background. It also had a 40 MB hard drive, have no idea what the speed would have been ("floppy disk slow" would be a good guess), so I have no idea how Ram Doubler even worked. When I graduated to a G3 iMac, I don't recall having any kind of virtual memory software, and it seems to me that both MOTU and Opcode (for Vision DSP) recommended NOT using virtual memory software, because it would cause huge conflicts with audio streaming from disk, so I never bothered getting any. As you said, I definitely don't think virtual memory was a thing around 8.6-9.2.2.
I have iFreeMem now, which is basically defragmentation software for Intel Mac (non-virtual) memory. I noticed small gains when I was using it on my 32-bit machine with 2 GBs of RAM, but on my current machine, a 64-bit MacBook with 4 GBs of RAM, it doesn't appear to make any difference (iFreeMem has a pie chart showing memory allocation and where it's being used. The freed-up RAM doesn't seem to change.
Re: Turning off Virtual Memory test
Posted: Sat Jul 20, 2013 1:54 pm
by jloeb
nightwatch wrote:Another poster was having problems with pops and clicks, and his solution was to take his SSD RAID 0 and turn it into JBODs. He said it fixed his problem. Good for him, but I don't entirely subscribe to the SSD RAIDs are not of benefit.
It's not that SSD RAIDs are not of benefit. It is that SSD RAIDs will never be of
consistent and reliable benefit
for DAW use.