Bug 116903 - artsd uses way too much CPU time! No sound is playing!
Summary: artsd uses way too much CPU time! No sound is playing!
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: arts
Version: 9
Hardware: athlon
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-26 07:12 UTC by Steven Boswell
Modified: 2007-04-18 17:03 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-26 19:49:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Steven Boswell 2004-02-26 07:12:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:
I just recently upgraded to Red Hat 9, from Red Hat 7.3, and artsd has
always chewed up what I thought was an unacceptable amount of CPU
time.  But now it appears to be ridiculous.

K starts up artsd with

/usr/bin/artsd  -F 10 -S 4096 -d -r 44100 -b 16 -s 5 -m artsmessage -l
0 -f

and then proceeds to use up most of the CPU.  Here's a snippet from
top, run while I was rpmbuild'ing another package:

95 processes: 88 sleeping, 5 running, 0 zombie, 2 stopped
CPU states:  48.7% user  51.2% system   0.0% nice   0.0% iowait   0.0%
idle
Mem:  1031660k av,  955916k used,   75744k free,       0k shrd,  
30696k buff
                    570348k actv,  284512k in_d,     540k in_c
Swap: 2008116k av,    3812k used, 2004304k free                 
805848k cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
19170 root      25   0  5276 5272  3960 R    38.2  0.5   0:13   0 artsd
20911 sboswell  25   0  2156 2156   936 R    30.3  0.2   0:01   0 sh
 6910 root      15   0  155M  11M  1884 S     1.4  1.1   1:02   0 X
21291 sboswell  18   0  1144 1144   812 R     0.9  0.1   0:00   0 top

Why on Earth does it need 38% of the CPU, especially when there is no
sound playing?  This is on an Athlon XP 1800+.

I figured I'd ask here, before I dive into the source code & teach it
to wait for something to actually send it some sound to play.


Version-Release number of selected component (if applicable):
arts-1.1-7

How reproducible:
Always

Steps to Reproduce:
1. Just configure K to run artsd when it starts up.
2. Don't play any sound at all.
3. Look at CPU usage under top.
    

Additional info:

Comment 1 Ngo Than 2004-02-26 16:11:51 UTC
are you using alsa here?

is this problem gone, if you change "Select the audio device" from
Autodect to OSS?

I have seen similar problem with alsa sound and art-1.2.0 in rawhide.

Comment 2 Steven Boswell 2004-02-26 18:42:40 UTC
Yes, I'm using ALSA.  Sorry for wasting your time, making you ask me that.

Changing "Select the audio device" to "OSS" had the same problem, but
"Threaded OSS" took care of it!  It's now using closer to 1% of the
CPU -- FAR more acceptable.

Thank you!!!

I guess now, the only issue is, if KDE can figure this out
automatically.  ALSA appears to be my only option for sound (I have a
VIA 8233 motherboard with built-in sound), and we probably don't want
end users to have to figure this out.

Comment 3 Than Ngo 2004-02-26 19:49:37 UTC
this issue is already fixed in arts-1.2.0-1.5, which is available in
rawhide


Note You need to log in before you can comment on or make changes to this bug.