The same issues posted at:
Unfortunately, Apple didn't solve these terrible leaks. Yes,
Memory Management has always been an issue on any OS (not just Apple's). However,
- configd and bluetoothd are daemon processes need to be running 24x7x31.
- Apple sells their non-replaceable RAM for a whopping $200/8GB, which should be more responsible to fix memory leak problems.
Feedback (new dump submitted): FB12200609, FB12200601
Stable Reproduction (updated in May 30, 2023):
- Turn-off the Wi-Fi from control center (top right on your screen)
- Enable it and wait for auto re-connection
- Do this again and again, the `configd` goes to eat 200MB+ memory.
Video:
Note that: according to the discussion, this is not a widespread problem, only occurs under certain Wi-Fi conditions (enterprise Wi-Fi AP).
Wi-Fi Setting (Enterprise AP): 802.1X, EAP-PEAP (MSCHAPv2 Authentication), IPv4 with DHCP
Other Observation: The `configd` process need to be running for a seconds, a newly launched one may not occur this issue.
Screenshots:
View attachment 2206845
View attachment 2206844View attachment 2206843
Workaround:
Bash:
# configd
*/15 * * * * pid=$(pgrep -f '/usr/libexec/configd'); mem=$(top -l 1 -pid $pid | awk '/configd/ {print $8}'); mem=$(echo $mem | sed 's/M$//g'); if [ $mem -gt 512 ]; then kill $pid; fi
# bluetoothd
*/15 * * * * pid=$(pgrep -f '/usr/sbin/bluetoothd'); mem=$(top -l 1 -pid $pid | awk '/bluetoothd/ {print $8}'); mem=$(echo $mem | sed 's/M$//g'); if [ $mem -gt 512 ]; then kill $pid; fi
add this script to root's crontab, it checks `configd` and `bluetoothd` every 15 minutes, and kill any if the memory consumption > 512MB