Bug 217704 - artsd using too much CPU time (again)
Summary: artsd using too much CPU time (again)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: arts
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-29 15:01 UTC by Aleksandar Milivojevic
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: arts-1.5.7-0.1.fc6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-14 16:03:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Aleksandar Milivojevic 2006-11-29 15:01:21 UTC
Description of problem:
Filing under Fedora Core 6.  However, I experienced the same with other products
(RHEL4 and RHEL5 beta 2).

I've found one old bug report about the problem (bug #116903 about 3 years old,
around the time of Red Hat LInux 9) that claims the problem was fixed.  Well, it
wasn't fixed.  The hardware got much faster (so the problem is not as obvious as
it used to be), but the bug is still there.  Anyhow, here it goes again.

I've noticed that artsd is sitting on CPU even when no sound is playing.  On
brand new spanking hardware such as 3.2GHz Pentium D, it isn't that bad (1-2% of
CPU time is wasted).  However on older hardware things get a bit unacceptable. 
For example on my old 233MHz Pentium MMX artsd takes about 25% of CPU time when
idle (no sound playing).  That's insane.

Running strace on different versions of artsd showed it was doing a bit
different things.  For example, in FC6 it was very eager to know what time it is
(endless loop):

gettimeofday({1164776404, 625784}, NULL) = 0
gettimeofday({1164776404, 628769}, NULL) = 0
ioctl(12, 0x4122, 0xbfee2608)           = 0
gettimeofday({1164776404, 633365}, NULL) = 0
gettimeofday({1164776404, 636261}, NULL) = 0
ioctl(12, 0x4122, 0xbfee2608)           = 0
gettimeofday({1164776404, 646923}, NULL) = 0
gettimeofday({1164776404, 650369}, NULL) = 0

On RHEL4 it seems to be a bit smarter and it was using signals, but still
wasting about the same amount of CPU time:

select(11, [3 5 8 10], [9], [5 8 9 10], {0, 127176}) = 1 (in [10], left {0, 128000})
ioctl(10, 0x80184151, 0x7fbffff060)     = 0
select(11, [3 5 8 10], [9], [5 8 9 10], {0, 127061}) = 1 (out [9], left {0, 106000})
ioctl(9, 0x40184150, 0x7fbffff050)      = 0
ioctl(9, 0x40184150, 0x7fbffff050)      = 0
ioctl(9, 0x40184150, 0x7fbffff050)      = 0
ioctl(9, 0x40184150, 0x7fbffff050)      = 0
select(11, [3 5 8 10], [9], [5 8 9 10], {0, 104974}) = ? ERESTARTNOHAND (To be
restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
times({tms_utime=46480, tms_stime=15217, tms_cutime=0, tms_cstime=0}) = 687727180
times({tms_utime=46480, tms_stime=15217, tms_cutime=0, tms_cstime=0}) = 687727180
rt_sigaction(SIGALRM, {0x552aad8630, [ALRM], SA_RESTORER|SA_RESTART,
0x2a976cb2b0}, {0x552aad8630, [ALRM], SA_RESTORER|SA_RESTART, 0x2a976cb2b0}, 8) = 0
rt_sigreturn(0x400)                     = -1 EINTR (Interrupted system call)
select(11, [3 5 8 10], [9], [5 8 9 10], {0, 83703}) = 1 (in [10], left {0, 35000})
ioctl(10, 0x80184151, 0x7fbffff060)     = 0
select(11, [3 5 8 10], [9], [5 8 9 10], {0, 34526}) = 1 (in [10], left {0, 35000})
ioctl(10, 0x80184151, 0x7fbffff060)     = 0
select(11, [3 5 8 10], [9], [5 8 9 10], {0, 34409}) = 1 (in [10], left {0, 35000})

And finally on RHEL5beta2:

select(15, [3 5 14], [], [5 14], {0, 199681}) = 0 (Timeout)
select(15, [3 5 14], [], [5 14], {0, 199683}) = 0 (Timeout)
select(15, [3 5 14], [], [5 14], {0, 199708}) = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
times({tms_utime=76, tms_stime=5, tms_cutime=0, tms_cstime=0}) = 446198698
times({tms_utime=76, tms_stime=5, tms_cutime=0, tms_cstime=0}) = 446198698
rt_sigaction(SIGALRM, {0x41d680, [ALRM], SA_RESTORER|SA_RESTART, 0x3d61430220},
{0x41d680, [ALRM], SA_RESTORER|SA_RESTART, 0x3d61430220}, 8) = 0
rt_sigreturn(0xe)                       = -1 EINTR (Interrupted system call)
select(15, [3 5 14], [], [5 14], {0, 68361}) = 0 (Timeout)
select(15, [3 5 14], [], [5 14], {0, 16491}) = 0 (Timeout)
select(15, [3 5 14], [], [5 14], {0, 182736}) = 0 (Timeout)

Version-Release number of selected component (if applicable):
arts-1.5.5-0.1.fc6 (Fedora Core 6)
arts-1.3.1-2 (Red Hat Enterprise Linux 4)
arts-1.5.4-1 (Red Hat Enterprise Linux 5 beta 2)

How reproducible:
Always

Steps to Reproduce:
1. Let KDE session start artsd
2. Fire up top from shell prompt
3. artsd will be somewhere around the top, actual CPU usage depends on CPU speed
(from around 1% on latest hardware, up to 25-30% on very old hardware)
  
Actual results:
artsd wasting CPU cycles

Expected results:
When no sound playing, artsd should be idle

Additional info:

Comment 1 Rex Dieter 2007-11-14 16:03:34 UTC
Would be a good issue to take upstream to bugs.kde.org.

fwiw, I cannot reproduce on with any recent release (kde-3.5.7 or kde-3.5.8).

Please reopen if you still experience this after updating and/or have any new
information.




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