Author Topic: Memory leak?  (Read 21294 times)

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Memory leak?
« on: January 03, 2021, 09:01:26 PM »
PM+ v6.0, b5438
Windows 10

I've noticed that if I leave PM+ running it eventually uses up most of the memory of my laptop.  I have seen memory usage over 5-7 GB.  I only have 1 catalog with about 800 photos.

I restarted PM+, noted the catalog status dialog showed everything was idle, and left PM+ running in the background.  I then noted the memory usage at 10 minute intervals:

Time (minutes)Memory used (MB)
0305
10329
20869
301528
402158
502935
603910

Let me know if you need any other information.



Offline rienvanham

  • Member
  • **
  • Posts: 67
    • View Profile
Re: Memory leak?
« Reply #1 on: January 04, 2021, 12:54:31 AM »
I can't confirm this.

PMP, around 11.000 photo's:

stays steady on about 370 MB;

PMP; Windows 10 PRO

Rien.

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: Memory leak?
« Reply #2 on: January 04, 2021, 07:26:45 AM »
Yes, further testing shows it is not a consistent behavior.  I will try to do additional testing.

Offline SteveMattan

  • Newcomer
  • *
  • Posts: 13
    • View Profile
Re: Memory leak?
« Reply #3 on: January 04, 2021, 05:10:51 PM »
I had been running PM+ for several days, sometimes using it, sometimes in the background. I checked the memory this morning and it was a 5.12 GB. In the evening it was at 5.33 GB, a span of approximately eight hours. I did not use it at all during that time (alas, I was working).

I quit and relaunched PM+ and using iStat Menus, I was able to see the memory climbing, from 755 MB to over 900 MB in a matter of minutes.

I quit and restarted again, to time the memory increase, and it's been 15 minutes and the PM+ is at 329 MB. At 20 minutes it was still at 329 MB, although it did fluctuate between 329 and 330 in those five minutes.

I quit and restarted again. Memory usage started at 307 MB. And over the twenty minute period I watched it went up to 325 MB at the ten minute mark, 326 MB at fifteen minutes and 325 MB at twenty minutes.

Interesting.

I'll let it run overnight and report back in the morning.

Stay well,

SteveM

Offline SteveMattan

  • Newcomer
  • *
  • Posts: 13
    • View Profile
Re: Memory leak?
« Reply #4 on: January 05, 2021, 05:28:23 AM »
As promised I left PM+ run overnight. When I checked this morning it was at 329 MB.

I then made PM+ the active application and the memory is climbing, even after switching to another app. I did nothing in PM+ other than select the link to these forums from the Help menu.

In the time I took to type this memory usage has climbed to 815 MB. It took 2.5 minutes to get to over 1 GB.

It seems to have plateaued at 1.12 GB, as at the ten minute mark it holding steady at that value. It is now twenty minutes and the value has remained at 1.12 GB.

macOS Catalina 10.15.7. Photo Mechanic Plus Version 6.0, build 5438 (a729133).

Please let me know if I can provide any further information.

Stay well,

SteveM




Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Memory leak?
« Reply #5 on: January 05, 2021, 09:10:54 AM »
Everyone,

This is not an indication of a memory leak.  It is Photo Mechanic's caching system building up thumbnails and previews over time.  Check your Caching preferences and see how much memory you've devoted to the Memory Cache.

-Kirk

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: Memory leak?
« Reply #6 on: January 05, 2021, 09:27:05 AM »
Check your Caching preferences and see how much memory you've devoted to the Memory Cache.

Mine is set to 1623 MB.  Why would I be seeing memory usage > 3GB and on occasion 6 or 7GB?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Memory leak?
« Reply #7 on: January 05, 2021, 11:02:17 AM »
Check your Caching preferences and see how much memory you've devoted to the Memory Cache.

Mine is set to 1623 MB.  Why would I be seeing memory usage > 3GB and on occasion 6 or 7GB?

How many displays do you have and what resolution are they?  PM will go over the cached amount when displaying previews.  Also, metadata for each image is not factored into the memory cache so if you have many images among your open contact sheet tabs, each image will eventually have its metadata loaded.  How many total images did you have under these circumstances among all of your contact sheet tabs?

-Kirk

