CPU load reading too high on dual-core and SMP machines?

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

CPU load reading too high on dual-core and SMP machines?

Daniel James-2
Hello all,

We have noticed that when running 64 Studio 0.9.6 (jackd 0.102.20) on an
AMD Athlon 64 X2 dual-core machine and a dual Opteron (two single core
CPUs) that Jack applications (e.g. qjackctl and jamin) report the CPU
load as double that which top reports for total CPU load. Jack seems to
be reporting the sum of both CPU loads rather than the average across cores.

So for example, if you run three instances of Jamin, top might report:

Cpu0  : 26.0%us
Cpu1  : 57.2%us

But qjackctl and all the instances of jamin say CPU load is 83%.

Then if we run five instances of Jamin, to simulate a rather heavy DSP
session, the Jack CPU counter wraps after 100%. Top says:

Cpu0  : 68.6%us
Cpu1  : 62.7%us

but qjackctl and the jamins now all say CPU load is only 31%. I was
hoping they would say 131% :-)

Can anyone else reproduce this on a multi-core or multi-CPU system? Or
is there a flaw in our implementation?

Should we be encouraging multi-core and multi-cpu users to run jackdmp
instead, bearing in mind that jackd is working fine and we are aiming to
provide a solid distro that people can use and rely on today?

Cheers!

Daniel







-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Paul Davis
On Tue, 2006-11-07 at 11:11 +0000, Daniel James wrote:
> Hello all,
>
> We have noticed that when running 64 Studio 0.9.6 (jackd 0.102.20) on an
> AMD Athlon 64 X2 dual-core machine and a dual Opteron (two single core
> CPUs) that Jack applications (e.g. qjackctl and jamin) report the CPU
> load as double that which top reports for total CPU load. Jack seems to
> be reporting the sum of both CPU loads rather than the average across cores.

JACK doesn't report CPU load. it reports "DSP load" which is a
measurement of the percentage of the available time to run the process()
cycle that is actually being used. in reality, you can only get up to
about 80-85% DSP load before things fall apart, but any normal measure
of CPU load (top or any other system monitor) would have been reading
100% long before that.

> So for example, if you run three instances of Jamin, top might report:
>
> Cpu0  : 26.0%us
> Cpu1  : 57.2%us
>
> But qjackctl and all the instances of jamin say CPU load is 83%.
>
> Then if we run five instances of Jamin, to simulate a rather heavy DSP
> session, the Jack CPU counter wraps after 100%. Top says:
>
> Cpu0  : 68.6%us
> Cpu1  : 62.7%us
>
> but qjackctl and the jamins now all say CPU load is only 31%. I was
> hoping they would say 131% :-)

seems very odd because the measurement is purely time based, not based
on any computation of CPU states, cycle usage, etc etc. Which wall clock
are you using with JACK (gettimeofday, TSC, HPET etc.) ?



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Antoine Lefebvre
In reply to this post by Daniel James-2
Same behavior appear on my dual Xeon (HT). I run three instances of
Jamin and got almost 96% CPU loads in jack while top report 28% for
each jamin instance.

Antoine

Daniel James <[hidden email]> a écrit :

> Hello all,
>
> We have noticed that when running 64 Studio 0.9.6 (jackd 0.102.20) on an
> AMD Athlon 64 X2 dual-core machine and a dual Opteron (two single core
> CPUs) that Jack applications (e.g. qjackctl and jamin) report the CPU
> load as double that which top reports for total CPU load. Jack seems to
> be reporting the sum of both CPU loads rather than the average across cores.
>
> So for example, if you run three instances of Jamin, top might report:
>
> Cpu0  : 26.0%us
> Cpu1  : 57.2%us
>
> But qjackctl and all the instances of jamin say CPU load is 83%.
>
> Then if we run five instances of Jamin, to simulate a rather heavy DSP
> session, the Jack CPU counter wraps after 100%. Top says:
>
> Cpu0  : 68.6%us
> Cpu1  : 62.7%us
>
> but qjackctl and the jamins now all say CPU load is only 31%. I was
> hoping they would say 131% :-)
>
> Can anyone else reproduce this on a multi-core or multi-CPU system? Or
> is there a flaw in our implementation?
>
> Should we be encouraging multi-core and multi-cpu users to run jackdmp
> instead, bearing in mind that jackd is working fine and we are aiming to
> provide a solid distro that people can use and rely on today?
>
> Cheers!
>
> Daniel
>
>
>
>
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Jackit-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jackit-devel
>




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Daniel James-2
In reply to this post by Daniel James-2
Hi Stéphane,

