High Memory Usage [#12415]

Report bugs & feature requests for MediaMonkey for Android and learn about the newest beta build.

Moderator: Gurus

Lowlander
Posts: 58516
Joined: Sat Sep 06, 2003 5:53 pm

High Memory Usage [#12415]

Post by Lowlander »

I'm seeing high memory usage by MMA for a long time now including the latest betas. It's coming in at nearly 250MB and Android reports 243MB of Data usage. Is this normal, is this left over from older builds?
Clefspeare13
Posts: 1
Joined: Fri Nov 28, 2014 1:12 am

Re: High Memory Usage

Post by Clefspeare13 »

I too have been encountering this issue, and it really slows down my device.
Image
Image
Lowlander
Posts: 58516
Joined: Sat Sep 06, 2003 5:53 pm

Re: High Memory Usage

Post by Lowlander »

For me it runs out of memory (affecting Google Play updates), speed doesn't seem to be an issue though
rusty
Posts: 8844
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: High Memory Usage

Post by rusty »

Any idea as to what triggers this (I'm not seeing this issue--the most mem usage I'm seeing is 60MB, higher than I'd like, but not close to what you're seeing)?

Thanks.

-Rusty
Lowlander
Posts: 58516
Joined: Sat Sep 06, 2003 5:53 pm

Re: High Memory Usage

Post by Lowlander »

It's been like this for a long time, but only on this device. I do sync regularly and a decent amount of files (~2000) including video files. What would be typical memory usage for MMA?

What would be stored in Data for MMA? Maybe that gives a clue as to why it's so high.
rusty
Posts: 8844
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: High Memory Usage

Post by rusty »

2000 tracks in total on your device? I usually test with about 1500, and like I said, max usage is at about 60MB.

-Rusty
Lowlander
Posts: 58516
Joined: Sat Sep 06, 2003 5:53 pm

Re: High Memory Usage

Post by Lowlander »

It's around that total among both memories. Not that much files. I do do regular syncs changing out the files (most are random AutoPlaylists). Still 250MB seems excessive and is causing memory issues.
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: High Memory Usage

Post by rivorson »

I also see this excessive data storage. I have two devices; one has about 1200 audio tracks and the other has the same audio tracks plus 15 videos. The device with only audio currently has 66MB of data stored for the app while the video device has 522MB of data stored. In the past I've seen the video device get up to 2GB of data stored for MMA, and it stays at 2GB until I clear the data.

I can't say with certainty but I have noticed a correlation between cancelled/failed syncs and increased app data storage. My guess is that MMA is creating temporary files during sync that aren't cleared when the sync fails.
Lowlander
Posts: 58516
Joined: Sat Sep 06, 2003 5:53 pm

Re: High Memory Usage

Post by Lowlander »

Canceled syncs and video happen here too. Perhaps MMA fails to clean temporary/cached data if things go wrong (canceled sync) or stores excessive data for video files.
rusty
Posts: 8844
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: High Memory Usage

Post by rusty »

Would it be possible to get a rough idea of what MMA's memory utilization is on your devices after a reboot?

Then what it changes to after a sync?

Is it device-specific?

I've tried cancelling syncs, and syncing large amounts of data, but am not seeing the problems you're observing.

Thanks.

-Rusty
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: High Memory Usage

Post by rivorson »

I've rebooted both devices. The tablet that I use for video increased from 522MB to 529MB while the phone barely changed from 65.43MB to 65.44MB.

I then tried running a sync on the tablet to see how it affected the amount of app data. The videos take about an hour to convert so there was a long period with MMA just waiting, but I noticed that the amount of data was gradually increasing during this period. Over the hour it went from 532MB to 534MB even though there was no active transfer. I am vaguely aware that MMW sends the sync progress to MMA as XML data, so could it be that MMA is logging every status update and storing the logs indefinitely? This could explain why the data storage increases over time on both devices, why converting video results in drastic increase in data storage compared to audio, and why the usage stops at 2GB assuming the log file is trimmed at that point.

I also monitored the app data storage while the video file was being transferred, and disconnected the WiFi a little after half way through the transfer to force a failure. Neither of these activities noticeably increased the data storage.
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: High Memory Usage

Post by rivorson »

I have tested this by clearing the data then syncing a single video twice; once with 0% conversion quality for a fast sync and one with 100% conversion quality for a slow sync. The slow sync resulted in double the app data storage.

The process I used was:
1. Set 0% conversion quality in MMW.
2. Clear app data, delete MediaMonkey folder, and delete all media.
3. Open MMA and select the sync server, but do not sync yet.
4. Read app data usage, which was 444KB.
5. Sync.
6. Read app data usage, now at 4.43MB.

7. Set 100% conversion quality in MMW.
8. Clear app data, delete MediaMonkey folder, and delete all media.
9. Open MMA and select the sync server, but do not sync yet.
10. Read app data usage, which was again 444KB.
11. Sync.
12. Read app data usage, now at 8.69MB.

I forgot to check the size of the converted file, but since the source file and target bitrate was the same for both tests I assume they would be a similar output size. It looks like MMA's app data usage increases with time spent syncing with MMW, regardless of the content of the sync.
rusty
Posts: 8844
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: High Memory Usage

Post by rusty »

And the higher memory utilization remains even after the device is rebooted. Correct?

Also, is 444KB utilization correct? I've never seen MMA use that little. How are you measuring utilization?

Thanks.

-Rusty
Lowlander
Posts: 58516
Joined: Sat Sep 06, 2003 5:53 pm

Re: High Memory Usage [#12415]

Post by Lowlander »

Yes, reboots don't lower MMA data usage.
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: High Memory Usage [#12415]

Post by rivorson »

Yes, this persists after reboot.

The 444KB is correct, but that is after clearing the data so the database is empty at that point. That's measured by Android's app settings. I've done it again to create a screenshot and this time it came out at 440KB.

Image
Post Reply