Offline SteveMattan

  • Newcomer
  • *
  • Posts: 13
    • View Profile
Re: Memory leak?
« Reply #8 on: January 06, 2021, 04:20:54 PM »
Everyone,

This is not an indication of a memory leak.  It is Photo Mechanic's caching system building up thumbnails and previews over time.  Check your Caching preferences and see how much memory you've devoted to the Memory Cache.

-Kirk

Thanks. That makes sense.

Stay well,

SteveM

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: Memory leak?
« Reply #9 on: February 23, 2021, 03:05:11 PM »
How many displays do you have and what resolution are they?  PM will go over the cached amount when displaying previews.  Also, metadata for each image is not factored into the memory cache so if you have many images among your open contact sheet tabs, each image will eventually have its metadata loaded.  How many total images did you have under these circumstances among all of your contact sheet tabs?
-Kirk

PM+ v6.0, b5560
Windows 10
Laptop currently using an external display at 1920 x 1080

I haven't had time to follow-up on this but while using PM+ today I noticed the behavior again and did some testing.  I closed and reopened PM+ and let it sit idle (no interaction), there are only 2 contact sheets open - one with 9 photos and the other with 23 photos.  The program used only 300MB of memory initially but after about a half hour the program jumps to approximately 10% CPU usage and the memory usage starts going up.

I've reproduced the behavior 3 times and on this last round it has been chugging away for around an hour and the memory usage is up to 5,200 MB.  This still seems like abnormal behavior - an hour at 10% CPU and over 5.2 GB of memory for 32 photos?

Let me know if you need any additional information.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Memory leak?
« Reply #10 on: February 23, 2021, 04:15:17 PM »
How many displays do you have and what resolution are they?  PM will go over the cached amount when displaying previews.  Also, metadata for each image is not factored into the memory cache so if you have many images among your open contact sheet tabs, each image will eventually have its metadata loaded.  How many total images did you have under these circumstances among all of your contact sheet tabs?
-Kirk

PM+ v6.0, b5560
Windows 10
Laptop currently using an external display at 1920 x 1080

I haven't had time to follow-up on this but while using PM+ today I noticed the behavior again and did some testing.  I closed and reopened PM+ and let it sit idle (no interaction), there are only 2 contact sheets open - one with 9 photos and the other with 23 photos.  The program used only 300MB of memory initially but after about a half hour the program jumps to approximately 10% CPU usage and the memory usage starts going up.

I've reproduced the behavior 3 times and on this last round it has been chugging away for around an hour and the memory usage is up to 5,200 MB.  This still seems like abnormal behavior - an hour at 10% CPU and over 5.2 GB of memory for 32 photos?

Let me know if you need any additional information.

That does sound like a memory leak for sure.  If we can reproduce it, we will fix it.

-Kirk

Offline Bob Russell

  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 276
    • View Profile
    • Camera Bits, Inc.
Re: Memory leak?
« Reply #11 on: February 25, 2021, 10:55:44 AM »
So far we have not been able to recreate the memory leak problem on our Windows machines.  I would like to try your exact configuration on my machines. If you can export your Photo Mechanic preference settings using the Export button at the bottom of any preference page, you will be able to save out a PM_Export.PMX file.

What file type(s) are in your contact sheets?

Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your PM_Export.PMX file.

Thank you for your help with this problem.

--Bob
« Last Edit: February 25, 2021, 11:31:26 AM by Kirk Baker »

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: Memory leak?
« Reply #12 on: February 27, 2021, 06:13:21 PM »
Hi Bob,

I've attached the PMX file.

Another thing I've noticed is when this issue occurs the Organizer tab is frozen - all the controls within it are unresponsive.  The Navigator and Favorites tabs are fine and the rest of PM+ is working.

Let me know if you need anything else.

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: Memory leak?
« Reply #13 on: February 27, 2021, 06:20:05 PM »
What file type(s) are in your contact sheets?

Only jpg files on the 2 contact sheets.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Memory leak?
« Reply #14 on: February 28, 2021, 10:04:29 AM »
Another thing I've noticed is when this issue occurs the Organizer tab is frozen - all the controls within it are unresponsive.  The Navigator and Favorites tabs are fine and the rest of PM+ is working.

How do you get the Organizer tab to become frozen?

-Kirk