3 ms·
Ask HN: The “coreaudiod” process uses waaay too much resources on macOS. why TF?
hey all,
so this drives me nuts really.
on a brand new M1 machine I am using the Spotify desktop app. it consumes around 2.6% of the CPU (with some minor fluctuations). the coreaudiod process though, uses 13.6% of the CPU (with some minor fluctuations).
does anybody have an idea why the audio process uses so much resources?
(on my previous machine - Macbook Pro 2015 - that was definitely not the case)
- arthurcolle 4y agoI don't think this can be fixed. What OS version are you on?
- antonmladenov 4y agoLatest one 12.5.1.
- comex 4y agoDon't know, but if you want to find out, `sudo spindump -onlyTarget coreaudiod` is a good starting point. You can also try `log stream --process coreaudiod --info --debug` to see if it's logging anything.
- viraptor 4y agoAnother tool to dig deeper is dtrace. There's a few articles about using it.
- lunixbochs 4y agoI've had luck using Instruments whole system profiling to debug this kind of system process
- antonmladenov 4y agothe second command logs out nothing. the first one produces a super long txt file with logs which I absolutely do not understand.
- altairprime 4y agoDid you re-download Spotify from the Spotify website when you upgraded machines? If not, do so, so that you get the updated binary for Apple Silicon. Are you seeing some sort of system misbehavior that leads you to think that this CPU usage is excessive? Are you measuring 14% of a high-efficiency core or 14% of a high-performance core?
- antonmladenov 4y agoyes, right after setting up the new machine and upgrading to latest MacOS, I downloaded the Spotify desktop app right from their website. no, I don't see anything else going wrong. what I look at is Activity Monitor, the CPU tab, displaying All Processes, sorting the processes by % CPU and there exactly I see that Spotify takes more than 13%.
- altairprime 4y agoNothing is wrong. Comparing CPU usage percentages between Intel and M1 is not valid. In addition, the M1 percentages have been shown to be invalid under varying power and core conditions. As well, M1 apps are being forced to integrate with Silicon-accelerated macOS system frameworks (both GPU and CPU) rather than continue their lazier “use ffmpeg everywhere” approach.
- techgnosis 4y agoI'm seeing the same thing on a new M2 Air. coreaudiod takes like 4-5x CPU than Spotify. Doubt anyone knows why. Probably a bug.
- not_me_ever 4y agoThe Spotify use of the coreaudio API has been massively broken for years. Basically they are preventing hardware decoding (for security reasons I guess?), and drive the API in a way that decodes everything 5-8 times. Not a lot you can do, apart from switching to a Spotify alternative, or at least a different client.