memory use

General discussions about LaunchBar
macsterdam
Rank 2
Rank 2
Posts: 41
Joined: Thu Nov 16, 2006 5:22 pm

memory use

Post by macsterdam » Tue Mar 06, 2007 5:41 pm

Of late I have noticed LaunchBar using up to 70mb of real ram, where this used to be around 35 mb. I quite sure I haven't changed much.

So, any suggestion what might be the cause of this?

Thanks.

norbert
Objective Development
Objective Development
Posts: 648
Joined: Thu Nov 09, 2006 6:30 pm

Post by norbert » Wed Mar 07, 2007 2:05 pm

No need to worry. The numbers as shown in Activity Monitor are a bit misleading. The displayed "Real Memory Size" also includes shared memory, that's memory shared with other applications which use the same shared system libraries.

And even worse, if an application temporarily requests some amount of memory (LaunchBar e.g. requires more memory when it performs its index update), the memory consumption shown in Activity Monitor stays at the higher level, even if the application has already properly released and returned all unused memory. So you still may see the high Real Memory values, although the actual memory consumption is already "back to normal".

macsterdam
Rank 2
Rank 2
Posts: 41
Joined: Thu Nov 16, 2006 5:22 pm

Post by macsterdam » Wed Mar 07, 2007 3:43 pm

ah - ok. Thanks very much for the explanation. Much appreciated. :)

gamov

Memory usage

Post by gamov » Sat Jun 16, 2007 6:18 am

Well, what's the point of having an application like Activity Monitor then?!?

Launchbar on my system is using 260MB of real memory!!! Which is completely unacceptable for a launcher!

I'm a bit suspicious with your explanation.

When Safari has been running for a long time (and uses a lot of memory), quitting and relaunching helps a lot.

Gam

norbert
Objective Development
Objective Development
Posts: 648
Joined: Thu Nov 09, 2006 6:30 pm

Re: Memory usage

Post by norbert » Sat Jun 16, 2007 9:43 pm

Hi gamov!

I've sent you a more in-depth explanation of this issue via email. Here's a brief summary of what I wrote:
gamov wrote:Launchbar on my system is using 260MB of real memory!!! Which is completely unacceptable for a launcher! I'm a bit suspicious with your explanation.

It's quite easy to write a few lines of C-Code that demonstrate this behavior. You just have to allocate lots of small memory blocks in a loop (e.g. 3 million 64-byte-blocks), and then free these memory blocks immediately in a further loop.

This just causes a short peak of memory consumption, but since this memory is given back to the OS immediately, the final memory consumption of our test program should go back to zero.

But guess what: If we run this test program, Activity Monitor shows a "Real Memory" value of 192 MB, but this value does NOT shrink, although all the allocated memory has already been given back to the OS.

What does this mean? Is this amount of memory now lost forever? Is it no longer available to other applications? No. As soon as any other applications asks for a larger amount of memory, the OS will take that unused memory regions and hand them over to the requesting application.

For example, if we now start iTunes and use Cover Flow to browse through hundreds of album covers, this causes iTunes to request quite a lot of memory. And as a consequence you will see that iTunes' Real Memory value keeps growing, while our test app's Real Memory starts to shrink. And also LaunchBar's Real Memory value as well goes down to 10-20 MB (mainly depending on the size of your index).

So there's really no need to worry about these numbers shown in Activity Monitor. We've put great efforts in optimizing LaunchBar's memory consumption and the program's "real" real memory footprint is actually quite small.

egrieco
Rank 1
Rank 1
Posts: 27
Joined: Sun Jul 22, 2007 5:29 pm
Location: Arizona

Memory usage issue

Post by egrieco » Thu Mar 27, 2008 8:36 pm

I am posting this here to try and get an idea of how many other LaunchBar users are experiencing the same issue. Even though I have already sent an email to Objective Development support. No response yet, I assume that they are investigating the issue.

The same issue seems to be at play in the following threads:
http://forums.obdev.at/viewtopic.php?t=196
http://forums.obdev.at/viewtopic.php?t=169

Now on to the actual message
-------------------------

Unfortunately, we cannot just ignore the numbers in Activity Monitor.

Within the past month or two LaunchBar has taken to consuming over 1GB of real memory, depending on how long it has been running, rather than the usual 30MB that it always has. No changes have been made to my configuration before or since this started happening.

In your example you state that once another program requires more memory the memory of the example program will be released. This is not the case for LaunchBar. After being left running overnight it consumes 1GB of real memory. This memory is not being released as my machine starts thrashing due to lack of available free memory. Additionally, LaunchBar becomes unresponsive (as reported by activity monitor) when using this amount of memory.

