High memory usage on Mac

I’ve noticed a continuously growing amount of RAM being allocated on my Macbook Pro M1 after using Duplicati. I’ve choosed to test the cloud backup of my files to Google Drive exactly beacuse my Google Drive Desktop client have been consuming a lots of RAM (reached the absurdly 60GB with swap, I have only 16GB!).

Duplicati executed the backup very well, but after that, started a raise in memory usage even when not running any backup actively.

Any ideas of what is going wrong? Could be anything with my laptop?

Hello

how are you accessing this Google drive thingy exactly ? there is a GoogleServices driver in Duplicati, however I see the possibility that you have used your Google drive as a destination backup, as if it was a local drive. In this case there would be absolutely no reason that it would not eat memory exactly like when you are using it directly.
Generally speaking I distrust emulated drives, as often the emulation is not perfect.

I’m not sure if a get what you is talking about, but let me explain:
I’ve configured Duplicati with the default configurations to connect to Google Drive itself, not using emulated drives from Google Drive client to upload the backup. The backup is created and uploaded automatically by Duplicati.
What are you saying is that configuration will consume as much as the same amount of RAM of the direct sync with Google Drive client? There will be no reason to consume less?

I believe that this higher consumption of RAM is because some bug on Google Drive client, so a I’ve decided to test another backup sync method, even if its not a “sync” properly, but I only use the Google Drive for backup so it is what I want.

I did a quick test on a OSX 12 system with a Sftp server (I don’t have a google drive setup currently) and with a smallish backup (a few 100 of MB) I have seen Duplicati take RAM in the vicinity of 100 MB.

Note that I’m not sure how you are running Duplicati since for me it appears as ‘mono-sgen64’ in the App monitor.

Hello,
I just came here about the same problem.
I am not using anything related to Google Drive as the OP mentions, so I would say the problem is not within Google drive utilization.

I am using the latest Mac OS Monterey version 12.7.3 (21H1015) and Duplicati 2.0.7.1_beta_2023-05-25
Hardware: iMac “Core i5” 3.1 27" (5K, 2019) 3.1 GHz Core i5 (I5-8600) with 24GB RAM.

I am backing up an external USB Drive to a remote SFTP server, my locally accessible Synology DS720+ NAS with 18GB of RAM.
My backup size is below 1TB (600-800GB, I can’t be sure right now).
It started relatively quick, around 20MB/s, and after 2 days, it was still at 50% of completing the backup.
Using another backup/syncing tools, it should have completed by now, but I thought, it might be the compression Duplicati is using or something.
The backup speed went down until 2-4MB/s, very slow. And the computed started to be sluggish.
I went to the activity monitor, and it was using 100-200% (two cores I assume), and allocated 130GB of RAM! My OS was using 12GB of swap, besides the used RAM.
During my normal usage, I have never got to using this amount of swap.

Even running virtual machines, a lot of tabs opened and other programs, I got like to 1GB of swap usage.

So this doesn’t seem expected behaviour…
I stop the backup, “after the last file” option and duplicati eventually stopped.
But mono was still using almost 200% CPU.

I just restarted my Mac and haven’t opened anything yet.
To get the idea, gust before launching duplicati again i have 7GB of RAM used, and of course 0 bytes of swap used.

After launching duplicati, after stopping previously the backup and before relaunching it, says:

Last successful backup:
Today at 9:14 AM (took 1 day(s) and 20:31:07)

Source:
459,99 GB
Backup:
428,02 GB / 1 Version

I just opened duplicati, and without doing anything, activity monitor reports 120% CPU usage of mono process.

Thank you.

As scheduled jobs can run without your doing anything, did you also see that Duplicati was idle?
If there is a chance that some backup started, About → Show log → Live → Profiling might help.

A reproducible case where mono gets that busy with little Duplicati help would be interesting, and potentially a workaround could be found or the cause narrowed, but mono is kind of stagnant now.

Battle plan for migrating to .Net8 is underway, to move off of mono and stagnant .NET Framework.

Please run mono --version to see how up to date it is. Mono releases has generic release notes. Maybe there are OS limitations too. I don’t have a Mac, so can only provide generic Duplicati help.

Likely not real memory. How To Use Activity Monitor: Master Class mentions that and other kinds. Perhaps you can check your menus (if they are like picture there) to see what it is, and get others.

As scheduled jobs can run without your doing anything, did you also see that Duplicati was idle?
If there is a chance that some backup started, About → Show log → Live → Profiling might help.

I just have 3 backup tasks, as I am still testing duplicati.
None of them has scheduled tasks associated, so I would say no to your idea.

Please run mono --version to see how up to date it is. Mono releases has generic release notes. Maybe there are OS limitations too. I don’t have a Mac, so can only provide generic Duplicati help.

Result:

user@iMac ~ % mono --version
Mono JIT compiler version 6.12.0.206 (2020-02/0cbf0e290c3 Tue Feb 13 17:04:08 EST 2024)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS:
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: hybrid
GC: sgen (concurrent by default)

Likely not real memory. How To Use Activity Monitor: Master Class mentions that and other kinds. Perhaps you can check your menus (if they are like picture there) to see what it is, and get others.

Thank you, I didn’t know this.

I guess they didn’t release note that one for some reason, but Download page says it’s their latest.

I know very little about Mac Duplicati, and it’s gotten tougher since Monterey 12.3 took Python out. 2.0.6.106_canary_2023-05-03 (and therefore 2.0.7.1) got the tray icon back, but it takes collecting necessary materials, and I don’t think was ever documented. I think Server and CommandLine are unaffected by the Python changes. Do you know what you’re on? Activity Monitor might show that.

Other Command Line Utilities covers Duplicati.GUI.TrayIcon.exe and Duplicati.Server.exe which both contain a web server which by default is at localhost port 8200. In theory, external usage increases CPU load even without a job running, however the CPU use when sort of idle seems high.

There’s a little bit of normal background processing, such as a poll for updates which should be fast.

All of this can be subdued somewhat if you want to see how little you can run and have excess CPU.

Sometimes the intended design can also get out of whack, with processes starting and stopping fast. There’s supposed to be a parent Duplicati to serve as a launcher for the latest child version installed, which does all the actual work. Parent hangs around to in theory restart child if a new update goes in.

Correction. Mac install update done Dec 23, 2023 got in Jan 4, 2024, and confirms it’s tray icon.

To use the tray icon, you currently have to install python3 (you can check that by running /usr/bin/python3) and add pyobjc by hand from a terminal:

sudo pip3 install pyobjc