November 7, 2012

a band-aid for memory leak problems with Adobe Bridge (Mac)

While I do have Lightroom and Aperture, I have a preference still for using Adobe Bridge to view (and edit) individual images or groups of images. What makes Bridge easy, is that the edits (via the .xmp files), are read by both Lightroom and Bridge.

There has been one problem that has been driving me crazy on my Mac when I use Bridge … the apparent memory leak with Bridge that eventually eats up all the Free Memory on my system. I used a program called iFreeMem to regularly free up memory on both my Macs, but the program worked less well with Mountain Lion. And when I upgraded my iMac to 16Gb of RAM, iFreeMem just didn’t work properly at all.

Then some sleuthing via Google showed me a very simple way of doing this. This is something so simple that any competent software engineer will smirk (and the Linux gurus will fall over laughing) … but I wanted to put this out there as info for photographers who use Mac and Adobe Bridge, and who have been as frustrated with this problem that Adobe refuses to fix. (Or could it be a Mac problem?)


the backstory, briefly:

I use a 27″ iMac in my office, on which most of the editing work is done. I also have a MacBook Pro (hooked up to a Cinema display), which is my main machine since it is one I can take with me when I travel. Both have had this problem with Adobe Bridge from at least CS5 onwards. It has now become untenable. Beyond frustrating to watch your machine slowly drop from their 8Gb of RAM to less than 100Mb of free memory. Both machines would then become sluggish until Bridge is closed and re-opened.

In the past week, I did a clean install on both machines. The MacBook Pro’s hard drive (SSD) had it’s data corrupted, and the iMac had a recall for the hard drive. So I took it in to the nearest Apple Store for the replacement drive. (More about photography workflow and back-up plans.) At the same time, I upgraded the iMac’s memory from 8Gb to 16Gb.

I was hoping the clean installs of the OS on both computers (and the upgrade of memory on the iMac), would solve the problem. Alas, not. Even the 16Gb of the iMac would be taken up by Bridge’s incessant appetite.

So I looked around on Google. Of course, there’s a flood of info, ranging from hard-core indecipherable techie stuff, to shrugging of shoulders by Adobe on their forums. And a lot of people frustrated by similar problems.

The quick-fix / band-aid:  purging memory via Terminal

While this does nothing to solve the under-lying problem, it does help us get ahead and actually be able to use Adobe Bridge on our Macs.

- Open up Terminal (via Applications / Utilities)
- type in this command: purge

This will purge the memory, and you will be able to see the result on your Activity Monitor (as in the image at the top.)

To have easy access to this, I now keep Activity Monitor and Terminal on my Dock.

This now allows me to continue working with Adobe Bridge. Not elegant, but it helps.

As always, I would love to hear from others if they have any tips or insights.

 

links to related articles:

- Terminal 101: Managing Memory in Mountain Lion  (MacLife)
- Bridge Help / Manage the cache | Adobe Bridge CS4, CS5  (Adobe)
Using Activity Monitor to read System Memory and RAM being used  (Apple)

 

{ 23 comments. } Add a Comment

1 Phil Goh November 8, 2012 at 5:12 am

I’m surprised that this works, as purge clears the disk cache. Memory leaks on the other hand occur when a program fails to release memory it had requested once it’s finished with it.

I suspect that when the disk cache is flushed, your free memory increases because other well behaved applications have had their disk cache flushed and that memory is made available. This allows bridge to carry on leaking and claiming the newly free’d memory as its own. However, it does mean that other apps will have to regenerate their cached data and this might fail as there is no more free memory to use as a disk cache, thus impacting their performance.

In short, this is a nasty hack and Adobe really needs to fix their memory leak.

Reply

2 Neil vN November 8, 2012 at 5:14 am

I’m willing to listen to any good advice. : )

Reply

3 Phil Goh November 8, 2012 at 5:43 am

Use Lightroom :)

On a semi serious note, that Adobe are dragging their feet on an issue as serious as this suggests to me that Bridge on Mac isn’t that popular and isn’t receiving the love.

Reply

4 Trev November 8, 2012 at 6:01 am

Neil,

Is it an Adobe problem or Mac users specific, do you know?

Just I have never heard of that so I have been doing a couple of tests on my system [PC].

i7 quad core 8 processors; 12G RAM; Western Digital Velociraptor 10,000 rpm drives.

Now, I had every app I could think of open and with 76 Processes running, + including Photoshop, Bridge, ACR, Office, Lightroom, and several other standalone plug-ins running, it got to using a stable 3.68Gb memory, and the CPU only ever climbed to 52% briefly when running a very labor intensive action, lasting less then 6-8 seconds. The it sits back on the 0 to 3%.

So I rang a mate with virtually identical set up to me, got him to open all apps, then check usage, very similar.

Then I rang another mate, this one with an iMac, admitedly 3 years old, and the moment he opened Bridge, checking his resources, he noticed it steadily climbed but did not go back when not doing anything.

Just wondered, that’s very strange, and I have not heard of it, obviously no need I suppose since I don’t run a Mac.

I shall see what I can find mate, the guy with the Mac does not use Bridge constantly so he never noticed and he’s not a wedding photographer probably only doing a batch of around 50 nature shots at a time, but he’s pretty cluey with Macs, see if he can find out anything for you.

Trev

Reply

5 Neil vN November 8, 2012 at 6:20 am

Without much proof, I do suspect it is shoddy software engineering on Adobe’s part with the Mac version of the software.

Here’s a persistent Bridge CS3 problem though that I had when I still used Windows machines.

Reply

6 Neil vN November 9, 2012 at 4:19 am

Here it is again. Consistently and predictably.

It is Adobe Bridge (CS6), that grinds down the available memory to a few Mb. Hitting the Purge command in Terminal, immediately releases the memory and I am back up to 12 Gb of the 16Gb installed.

