High forked-daapd cpu usage?
So there I was playing with Rhythbox and bemoaning the non-existant DLNA support when I noticed (even though it’s always been there) the DAAP plugin. “What is this DAAP of which you speak?” I thought, and ended up installing mt-daapd. Turns out DAAP is rather good, and there’s even a very useful Android app for it, so I’m quite keen to continue with it.
Now mt-daapd hasn’t been maintained for years, and according to the man who forked the project and created (by his own admission) the terribly named forked-daapd you’d need to be a confirmed stick in the mud to continue using the older version. And as forked-daapd is in the Ubuntu Precise repositories, it got installed. Initial tinkering showed positive signs of life so I left it doing it’s thing and went to bed.
The following morning as I padded into the lounge I noticed the normally quiet fan on the media server sounding quite breathless, and one htop later could see the cpu at 100%. A quick
ls -l /proc/`pidof forked-daapd`/fd
showed forked-daapd holding open a Microsoft Word document. I ran a
find /media/music -name \*.doc -exec rm {} \;
(don’t run this on your home dir) to blitz any .docs in the music directory and restarted forked-daapd (in fact I had to kill -9 the daap server as it was still avidly reading the Word doc). I had to run through a similar process with some old Thumbs.db files that forked-daapd wouldn’t parse or let go of, but all now appears well.
So in conclusion, if you’re running forked-daapd and it’s pegging your cpu at 100% for a long time, check which files it’s holding open. Naturally unlike me you won’t have a music folder full of junk.
In: Linux · Tagged with: cpu usage, daap, forked-daapd, Linux, rhythmbox, ubuntu