> Hum... what do you mean by "load as double that which top reports for
> total CPU load" ?

I mean if I hit the '1' key while running top, it toggles between
showing the average CPU load across cores or processors, and the load on
individual cores. So if I had 60% and 20% loads respectively, by default
top would show 40% and qjackctl would show 80%. If load goes up to 60%
and 60% respectively, then top shows 60% but qjackctl shows only 20%,
which is why I concluded that jack must be wrapping after 100%.

> Jack DSP CPU measure the sum of DSP load of all running jack clients

Right, but in my example cases the Jack apps are the only apps consuming
significant CPU.

> You are supposed to have problems  (= xruns) in the setup you describe
> since the sum of both processor load exceed 100% and you are running
> "sequential" jack... Do you have them?

We have users testing ardour with multiple instances of jamin on kernel
2.6.18. One user with a single-core Sempron 64 ran ardour plus three
jamins for two hours. 95% CPU load, no xruns. Another user tried the
same thing on a dual core Athlon 64, and CPU usage was reported by the
jack apps as 56%. But when the number of jamin instances was increased
to four, the CPU usage was reported as only 2.5%, and although the
system kept working, there was indeed the occasional xrun. It seems
reasonable to assume that the sum of loads was actually 102.5% at this
point.

> Concerning jackdmp use in a distribution, it seems that Ubuntu studio is
> testing the possibility, see
> http://ubuntuforums.org/showthread.php?t=283111

Yes, I saw that thread. We are in a somewhat different situation because
we have been making releases for 18 months, and are finalising our
stable 1.0 release, while Ubuntu Studio has yet to be released.

For a future version, it would be great to be able to package both jackd
and jackdmp in such a way that users could choose which server they
wanted at runtime, without breaking any of the apps.

Cheers!

Daniel


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Kjetil Matheussen
In reply to this post by Daniel James-2

Daniel James:

>
> Hello all,
>
> We have noticed that when running 64 Studio 0.9.6 (jackd 0.102.20) on an
> AMD Athlon 64 X2 dual-core machine and a dual Opteron (two single core
> CPUs) that Jack applications (e.g. qjackctl and jamin) report the CPU
> load as double that which top reports for total CPU load. Jack seems to
> be reporting the sum of both CPU loads rather than the average across cores.
>
> So for example, if you run three instances of Jamin, top might report:
>
> Cpu0  : 26.0%us
> Cpu1  : 57.2%us
>
> But qjackctl and all the instances of jamin say CPU load is 83%.
>
> Then if we run five instances of Jamin, to simulate a rather heavy DSP
> session, the Jack CPU counter wraps after 100%. Top says:
>
> Cpu0  : 68.6%us
> Cpu1  : 62.7%us
>
> but qjackctl and the jamins now all say CPU load is only 31%. I was
> hoping they would say 131% :-)
>
> Can anyone else reproduce this on a multi-core or multi-CPU system? Or
> is there a flaw in our implementation?
>

But isn't jamin running the processing in seperate threads?



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Daniel James-2
In reply to this post by Paul Davis
Hi Paul,

> JACK doesn't report CPU load. it reports "DSP load"

Both qjackctl and jamin label this figure as CPU load, which is probably
where we got confused. Ardour gets it right, of course :-)

 > in reality, you can only get up to
> about 80-85% DSP load before things fall apart

We've had a report of a successful test at 95% for two hours, no xruns.

> any normal measure
> of CPU load (top or any other system monitor) would have been reading
> 100% long before that.

We're seeing the opposite on dual-core and dual processor machines; the
'average' figure from top is half that reported by jack.

> Which wall clock
> are you using with JACK (gettimeofday, TSC, HPET etc.) ?

Our latest 2.6.18 kernel packages have CONFIG_HPET_TIMER=y but this is
preventing certain systems from booting, so unless there's a fix soon
we'll have to disable HPET by default. Is there a way to get jackd to
report which clock source it is actually using? I couldn't see anything
relevant in the verbose message output.

Cheers!

Daniel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Daniel James-2
In reply to this post by Kjetil Matheussen
Hi Kjetil,

> But isn't jamin running the processing in seperate threads?

The sum of the CPU loads (as reported by top) seems to be equivalent to
the figure reported by jack. The strange behaviour occurs when the sum
of CPU loads goes above 100%, which we can easily reproduce on a
dual-core system without maxing out either core.

I should add that we are testing slightly artificial conditions, such as
running three or four instances of Jamin at once. Surround sound
mastering, anyone? :-)

Cheers!

Daniel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Stéphane Letz
In reply to this post by Daniel James-2

Le 7 nov. 06 à 14:55, Daniel James a écrit :

> Hi Stéphane,
>
>> Hum... what do you mean by "load as double that which top reports for
>> total CPU load" ?
>
> I mean if I hit the '1' key while running top, it toggles between
> showing the average CPU load across cores or processors, and the  
> load on
> individual cores. So if I had 60% and 20% loads respectively, by  
> default
> top would show 40% and qjackctl would show 80%. If load goes up to 60%
> and 60% respectively, then top shows 60% but qjackctl shows only 20%,
> which is why I concluded that jack must be wrapping after 100%.
>
>> Jack DSP CPU measure the sum of DSP load of all running jack clients
>
> Right, but in my example cases the Jack apps are the only apps  
> consuming
> significant CPU.
>
>> You are supposed to have problems  (= xruns) in the setup you  
>> describe
>> since the sum of both processor load exceed 100% and you are running
>> "sequential" jack... Do you have them?
>
> We have users testing ardour with multiple instances of jamin on  
> kernel
> 2.6.18. One user with a single-core Sempron 64 ran ardour plus three
> jamins for two hours. 95% CPU load, no xruns. Another user tried the
> same thing on a dual core Athlon 64, and CPU usage was reported by the
> jack apps as 56%. But when the number of jamin instances was increased
> to four, the CPU usage was reported as only 2.5%, and although the
> system kept working, there was indeed the occasional xrun. It seems
> reasonable to assume that the sum of loads was actually 102.5% at this
> point.

So there is maybe an issue in jackd CPU calculation...

>
>> Concerning jackdmp use in a distribution, it seems that Ubuntu  
>> studio is
>> testing the possibility, see
>> http://ubuntuforums.org/showthread.php?t=283111
>
> Yes, I saw that thread. We are in a somewhat different situation  
> because
> we have been making releases for 18 months, and are finalising our
> stable 1.0 release, while Ubuntu Studio has yet to be released.
>
> For a future version, it would be great to be able to package both  
> jackd
> and jackdmp in such a way that users could choose which server they
> wanted at runtime, without breaking any of the apps.


Yes, I'm working on that. The best i could think would be the  
following :

- develop a special libjack wrapper library that would dynamically  
check what server is running (jackd or jackdmp), then load the  
appropriate libjack.so or libjackmp.so code and redirect the actual  
calls to it.

- use qjackctl quite normally and let the user choose between  
'"jackd" or "jackdmp" in qjackctl setting (the script idea we  
discussed with Kjetil this morning is probably not event needed...)

- as soon as the server is started, the libjack wrapper library does  
its job, and applications opened later on would access the correct  
version of the library.

This way of doing seems quite simple and powerfull (provided that  
users do not run jackd and jackdmp at the same time... (-: )

Stephane
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Jack O'Quin
In reply to this post by Kjetil Matheussen
On 11/7/06, Kjetil S. Matheussen <[hidden email]> wrote:

> But isn't jamin running the processing in seperate threads?

I does when the JACK period is less than 256.  In that case the reported
jamin CPU load is usually only a few percent, reflecting the ring queue
processing done in the process() thread.

So, if you want jamin DSP to be included in your JACK CPU load, run
with at least -p256.  Mastering is not generally a low-latency operation,
so even larger periods are usually appropriate.
--
 joq

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Lee Revell
In reply to this post by Daniel James-2
On Tue, 2006-11-07 at 14:20 +0000, Daniel James wrote:

> > Which wall clock
> > are you using with JACK (gettimeofday, TSC, HPET etc.) ?
>
> Our latest 2.6.18 kernel packages have CONFIG_HPET_TIMER=y but this
> is
> preventing certain systems from booting, so unless there's a fix soon
> we'll have to disable HPET by default. Is there a way to get jackd to
> report which clock source it is actually using? I couldn't see
> anything
> relevant in the verbose message output.
>

A distro that targets 64 bit machines MUST configure JACK to use
gettimeofday().  No other time source is reliable.

Lee


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Paul Davis
On Tue, 2006-11-07 at 12:06 -0500, Lee Revell wrote:

> On Tue, 2006-11-07 at 14:20 +0000, Daniel James wrote:
> > > Which wall clock
> > > are you using with JACK (gettimeofday, TSC, HPET etc.) ?
> >
> > Our latest 2.6.18 kernel packages have CONFIG_HPET_TIMER=y but this
> > is
> > preventing certain systems from booting, so unless there's a fix soon
> > we'll have to disable HPET by default. Is there a way to get jackd to
> > report which clock source it is actually using? I couldn't see
> > anything
> > relevant in the verbose message output.
> >
>
> A distro that targets 64 bit machines MUST configure JACK to use
> gettimeofday().  No other time source is reliable.

if this claim is true (i don't know if it is), this is a runtime issue,
not a compile time issue.




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMPmachines?

Quentin Harley
In reply to this post by Jack O'Quin
Yes, I would use a higher buffer for mastering normally.  I was merely
throwing a rock into the bush to test the reliability of a heavy low latency
DSP load on the new version of jack (0.102) on my AMD64x2. And sure enough a
tiger came leaping out of it...

This is not a problem for me at the moment, but jamin is such a nice
real-time tool, and it would be a shame not to use the PC as a live audio
tool if the processing power is readily available ;-)

Quentin

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jack O'Quin
Sent: 07 November 2006 17:31
To: Kjetil S. Matheussen
Cc: [hidden email]
Subject: Re: [Jackit-devel] CPU load reading too high on dual-core and
SMPmachines?

On 11/7/06, Kjetil S. Matheussen <[hidden email]> wrote:

> But isn't jamin running the processing in seperate threads?

I does when the JACK period is less than 256.  In that case the reported
jamin CPU load is usually only a few percent, reflecting the ring queue
processing done in the process() thread.

So, if you want jamin DSP to be included in your JACK CPU load, run
with at least -p256.  Mastering is not generally a low-latency operation,
so even larger periods are usually appropriate.
--
 joq

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Florian Paul Schmidt-2
In reply to this post by Daniel James-2
On Tuesday 07 November 2006 15:20, Daniel James wrote:
> We're seeing the opposite on dual-core and dual processor machines; the
> 'average' figure from top is half that reported by jack.

Wouldn't that make an awful lot of sense actually? jackd and all its clients
process() cycles are being run on a single cpu. If they max out this cpu
jackd would report 100% dsp time. But for top the system is only half loaded
(as one more cpu is free).

Maybe i'm talking out of my arse here, as i never had a SMP system :(

Flo

--
Palimm Palimm!
http://tapas.affenbande.org

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Jussi Laako
In reply to this post by Lee Revell
Lee Revell wrote:
> A distro that targets 64 bit machines MUST configure JACK to use
> gettimeofday().  No other time source is reliable.

Please don't state gettimeofday() being right option as it's wrong.
clock_gettime() is the only correct one... ;) NTP can pretty well fsck
up your gettimeofday().

In any case jack will automagically use clock_gettimeofday() if
available at configure time instead of gettimeofday() which is a
fallback for oldie non-POSIX-RT -compliant systems (kernel < 2.6.x).

However, the selectable clock source in jack has three options (on x86),
'cycle', 'hpet' and 'system'. And in this case the correct answer would
be 'system', ie. "--clocksource s" parameter for the jackd.


BR,

        - Jussi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Paul Davis
In reply to this post by Florian Paul Schmidt-2
On Tue, 2006-11-07 at 20:04 +0100, Florian Schmidt wrote:
> On Tuesday 07 November 2006 15:20, Daniel James wrote:
> > We're seeing the opposite on dual-core and dual processor machines; the
> > 'average' figure from top is half that reported by jack.
>
> Wouldn't that make an awful lot of sense actually? jackd and all its clients
> process() cycles are being run on a single cpu. If they max out this cpu
> jackd would report 100% dsp time. But for top the system is only half loaded
> (as one more cpu is free).

absolutely not true. maxing out a CPU has nothing whatsoever to do with
the JACK DSP load. it is, again, the percentage of the JACK period
actually used to run the process cycle. the same JACK graph could
generate a 10% DSP load on 1 machine, 2% DSP load on another, and 90%
DSP load on another. it has only an indirect relationship with CPU load.
likewise, its possible to imagine systems in which the DSP load was
roughly similar, but the CPU load varied significantly.



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Lee Revell
In reply to this post by Jussi Laako
On Tue, 2006-11-07 at 21:10 +0200, Jussi Laako wrote:
> Lee Revell wrote:
> > A distro that targets 64 bit machines MUST configure JACK to use
> > gettimeofday().  No other time source is reliable.
>
> Please don't state gettimeofday() being right option as it's wrong.
> clock_gettime() is the only correct one... ;) NTP can pretty well fsck
> up your gettimeofday().
>

Sorry, you're right - I tend to think of them as interchangeable because
both use sys_gettimeofday() syscall.

> In any case jack will automagically use clock_gettimeofday() if
> available at configure time instead of gettimeofday() which is a
> fallback for oldie non-POSIX-RT -compliant systems (kernel < 2.6.x).
>
> However, the selectable clock source in jack has three options (on x86),
> 'cycle', 'hpet' and 'system'. And in this case the correct answer would
> be 'system', ie. "--clocksource s" parameter for the jackd.
>

What is the default?

>
> BR,
>
> - Jussi
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Lee Revell
In reply to this post by Paul Davis
On Tue, 2006-11-07 at 12:54 -0500, Paul Davis wrote:
> if this claim is true (i don't know if it is), this is a runtime
> issue, not a compile time issue.
>

I should have said "no other time source is guaranteed to be reliable on
all x64-64 machines".  And in fact, a very recent mainline or -rt kernel
will be needed for even clock_gettime()/gtod() to be correct on these.

Lee


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Jussi Laako
In reply to this post by Lee Revell
Lee Revell wrote:
> Sorry, you're right - I tend to think of them as interchangeable because
> both use sys_gettimeofday() syscall.

No, it should use sys_clock_gettime() syscall which is implemented in
kernel/posix-timers.c. If it doesn't, it's a bug in glibc. And at quick
glance it seems to do the right thing (glibc 2.4 && 2.5).

And a slight clarification; gettimeofday() of course itself functions as
it should, but because of this it's slightly unsuitable for our use (NTP
can adjust it). This is why we use monotonic clock provided by the system.

>> However, the selectable clock source in jack has three options (on x86),
>> 'cycle', 'hpet' and 'system'. And in this case the correct answer would
>> be 'system', ie. "--clocksource s" parameter for the jackd.
>
> What is the default?

System clock, so nothing needs to be specified to get the correct
behaviour in any case.


        - Jussi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Quentin Harley
OK, why is the clock source important for the calculation of the DSP load on
a dual core machine?  Jack is running, and smoothly.  It's just not running
half as hard as it could on my PC!

Don't get me wrong. I love jack, and it changed the way I work with audio on
PC forever. I just want jack to love me in return...

I know dual cores changes everything, but it is the only way the chip
manufacturers can squeeze more power out of the silicon, and we'll see more
elaborate stuff soon (read: AMD quad core).  Will jackd then report 4x the
CPU load for a 4core chip?  This is a very important fix that needs to be
implemented if jackd has a place in modern PC use.

Thanks to all the dedicated programmers and testers that made jackd what it
is today.

Quentin

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jussi Laako
Sent: 08 November 2006 00:02
To: Lee Revell
Cc: [hidden email]; 64Studio mailing list;
[hidden email]
Subject: Re: [Jackit-devel] CPU load reading too high on dual-core and SMP
machines?

Lee Revell wrote:
> Sorry, you're right - I tend to think of them as interchangeable because
> both use sys_gettimeofday() syscall.

No, it should use sys_clock_gettime() syscall which is implemented in
kernel/posix-timers.c. If it doesn't, it's a bug in glibc. And at quick
glance it seems to do the right thing (glibc 2.4 && 2.5).

And a slight clarification; gettimeofday() of course itself functions as
it should, but because of this it's slightly unsuitable for our use (NTP
can adjust it). This is why we use monotonic clock provided by the system.

>> However, the selectable clock source in jack has three options (on x86),
>> 'cycle', 'hpet' and 'system'. And in this case the correct answer would
>> be 'system', ie. "--clocksource s" parameter for the jackd.
>
> What is the default?

System clock, so nothing needs to be specified to get the correct
behaviour in any case.


        - Jussi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU load reading too high on dual-core and SMP machines?

Daniel James-2
In reply to this post by Paul Davis
Hi Paul,

 > maxing out a CPU has nothing whatsoever to do with
> the JACK DSP load. it is, again, the percentage of the JACK period
> actually used to run the process cycle. the same JACK graph could
> generate a 10% DSP load on 1 machine, 2% DSP load on another, and 90%
> DSP load on another. it has only an indirect relationship with CPU load.

In that case, given that Ardour shows the DSP load as the exact same
figure that qjackctl and jamin provide for 'CPU load', should we file
bugs against any jack apps which label the figure as 'CPU load'?

Should jackd display a warning when DSP load exceeds 100%, rather than
just wrapping the load figure and throwing out an xrun once in a while?

Cheers!

Daniel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
12