Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aleph Bereshits

macrumors newbie
Original poster
Feb 16, 2020
1
1
Hi, all.
Strange things happen on my Mac Pro (2013, Catalina). ARD takes up all the free memory.
(see attached pic). It slows down a lot my old good trash can.
I can't just uninstall ARD because I need it.
Is it fixable?
 

Attachments

  • Screen Shot 2020-02-16 at 20.22.49.png
    Screen Shot 2020-02-16 at 20.22.49.png
    56.8 KB · Views: 634
  • Like
Reactions: Surveyor

DeltaMac

macrumors G5
Jul 30, 2003
13,754
4,579
Delaware
How much memory do you have installed?
What does the "Memory Pressure" graph show, at the bottom of your Activity Monitor/Memory tab?
 
  • Like
Reactions: Surveyor

Surveyor

macrumors newbie
Jun 25, 2020
2
0
Suffolk
Hi,
I am having the same issue on a MacMini with 8GB ram. This Mac only runs Filemaker Server and I find that the memory used by ARDAgent increases throughout the day until it completely fills the memory and causes the machine to become very sluggish. Remote users of the FMP server are also significantly affected.

So far my solution has been to force quit ARDAgent whenever I find the server running slowly. ARDAgent is immediately reloaded by the OS and starts with 3.6mb memory used but stats to increase this at a rate of approximately 1mb every 5 minutes initially. This rate varies and seems to speed up exponentially (increased to 23.2mb after 15 mins) so that the memory is full within 4-5 hours.

Is there a 'proper' solution to this, other than running a cron job (deprecated) every hour?
 

Surveyor

macrumors newbie
Jun 25, 2020
2
0
Suffolk
Ok, done some more digging and found an article about memory leaks from developer.apple that says memory must be deallocated when using malloc. I ran leaks (sudo leaks [pid]) and found there were thousands of 'notes mallocs for 1241k'. The number of nodes continually increases, so I am guessing Apple have not followed their own developer guidelines on coding.

I then checked another Mac (i5 iMac 27") that was running the same OS Catalina and found that ARDAgent memory stays put at 3.9mb. There are many more apps running on the iMac and only one server process running on the MacMini (FMS) and first thought it may be related to Filemaker. I then realised that my router port points the ARD ports (5900, 3282, 3031) to the MacMini so switched this over to the iMac and the rate of memory increase on the MacMini has slowed dramatically and all but stopped. The odd thing is that ARDAgent running on the iMac does not appear to be increasing its memory usage.

A possible solution but needs further observation. Post a reply if this works for anyone else.
 

JosephAW

macrumors 603
May 14, 2012
6,320
8,586
POSSIBLE RESOLUTION 2023/01/17

Was experiencing this same problem of a memory leak and GB of memory use and swap files. Monitored the console for ARDAgent and noticed it kept clearing a queue. Also was having trouble keeping the menu bar item for remote agent visible.

Figured it was something to do with that, tried disabling the menu bar item and fixing permissions but still no luck, next tried removing antivirus and that didn't help.

I noticed that I kept Caffeine in my menu bar in turned off mode from my startup items, I quit the Caffeine app and the noise stopped in the console app. Disabled it from the startup items and rebooted and the console is completely quiet for ARDAgent. Reinstalled antivirus and still quiet.

Think this solved the problem, will check in tomorrow to see if there's any more memory leaks. If resolved maybe someone needs to alert the developer of this issue in Caffeine.

UPDATE 2023/01/18

One day later I checked in on ARDAgent and it was up to 7GB of ram, so it didn't solve the problem but slowed it down some.
Maybe related to other menu items, I'm running Menu Meters and SMC Fan Control and Avast besides Apple's items.
If I figure it out I'll let you know.
 
Last edited:

cjalonso

macrumors newbie
Dec 5, 2020
2
2
Waiting with hope for a resolution to this issue with ARD, which is happening in all of my computers.
 

BjarneDM

macrumors member
Jul 3, 2008
43
24
Korsør, Danmark, Europa
So ... I'm also having this issue on a MacMini (late 2012) w/ 16GB RAM, that I'm using as a headless server; administering it w/ Remote and ssh.

My solution is to restart ARDagent every hour :
XML:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version='1.0'>
<dict>
    <key>Label</key>
    <string>info.mathiesen.ARDreload</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/local/bin/bash</string>
        <string>/Users/admin/bin/ARDreload</string>
    </array>
    <key>StartCalendarInterval</key>
    <dict>
        <key>Minute</key>
        <integer>0</integer>
    </dict>
    <key>StandardErrorPath</key>
    <string>/Users/admin/logs/ARDreload.error</string>
</dict>
</plist>
Bash:
prefix='/Users/admin/logs/'
logfile="${prefix}ARDreload.log"

# keeps the last 40 entries in the log file
tail -40 "${logfile}" > "${logfile}.new"
mv -f "${logfile}.new" "${logfile}"
date >> "${logfile}"

# references:
# https://keithmfoster.com/restarting-the-apple-remote-desktop-ard-via-ssh/
# https://ss64.com/mac/kickstart.html

ARDAgent='/System/Library/CoreServices/RemoteManagement/ARDAgent.app'

${ARDAgent}/Contents/Resources/kickstart \
    -stop -agent

sleep 5

${ARDAgent}/Contents/Resources/kickstart \
    -activate \
    -restart -agent \
    -configure \
        -users admin \
        -access -on \
        -privs -all \
        -allowAccessFor -specifiedUsers

Regarding bash : I'm using MacPorts, so my bash is from there.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.