tmux-continuum icon indicating copy to clipboard operation
tmux-continuum copied to clipboard

High CPU usage on MacOS after long sleep/hibernate time

Open DoDoENT opened this issue 2 years ago • 2 comments

If I put my Mac to sleep and keep it asleep for a more extended period (more than 3 days), after waking the CPU is at 100% (all cores), and killing tmux helps. The process that takes the most CPU is ps (not an individual, but scores of ps processes).

My guess is that when Mac is asleep for a more extended period, many "save session" tasks are queued and all processed after waking up. The same pattern of CPU usage I have when manually issuing the session save command.

Is it possible to either:

  • disable auto-saving of session every 15 minutes, and let only saving be done manually?
  • or prevent queuing of "save session" tasks while Mac is asleep?

Of course, this is just my guess - maybe the origin of the problem is somewhere else. I'll be happy if someone else could reproduce this issue (I haven't been able on my Linux machine - it appears to be Mac-specific).

DoDoENT avatar Aug 25 '23 18:08 DoDoENT

Did you ever resolve this issue? I am currently encountering it every morning after my mac is asleep over the night.

BradLewis avatar Jun 10 '24 12:06 BradLewis

I worked around it by disabling auto-saving of my sessions and simply got into the habit of saving them manually every time when I introduce a significant change to my active sessions/windows.

DoDoENT avatar Jun 11 '24 08:06 DoDoENT