On quit all memory is immediately released and is available to other apps. Unfortunately this means that instead of constantly running LaunchBar in the background as I always have, it now needs to be restarted periodically.

I have not done much Cocoa development, despite programming in C++ and Qt on the mac for several years. Nevertheless I would like to help troubleshoot this problem. It seems that MallocDebug, the ObjectAlloc template for Instruments or Shark would be the right tool to use to troubleshoot this issue. If anyone has any educated guesses as to what specifically might be causing the problem let me know so I can look at those areas first rather than wasting time playing with the tools.

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Post by Dennis » Thu Mar 27, 2008 9:36 pm

I currently have an uptime of about 3 days and LaunchBar is currently consuming 31.77 MB of real memory (I have LaunchBar set to launch at login). This amount seems typical on my system, and I've never noticed it consuming significantly more than this. But I'll report back here if I see any changes over the next week or two.

ludwigschubert
Rank 4
Rank 4
Posts: 285
Joined: Fri Jun 29, 2007 5:54 pm
Location: Germany, Bavaria

Post by ludwigschubert » Thu Mar 27, 2008 9:41 pm

@Dennis:
I think it's a system specific bug, it doesn't seem to occur for everyone. 6 days uptime with 21 MB memory footprint here.

FredSmith
Rank 3
Rank 3
Posts: 125
Joined: Thu Jan 31, 2008 5:12 am

Post by FredSmith » Fri Mar 28, 2008 2:15 am

ludwigschubert wrote:@Dennis:
I think it's a system specific bug, it doesn't seem to occur for everyone. 6 days uptime with 21 MB memory footprint here.


About 5 days uptime and it seems to be holding at around 17MB of real memory.

Could I ask if all the people who are experiencing the problem, are running the same version of the operating system?

Weaselboy
Posts: 18
Joined: Sun Mar 02, 2008 6:32 pm

Post by Weaselboy » Fri Mar 28, 2008 5:14 pm

About two days uptime with LB using 13.5MB on 10.5.2. Must be something unique to your config.

egrieco
Rank 1
Rank 1
Posts: 27
Joined: Sun Jul 22, 2007 5:29 pm
Location: Arizona

System Details

Post by egrieco » Fri Mar 28, 2008 8:09 pm

I'm running on a PowerBook G4 17" with 1.33 GHz processor, 2GB RAM and 80 GB hard disk, 19 GB of which is free.

Running 10.5.2, Build 9C31

ludwigschubert
Rank 4
Rank 4
Posts: 285
Joined: Fri Jun 29, 2007 5:54 pm
Location: Germany, Bavaria

Post by ludwigschubert » Fri Mar 28, 2008 9:12 pm

So it might be connected to the processor (I just assume that most folks here are on intel CPUs). Anyone else with a non-intel CPU here who has had problems? Someone with an intel CPU who had problems? Maybe we could narrow it down…

For the time being one could just write an Applescript that checks whether LaunchBar is the frontmost app (to prevent interrupting your work) and let it run it every few hours or so via iCal or as a cron job. If LaunchBar isn't the frontmost app it would be restarted.
Not a very nice workaround but if you absolutely need LaunchBar it could help a bit.

regards,
Ludwig

FredSmith
Rank 3
Rank 3
Posts: 125
Joined: Thu Jan 31, 2008 5:12 am

Post by FredSmith » Fri Mar 28, 2008 11:35 pm

ludwigschubert wrote:So it might be connected to the processor (I just assume that most folks here are on intel CPUs).


Nope. I'm on an old Powerbook, and I'm not seeing this problem.

egrieco
Rank 1
Rank 1
Posts: 27
Joined: Sun Jul 22, 2007 5:29 pm
Location: Arizona

Memory usage update

Post by egrieco » Fri Apr 04, 2008 6:26 pm

This is very strange. Nothing has been updated and the machine has not been restarted for a month now. LaunchBar is still consuming massive amounts of memory at some times but it is now less predictable and frequent.

Formerly it would consume 1GB of memory when left on overnight and become unresponsive. Now it might do that but does not always do that.

Very odd...

et01267
Posts: 1
Joined: Fri May 02, 2008 10:33 pm

Launchbar 4.3.7 using 290MB within a minute

Post by et01267 » Fri May 02, 2008 10:38 pm

After I boot my MacBookPro C2D (10.4.11), and login, Launchbar starts. I can watch in Activity Monitor as it starts out at about 6MB and steadily climbs to 290MB of Real memory usage within about a minute. This is before I've even used Launchbar.

It's unfathomable that this could happen. Launchbar is the second biggest memory hog on my system, after Eclipse (at 297MB).

Post Reply