impact on audio playback on high cpu usage

Duncan 1i5t5.duncan at cox.net
Sat Jul 24 02:59:13 BST 2010


Andreas Hennig posted on Fri, 23 Jul 2010 22:34:20 +0200 as excerpted:

> Hi Duncan,
> 
> thanks for your long answer.
> 
> So here is some more information.
> 
> The CPU is a dual core Intel T2050 @ 1.6GHz.

Dual-core... really shouldn't be experiencing sound slow-downs with high 
CPU usage, even @ 1.6 GHz.  I was running dual single-core Opteron 242s in 
this rig when I first got the mobo.  Those are 1.6 GHz, and as they came 
out well before any dual-cores did, especially dual-cores for laptops, if 
anything, clock for clock yours should be better.  Yet even back then, I 
could run ridiculous load averages (say, several hundred, compiling a 
kernel) without stuttering -- as long as I wasn't running anything I/O 
intensive.

> Since i have a laptop my sondcard is a build in Intel HDA. See lspci:
> 
> 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition
> Audio Controller (rev 02)

Hmm... my netbook runs an ICH-7 chipset. Let me do a quick kernel config 
and see what sound I run...

Back on my main machine (the Opteron), in the kernel it's actually the 
Intel8X0 alsa driver, Intel/Sis/nVidia/AMD/ALi AC97 Controller.  A 
compatible design was on lots of chipset southbridges, including both AMD 
(mine) and Intel of the era, but I suspect yours is somewhat newer.

On the (Intel Atom) netbook, it's the HDA_Intel alsa driver, Intel HD 
Audio.  lspci says:

Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio 
Controller (rev 02)

So the sound controller appears to be the same as on my netbook.  FWIW, 
I've not noticed any such problems there, even with the rather slower atom 
single-core (but hyperthreaded, so it appears as two).  However, as it's 
my portable netbook, not my power workstation, I don't tend to run 
anything real heavy duty on it.  In particular, I do all my building (I 
run Gentoo on it too, so all from-source) for it a special 32-bit (it 
won't do 64-bit, unfortunately) chroot image on my main machine.

> With Kubuntu 10.4 my desktop efects also seems to be slower. Maybe the
> grafics driver has been changed. The grafic card is a Radeon Mobility
> X1400.
> 
> lsmod says that i using the radeon driver.

Well, my netbook obviously uses the built-in Intel 940GM series graphics 
card, but as I said, my main machine is running Radeon, now an hd4650 
(r700 series), previously a 9200 (r200 series).  The x1400 is (according 
to the radeon manpage) the r500 series, so square in between those two.

The good news is that the r500 series driver is rather more mature than 
the r600/700 driver that I'm running now, especially good since while I 
don't see the artifacts on mine I did with the drivers when I first got 
it, it's still not quite stable and I unfortunately see full system 
lockups occasionally.  The r500 series driver is mature enough that 
shouldn't be happening there, altho there might be a few bugs related to 
kms (kernel mode setting) on it, still, as kms is still new and not fully 
mature, everywhere.

One thing that might be happening.  Radeon mobility graphics, as Intel 
graphics, tend to use shared system memory instead of dedicated graphics 
memory, saving money and space, but at the cost of performance, since 
system memory will be slower, and with the usual refresh of 60 Hz or so, 
is going to be accessing that system memory sixty-times/second, with the 
CPU therefore unable to use that channel for memory access the same sixty-
times a second.

It's /possible/ that with everything going on concurrently, it's 
impossible to keep the hardware sound buffer full, and that you could see 
that during high CPU activity, not due to CPU specifically, which as I 
said shouldn't be happening on a dual-core, but due to the additional 
stress on the memory bandwidth.

But I didn't see that you'd tried with compositing toggled off, as I 
suggested.  Do try it, at least temporarily.  If it doesn't help, if 
graphics is contributing to the problem, there's probably not a lot we can 
do about it.  But if it helps, then we know that graphics are involved, 
and that turning off effects temporarily does help, significantly more 
than we know now.

Actually, it may be just me, but I've seen enough complaints about pulse-
audio, I'm wondering if that's your problem.  I happened to read a recent 
article on it and Ubuntu, but it was Ubuntu/Gnome, not Kubuntu/KDE, so I 
don't know how much of it applies to you.  But it's worth taking a look, 
anyway.

Direct link:
http://www.linuxplanet.com/linuxplanet/tutorials/7130/1/

And here's the Raiden's Realm blurb and link to discussion on the same 
article. (RR is a friendly linux/gaming/anime/tech related site that I 
spend a bit of time on.  I have their feed in akregator, and that's where 
I saw the story originally.  I mostly read the article feed, sometimes 
commenting on a story, so I don't spend as much time in the forums as I'd 
like, but as I said, it's friendly, and there's Linux and other forums 
that may be useful and they're just a nice place to hang out, too. =:^)

http://www.raiden.net/news/Ubuntu_Tip_Turning_PulseAudio_On_and_Off/

I'd really suspect that it's pulse-audio, since that extra layer between 
the apps and alsa is going to be all software and thus CPU usage 
sensitive, and since I've seen no such issues with the same sound hardware 
on my supposedly far less powerful atom machine, but there's no way to 
tell until you try bypassing it, and going to alsa directly.

Also, no mention yet of whether kde apps (thru phonon) work any better or 
worse or just the same as non-kde apps.  (I'm not sure but amarok may be 
able to go to alsa directly, bypassing phonon and possibly bypassing pulse-
audio.  I know old amarok could, but the new amarok didn't fit my needs so 
I don't use it any more and uninstalled it.)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list