Doing this memory purge doesn’t seem to affect anything else on my computer. There’s no hiccup or anything. In fact, the computer starts working properly again.

Reply

7 Neil vN November 9, 2012 at 4:19 am
8 Trev November 9, 2012 at 9:27 am

Neil,

Well I talked to the guy I know, and he seems to agree with you, it’s Adobe version of Bridge for Mac.

He did point out this link here: http://forums.adobe.com/thread/661588

May/may not help.

Reply

9 Lorenzo November 9, 2012 at 10:22 am

Hi,

A good practice on any kind of computer is to run periodically maintenance programs. On both Win and Macs I use CCleaner, a free program which flushes caches and tmp directories among many other things- pretty straightforward to use. Another Mac alternative is Onyx which does more or less the same. you’d be amazed at how much junk one accumulates.

Cheers,

Reply

10 Trev November 9, 2012 at 9:45 pm

Lorenzo,

Ditto. Every night before bed, CCleaner gets to do it’s little job.

Also with the Registery, flushes out all unused/old registery entries.

Takes less then a minute to run.

Trev

Reply

11 Johann November 10, 2012 at 7:26 pm

Did you happen to know that you can make it even more simple?
You can change your Activity Monitor Icon to show the memory usage, such as this.

Here’s how you would want to do it. Option Click (or right click) the icon and choose this option.

Reply

12 Neil vN November 10, 2012 at 11:16 pm

aaaah, that’s a neat trick! Thanks.

Reply

13 Pete Mayes November 13, 2012 at 6:15 am

Hi
It’s the same with Windows actually. I don’t have a fancy setup – Vista, Core 2 duo and 4gig ram. But Bridge CS6 drives me nuts – just get’s slower and slower and the whole computer eventually grinds to a halt.
So, it’s not Mac only, I assure you!
Pete
BTW, off topic – a few posts back you promised us a review of the new Canon 24-70 2.8L Mk2. Waiting with baited breath as there seem to be various opinions out there!
Cheers

Reply

14 eric langlois November 14, 2012 at 3:36 pm

Thanks for the tip Neil!!

@Phil Goh – It is a well documented problem with Lightroom as well.

Reply

15 AdamJ November 20, 2012 at 1:06 pm

Good find!

I’ve been using purge for a long time now, though I have it setup as a cron job running every 10 minutes, here is the code if you’re interested:

Open terminal and enter the below to edit the cron file:

sudo crontab -e

Typically Mac chooses VIM as its editor (not good for new users), though I will show you how to use it.

Now to enter the following:

press the i key to edit the file then paste in:

*/10 * * * * purge

To save press the esc key then the : key and then type qw and press enter.

That’s it every ten minutes purge will run, as this was under the sudo account it will work for all user accounts :)

To view your crontab enter sudo crontab -l

Hope that helps someone!

AJ

Reply

16 Mattie November 28, 2012 at 4:59 pm

I tried doing the purge but it says command not found, am I doing it wrong?

Last login: Wed Nov 28 12:52:41 on ttys000
Mattie-OKeefes-MacBook-Pro:~ mattieo777$ purge
-bash: purge: command not found
Mattie-OKeefes-MacBook-Pro:~ mattieo777$

Reply

17 Neil vN November 28, 2012 at 5:01 pm

Mattie .. I am stumped. Your copy & paste there looks exactly like it should in the Terminal window.

I wonder if anyone else might have an idea?

Reply

18 Mattie November 29, 2012 at 5:07 pm

Did some more testing at home.

The Activity meter starts at about 3.3 – 3.5GB (I have 4GB RAM) with nothing running, open Bridge drops about .5GB, open PS drops another .5GB, after about 3 – 4 pictures it down under 100MB.

The purge function does nothing on my MacBook Pro? The only thing that releases the memory is restarting both programs… I’ve got to restart every 3 – 4 pictures?! How can any body attempt to get any work done? Boo Adobe/Apple.

Mattie

Reply

19 Neil vN November 29, 2012 at 5:11 pm

The pattern that I’ve noticed, is that the memory gets eaten up only while Bridge is generating the cache. Once the cache is generated, then the memory use is fairly stable and consistent.

Reply

20 Simon Grosset December 5, 2012 at 3:52 am

I’ve discovered a bit of software called ‘freememory’, available on the app store, and it works:

http://www.rockysandstudio.com/

It can be set to free the memory once available memory drops below a certain amount, or you can control it manually. It appears as an icon above your Mac desktop, alongside the time/battery/whatever icons.

Simon

Reply

21 Jon Goings January 4, 2013 at 12:54 am

I have been using the app “Memory Clean” since mid-2012. After a minute of cleaning, I have most of my memory back.

Demonstration: http://www.youtube.com/watch?v=XUIRmk24UMc
Review: http://download.cnet.com/Memory-Clean/3000-18512_4-75807234.html
Download: https://itunes.apple.com/ca/app/memory-clean/id451444120?mt=12

Reply

22 Tyler K April 15, 2013 at 6:21 pm

I do not believe that this is a problem with Adobe Bridge. This is just how Mac OS manages memory. As programs are opened and closed, inactive memory will be adjusted by the system. Inactive memory is still available to applications and the operating system. All you are doing with the purge command is clearing out the cache the system has built up. You will not do any harm to your system by using this command but you may find that commonly used applications may take longer to launch after using it.

http://support.apple.com/kb/HT1342

Reply

23 Neil vN April 16, 2013 at 12:54 am

Yet, of all the programs I use, only Bridge exhibits this behavior.

Bridge, in my experience, has bugs. And adobe doesn’t really seem to fix this, even with upgrade after upgrade.

Reply

Leave a Comment

Previous post:

Next post: