* Re: ck vs. cfs : realtime audio performance
[not found] ` <1185886161.7397.11.camel@klaus-laptop>
@ 2007-07-31 12:54 ` Lenar Lõhmus
2007-08-01 6:31 ` Ingo Molnar
2007-08-02 6:27 ` Carlo Florendo
0 siblings, 2 replies; 6+ messages in thread
From: Lenar Lõhmus @ 2007-07-31 12:54 UTC (permalink / raw)
To: Klaus Schulz; +Cc: ck, linux-kernel, mingo
Cc'd to LKML & Ingo.
L.
Klaus Schulz wrote:
> Hi there.
>
>
>
>
> Am Dienstag, den 31.07.2007, 10:26 +0200 schrieb Klaus Schulz:
>
>> Hi folks.
>>
>> I am currently testing the 2.6.22.1 cfs-rt9 vs. ck1 on my rather pure
>> realtime high-end-audio setup. (NO X, just a terminal, streaming .wav.
>> I am using my own written player and brutefir as the audio engine.)
>> Comment: This is not a standard (amarok or xmms setup), all buffers in
>> the chain are very small. Any problem will immidetialy end up in xruns.
>> The sounddriver, HW (pci-bus etc.) are tweaked accordingly
>>
>> Until now ck1 on 2.6.22 is giving me better results (less audible
>> distortions) and runs extremely stable compared to cfs.
>> Under ck I ran my player with schedtool -R -p 98, which was better than
>> running it e.g. with nice -20
>> Both setups under cfs were giving me worse results than ck.
>> With CFS I also experienced XRUNS from time to time, what never happened
>> with ck.
>>
>> However:
>>
>> When looking at the latest performance statistics cfs vs. ck which are
>> spread around here, I am wondering, what might cause the differences.
>>
>> With ck I tweaked the rr_interval to 6 and was running at 10000Hz,
>> which caused obvious improvements.
>>
>> These options I do not have with CFS.
>>
>> I am wondering if sched_granularity_ns should be touched when using cfs.
>> I googled somewhere that bringing it down to e.g. 250000 instead of
>> 4000000 would smoothen the audio playback. I havn't tried it yet. I am
>> wondering if this tweak is still applicable.
>>
>
>
>
> I did test now decreasing the sched_granularity_ns to 250000.
> There is still a clearly audible difference comparing ck and cfs.
> ck Ídelivers cristal clear sound. With cfs I still get quite some
> distortions.
>
> Any hints how to improve the situtation are welcome.
>
>
>
>
>> I'd be happy to get a hint on how to tweak the system parameters best to
>> give cfs a fair chance. I am also wondering how the timer freqency could
>> by increased under a cfs-patched kernel.
>>
>> Info: dynamic ticks and IRQ balancing are off for the time being.
>> /proc/sys/dev/rtc is set to 4096 (gave me best results)
>> ( I don't have a clue how all the (rtc)-timers in the OS interact,
>> To me it is just a trial and error exercise to figure out which
>> setup sounds best)
>>
>> THX for your advise.
>>
>> Cheers
>> \Klaus
>>
>
>
> Cheers
> \Klaus
>
>
> _______________________________________________
> http://ck.kolivas.org/faqs/replying-to-mailing-list.txt
> ck mailing list - mailto: ck@vds.kolivas.org
> http://vds.kolivas.org/mailman/listinfo/ck
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: ck vs. cfs : realtime audio performance
2007-07-31 12:54 ` ck vs. cfs : realtime audio performance Lenar Lõhmus
@ 2007-08-01 6:31 ` Ingo Molnar
2007-08-02 6:27 ` Carlo Florendo
1 sibling, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2007-08-01 6:31 UTC (permalink / raw)
To: Lenar Lõhmus; +Cc: Klaus Schulz, ck, linux-kernel
> >Am Dienstag, den 31.07.2007, 10:26 +0200 schrieb Klaus Schulz:
> >>I am currently testing the 2.6.22.1 cfs-rt9 vs. ck1 on my rather pure
> >>realtime high-end-audio setup. (NO X, just a terminal, streaming .wav.
> >>I am using my own written player and brutefir as the audio engine.)
> >>Comment: This is not a standard (amarok or xmms setup), all buffers in
> >>the chain are very small. Any problem will immidetialy end up in xruns.
> >>The sounddriver, HW (pci-bus etc.) are tweaked accordingly
> >>
> >>Until now ck1 on 2.6.22 is giving me better results (less audible
> >>distortions) and runs extremely stable compared to cfs.
> >>Under ck I ran my player with schedtool -R -p 98, which was better than
> >>running it e.g. with nice -20
> >>Both setups under cfs were giving me worse results than ck.
> >>With CFS I also experienced XRUNS from time to time, what never happened
> >>with ck.
> >>
> >>However:
> >>
> >>When looking at the latest performance statistics cfs vs. ck which are
> >>spread around here, I am wondering, what might cause the differences.
> >>
> >>With ck I tweaked the rr_interval to 6 and was running at 10000Hz,
> >>which caused obvious improvements.
> >>
> >>These options I do not have with CFS.
> >>
> >>I am wondering if sched_granularity_ns should be touched when using cfs.
> >>I googled somewhere that bringing it down to e.g. 250000 instead of
> >>4000000 would smoothen the audio playback. I havn't tried it yet. I am
> >>wondering if this tweak is still applicable.
(re-sending my earlier reply to Klaus here on lkml too)
Klaus,
since you are using -rt, have you tried chrt-ing not only your audio
player but your audio IRQ as well? While playback is going on could you
create a system snapshot with the following tool:
http://people.redhat.com/mingo/cfs-scheduler/tools/cfs-debug-info.sh
and send me the output file.
i'm also wondering why HZ=10000 makes a difference - audio interrupts
have no Linux-timer aspect normally (they are hardware timers in essence
themselves) - which portion of the workload is timing out so that HZ
shows up? Does the enabling of CONFIG_HIGH_RES_TIMERS help perhaps?
Also, do you have any advice for me how to reproduce your problem? I've
got a couple of PCs with various low-end/chipset-based audio hw, but the
buffers are generally large (around 500 msecs) so i rarely run into any
xrun problems. Is your player available for download so i could try it?
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ck vs. cfs : realtime audio performance
2007-07-31 12:54 ` ck vs. cfs : realtime audio performance Lenar Lõhmus
2007-08-01 6:31 ` Ingo Molnar
@ 2007-08-02 6:27 ` Carlo Florendo
2007-08-02 19:26 ` Ingo Molnar
1 sibling, 1 reply; 6+ messages in thread
From: Carlo Florendo @ 2007-08-02 6:27 UTC (permalink / raw)
To: Lenar Lõhmus; +Cc: Klaus Schulz, ck, linux-kernel, mingo
Lenar Lõhmus wrote:
> Klaus Schulz wrote:
>>> I am currently testing the 2.6.22.1 cfs-rt9 vs. ck1 on my rather pure
>>> realtime high-end-audio setup. (NO X, just a terminal, streaming
>>> .wav. I am using my own written player and brutefir as the audio
>>> engine.)
>>> Comment: This is not a standard (amarok or xmms setup), all buffers in
>>> the chain are very small. Any problem will immidetialy end up in xruns.
>>> The sounddriver, HW (pci-bus etc.) are tweaked accordingly
>>> Until now ck1 on 2.6.22 is giving me better results (less audible
>>> distortions) and runs extremely stable compared to cfs. Under ck I
>>> ran my player with schedtool -R -p 98, which was better than
>>> running it e.g. with nice -20 Both setups under cfs were giving me
>>> worse results than ck.
>>> With CFS I also experienced XRUNS from time to time, what never happened
>>> with ck.
See, this is exactly the problem of the SD ranters. A ranter posts a
problem, doesn't give reproducability hints, and neither provides technical
detail, not even the slightest relevant stats. And the most irritating
part is that the code that the OP wrote (or at least its relevant parts) is
not even available for download.
I was wondering why the OP need timers for audio playback. What type of
audio? PCM, MIDI? Once does not need timers for PCM playback but for MIDI.
SD ranters. Pure rants.
Thank you very much.
Best Regards,
Carlo
--
Carlo Florendo
Softare Engineer/Network Co-Administrator
Astra Philippines Inc.
UP-Ayala Technopark, UP Campus Diliman
1101 Quezon City, Philippines
http://www.astra.ph
--
The Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan
http://www.astra.co.jp
--
Carlo Florendo
Softare Engineer/Network Co-Administrator
Astra Philippines Inc.
UP-Ayala Technopark, UP Campus Diliman
1101 Quezon City, Philippines
http://www.astra.ph
--
The Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan
http://www.astra.co.jp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ck vs. cfs : realtime audio performance
2007-08-02 6:27 ` Carlo Florendo
@ 2007-08-02 19:26 ` Ingo Molnar
0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2007-08-02 19:26 UTC (permalink / raw)
To: Carlo Florendo
Cc: Lenar Lõhmus, Klaus Schulz, ck, linux-kernel,
Martin Steigerwald
* Carlo Florendo <subscribermail@gmail.com> wrote:
>>>> With CFS I also experienced XRUNS from time to time, what never
>>>> happened with ck.
>
> See, this is exactly the problem of the SD ranters. A ranter posts a
> problem, doesn't give reproducability hints, and neither provides
> technical detail, not even the slightest relevant stats. And the most
> irritating part is that the code that the OP wrote (or at least its
> relevant parts) is not even available for download.
actually, there was no "SD ranting" going on at all. Klaus reported a
problem, Martin forwarded it to me, i replied to it and Klaus gave me
lots of debug info in a very professional way. So please calm down and
lets get back to the tech topics, ok? (and i'd like to apologize here to
Karl and Martin for the rough and unjust treatment they received on
lkml.)
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ck vs. cfs : realtime audio performance
@ 2007-08-02 7:57 Klaus Schulz
2007-08-02 9:06 ` Carlo Florendo
0 siblings, 1 reply; 6+ messages in thread
From: Klaus Schulz @ 2007-08-02 7:57 UTC (permalink / raw)
To: Lenar Lõhmus, Carlo Florendo; +Cc: Klaus Schulz, ck, linux-kernel, mingo
Hello Carlo.
The ranters! comment:
I can understand your way of looking at things.
But you'd better be a bit more careful with statements like these below,
if you don't really know what's going on.
Just FYI: All possible traces - Ingo asked for - are on Ingos desk!
My intention is to support you folks as good as I can to get the issues solved.
As a user, with a rather limited knowledge about ck or cfs, I am just able to
judge on the results these patches are delivering.
I'll go always for the one - if I have a choice - matching my requirements!
Since there is just one patch left in the near future, at least the way it looks to me today,
I am trying of course to support Ingo the best I can to identify potential issues.
Constructive critism - always welcome!
Best regards
\Klaus
> -----Ursprüngliche Nachricht-----
> Von: Carlo Florendo <subscribermail@gmail.com>
> Gesendet: 02.08.07 08:27:01
> An: Lenar Lõhmus <lenar@city.ee>
> CC: Klaus Schulz <Klaus.Schulz@web.de>, ck@vds.kolivas.org, linux-kernel@vger.kernel.org, mingo@elte.hu
> Betreff: Re: ck vs. cfs : realtime audio performance
>
> Lenar Lõhmus wrote:
> > Klaus Schulz wrote:
> >>> I am currently testing the 2.6.22.1 cfs-rt9 vs. ck1 on my rather pure
> >>> realtime high-end-audio setup. (NO X, just a terminal, streaming
> >>> .wav. I am using my own written player and brutefir as the audio
> >>> engine.)
> >>> Comment: This is not a standard (amarok or xmms setup), all buffers in
> >>> the chain are very small. Any problem will immidetialy end up in xruns.
> >>> The sounddriver, HW (pci-bus etc.) are tweaked accordingly
> >>> Until now ck1 on 2.6.22 is giving me better results (less audible
> >>> distortions) and runs extremely stable compared to cfs. Under ck I
> >>> ran my player with schedtool -R -p 98, which was better than
> >>> running it e.g. with nice -20 Both setups under cfs were giving me
> >>> worse results than ck.
> >>> With CFS I also experienced XRUNS from time to time, what never happened
> >>> with ck.
>
> See, this is exactly the problem of the SD ranters. A ranter posts a
> problem, doesn't give reproducability hints, and neither provides technical
> detail, not even the slightest relevant stats. And the most irritating
> part is that the code that the OP wrote (or at least its relevant parts) is
> not even available for download.
>
> I was wondering why the OP need timers for audio playback. What type of
> audio? PCM, MIDI? Once does not need timers for PCM playback but for MIDI.
>
> SD ranters. Pure rants.
>
> Thank you very much.
>
> Best Regards,
>
> Carlo
>
>
> --
> Carlo Florendo
> Softare Engineer/Network Co-Administrator
> Astra Philippines Inc.
> UP-Ayala Technopark, UP Campus Diliman
> 1101 Quezon City, Philippines
> http://www.astra.ph
>
> --
> The Astra Group of Companies
> 5-3-11 Sekido, Tama City
> Tokyo 206-0011, Japan
> http://www.astra.co.jp
>
>
> --
> Carlo Florendo
> Softare Engineer/Network Co-Administrator
> Astra Philippines Inc.
> UP-Ayala Technopark, UP Campus Diliman
> 1101 Quezon City, Philippines
> http://www.astra.ph
>
> --
> The Astra Group of Companies
> 5-3-11 Sekido, Tama City
> Tokyo 206-0011, Japan
> http://www.astra.co.jp
>
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ck vs. cfs : realtime audio performance
2007-08-02 7:57 Klaus Schulz
@ 2007-08-02 9:06 ` Carlo Florendo
0 siblings, 0 replies; 6+ messages in thread
From: Carlo Florendo @ 2007-08-02 9:06 UTC (permalink / raw)
To: Klaus Schulz; +Cc: Lenar Lõhmus, ck, linux-kernel, mingo
Klaus Schulz wrote:
> Hello Carlo.
>
> The ranters! comment:
>
> I can understand your way of looking at things.
> But you'd better be a bit more careful with statements like these below,
> if you don't really know what's going on.
>
> Just FYI: All possible traces - Ingo asked for - are on Ingos desk!
Then that's very good :) I was just wondering on what possibly happened to
the problem since the person who forwarded your concern from the ck list to
the lkml (I don't subscribe to the ck list) didn't have a follow-up after a
few days.
And as far as the public list archives are concerned, there were no stats
posted as Ingo had asked for. It seems though that you had done privately,
then that's very good.
Since your problem had already been posted online, I thought that any
person who might've had a similar problem like yours would benefit from
knowing what steps got undertaken to address the problem. I particularly
was interested in your problem since I myself do a lot of music in Linux.
I'm very sure that if your problem got discussed on-line, many linux-user
musicians/programmers would benefit from it, like myself.
Sorry if I have offended you and please accept my apologies.
Thank you very much.
Best Regards,
Carlo
--
Carlo Florendo
Softare Engineer/Network Co-Administrator
Astra Philippines Inc.
UP-Ayala Technopark, UP Campus Diliman
1101 Quezon City, Philippines
http://www.astra.ph
--
The Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan
http://www.astra.co.jp
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-02 19:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1185870355.7933.55.camel@klaus-laptop>
[not found] ` <1185886161.7397.11.camel@klaus-laptop>
2007-07-31 12:54 ` ck vs. cfs : realtime audio performance Lenar Lõhmus
2007-08-01 6:31 ` Ingo Molnar
2007-08-02 6:27 ` Carlo Florendo
2007-08-02 19:26 ` Ingo Molnar
2007-08-02 7:57 Klaus Schulz
2007-08-02 9:06 ` Carlo Florendo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox