[Jack-Devel] How to profile jack cpu load?

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

[Jack-Devel] How to profile jack cpu load?

oleg68
Hello.

I use jackd with some music applications and patchbay. After some time after
starting the jack cpu load (according to QJackCtl) becomes 100%, the last
sound (or silence) pins and no more sound appearrs.

I'd like to investigate this situation and to find, which jack client
application consumes CPU. Looking at the jack sourcecode I found
JackEngineProfiling hich seams makes some measuring. But I could not find
how to use this feature?

Ho can I search the distinct CPU load by each jack client application?




--
Sent from: http://jack-audio.10948.n7.nabble.com/Jackit-f3.html
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Joakim Hernberg-2
You have to rebuild JACK2 with the --profiling option.

It's also a fixed buffer, so it only works for a while after starting
the server.

You can get nice graphs for the results too, see:
http://www.grame.fr/ressources/publications/Timing.pdf


On Sat, 7 Jul 2018 10:56:21 -0700 (MST)
oleg68 <[hidden email]> wrote:

> Hello.
>
> I use jackd with some music applications and patchbay. After some
> time after starting the jack cpu load (according to QJackCtl) becomes
> 100%, the last sound (or silence) pins and no more sound appearrs.
>
> I'd like to investigate this situation and to find, which jack client
> application consumes CPU. Looking at the jack sourcecode I found
> JackEngineProfiling hich seams makes some measuring. But I could not
> find how to use this feature?
>
> Ho can I search the distinct CPU load by each jack client application?
>
>
>
>
> --
> Sent from: http://jack-audio.10948.n7.nabble.com/Jackit-f3.html
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org



--

   Joakim
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

oleg68
This post was updated on .
Thanks. I have already rebuilt jack with --profiling option and started it,
but seems nothing changed. No JackEngineProfiling.log file apeared after
starting jackd.

When I started jackd with -v option, there no message "Engine profiling activated" in the standard output.

When I set the brakpoint at JackEngineProfiling::JackEngineProfiling() with a debugger, this breakpoint is never reached.

How can I receive the profiling information from the running server and make
the plots?



--
Sent from: http://jack-audio.10948.n7.nabble.com/Jackit-f3.html
_______________________________________________
Jack-Devel mailing list
Jack-Devel@lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Daniel Farmer

They should call it "jack shit" because that's all it does.


Jack Shit.


From: Jack-Devel <[hidden email]> on behalf of oleg68 <[hidden email]>
Sent: July 8, 2018 8:13:09 AM
To: [hidden email]
Subject: Re: [Jack-Devel] How to profile jack cpu load?
 
Thanks. I have already rebuilt jack with --profiling option and started it,
but seems nothing changed. No a JackEngineProfiling.log file apeared after
starting jackd.

How can I receive the profiling information from the running server and make
the?



--
Sent from: http://jack-audio.10948.n7.nabble.com/Jackit-f3.html
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Joakim Hernberg-2
In reply to this post by oleg68
To be honest I don't know.  It was years ago that I used this, maybe
it's another part of the code that is broken nowdays..?  JACK2 isn't
really maintained anymore, but hopefully that will change in the future.

On Sun, 8 Jul 2018 00:13:09 -0700 (MST)
oleg68 <[hidden email]> wrote:

> Thanks. I have already rebuilt jack with --profiling option and
> started it, but seems nothing changed. No a JackEngineProfiling.log
> file apeared after starting jackd.
>
> How can I receive the profiling information from the running server
> and make the?
>
>
>
> --
> Sent from: http://jack-audio.10948.n7.nabble.com/Jackit-f3.html
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org



--

   Joakim
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

John Rigg-16
In reply to this post by Daniel Farmer
On Sun, Jul 08, 2018 at 06:10:05PM +0000, Daniel Farmer wrote:
> They should call it "jack shit" because that's all it does.
>
>
> Jack Shit.

This post tells me all I need to know about your competence
as an audio engineer and/or developer. Sometimes it's better
to keep your mouth shut and hope nobody notices you're an
idiot, rather than opening it and advertising the fact.

John
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

David Kastrup
In reply to this post by Daniel Farmer
Daniel Farmer <[hidden email]> writes:

> They should call it "jack shit" because that's all it does.

Let me guess how much you contributed to its code and documentation.
And likely the code and documentation of any Free Software, given that
entitlement attitude and this show of respect.

--
David Kastrup
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Chris Caudle
In reply to this post by Joakim Hernberg-2
On Sun, July 8, 2018 1:57 pm, Joakim Hernberg wrote:
> JACK2 isn't really maintained anymore, but hopefully that
> will change in the future.

Many months back falkTX took on maintenance for both jackd v1 and jackd v2
code, so jack2 is maintained to the same extent as jack1.  FalkTX
previously posted plans for 2018, primarily clean up tasks like getting
shared headers (i.e. shared between jack 1 and jack 2) fully working,
porting the zita-ajbridge based clients from jack v1 to jack v2, I think
also porting in a2jmidid internal client to jack v2.  I have no idea how
much progress has been made on those; I'm sure clean patches would
probably be accepted.

--
Chris Caudle




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

termtech
In reply to this post by Daniel Farmer
>  When I started jackd with -v option, there no message "Engine
profiling activated" in the standard output.
> When I set the brakpoint at JackEngineProfiling::JackEngineProfiling() with a debugger, this breakpoint is never > >reached.

Hi, I'd like to report that out of curiosity, I just built
  and installed jack2-1.9.12, here on openSUSE Tumbleweed,
  with the profiling enabled with --profile configure flag.

Here's what I get:

====================================
/usr/local/bin/jackd -P30 -dalsa -r44100 -p256 -n2 -Xseq -D
-Chw:M1010LT,0 '-Phw:M1010LT,0'
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 30
self-connect-mode is "Don't restrict self connect requests"

Engine profiling activated, beware 197 MBytes are needed to record
profiling points...

creating alsa driver ... hw:M1010LT,0
|hw:M1010LT,0|256|2|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 256 frames (5.8 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback
port created: Midi-Through:midi/playback_1
port created: Midi-Through:midi/capture_1
port created: M-Audio-Delta-1010LT:midi/playback_1
port created: M-Audio-Delta-1010LT:midi/capture_1
Jack main caught signal 15
port deleted: M-Audio-Delta-1010LT:midi/playback_1
port deleted: Midi-Through:midi/playback_1
port deleted: M-Audio-Delta-1010LT:midi/capture_1
port deleted: Midi-Through:midi/capture_1
Write server and clients timing data...
JackEngineProfiling::Save cannot open JackEngineProfiling.log file
JackEngineProfiling::Save cannot open Timing1.plot file
JackEngineProfiling::Save cannot open Timing2.plot file
JackEngineProfiling::Save cannot open Timings.html file
JackEngineProfiling::Save cannot open generate_timings file
*** Killed process ***
====================================

Note you must stop the server before the profiling info can be
  gathered and written, as shown in that .pdf link someone posted.
I'm not sure if it could not write because I ungracefully
  killed it, or it's simply a permissions/location thing,
  probably the latter, I have not looked into it any further
  yet...

Tim.
The MusE sequencer project.
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

John Rigg-16
In reply to this post by oleg68
On Sun, Jul 08, 2018 at 08:35:53PM +0000, Daniel Farmer wrote:
> So funny. Jack Shit is shitty and shitty developers start telling me how much I suck because they can't take responsibility for their crappy programming "skills".
>
> If you developers were so great we'd at least have "Jack is the shit"
>
>
> But right now all we have is "Jack Shit".
>
>
> LOLOLOLOLOLOLOLOLOLOL

I guess this is an example of how Linux audio software has
become a victim of its own success.

I've been using jackd for audio work since 2005. Up until
recently the level of discussion on most of the Linux audio
mailing lists was quite high. Over the last three or four
years I've gradually unsubscribed from most of them as
they've become unusable due to adolescent behaviour like
the above.

I was hoping jack-devel wouldn't succumb like the others.
Pity.

John
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Joakim Hernberg-2
In reply to this post by Chris Caudle
On Sun, 8 Jul 2018 14:28:14 -0500
"Chris Caudle" <[hidden email]> wrote:

> On Sun, July 8, 2018 1:57 pm, Joakim Hernberg wrote:
> > JACK2 isn't really maintained anymore, but hopefully that
> > will change in the future.  
>
> Many months back falkTX took on maintenance for both jackd v1 and
> jackd v2 code, so jack2 is maintained to the same extent as jack1.
> FalkTX previously posted plans for 2018, primarily clean up tasks
> like getting shared headers (i.e. shared between jack 1 and jack 2)
> fully working, porting the zita-ajbridge based clients from jack v1
> to jack v2, I think also porting in a2jmidid internal client to jack
> v2.  I have no idea how much progress has been made on those; I'm
> sure clean patches would probably be accepted.

That's why I wrote "isn't really maintained"..  I am aware that falktx
has taken on the maintainership, and hopefully the future will bring
improvements.

The point was that JACK2 even though it had a maintainer
before falktx was somewhat bit rotting and not getting any real
development, while JACK1 got updates as long as Paul was maintaining
it.

Just thought it was a possibility that profiling was also something not
working properly anymore.

I suppose I should have chosen other words to avoid misunderstanding :)

--

   Joakim
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Kjetil Matheussen-2
In reply to this post by oleg68


On Sun, Jul 8, 2018 at 9:13 AM, oleg68 <[hidden email]> wrote:
Thanks. I have already rebuilt jack with --profiling option and started it,
but seems nothing changed. No a JackEngineProfiling.log file apeared after
starting jackd.

How can I receive the profiling information from the running server and make
the?


Maybe you have to set JACK_CLIENT_DEBUG to 1?



_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Kjetil Matheussen-2
In reply to this post by Joakim Hernberg-2


On Mon, Jul 9, 2018 at 1:37 PM, Joakim Hernberg <[hidden email]> wrote:
On Sun, 8 Jul 2018 14:28:14 -0500
"Chris Caudle" <[hidden email]> wrote:

> On Sun, July 8, 2018 1:57 pm, Joakim Hernberg wrote:
> > JACK2 isn't really maintained anymore, but hopefully that
> > will change in the future. 
>
> Many months back falkTX took on maintenance for both jackd v1 and
> jackd v2 code, so jack2 is maintained to the same extent as jack1.
> FalkTX previously posted plans for 2018, primarily clean up tasks
> like getting shared headers (i.e. shared between jack 1 and jack 2)
> fully working, porting the zita-ajbridge based clients from jack v1
> to jack v2, I think also porting in a2jmidid internal client to jack
> v2.  I have no idea how much progress has been made on those; I'm
> sure clean patches would probably be accepted.

That's why I wrote "isn't really maintained"..  I am aware that falktx
has taken on the maintainership, and hopefully the future will bring
improvements.

The point was that JACK2 even though it had a maintainer
before falktx was somewhat bit rotting and not getting any real
development, while JACK1 got updates as long as Paul was maintaining
it.

Just thought it was a possibility that profiling was also something not
working properly anymore.

I suppose I should have chosen other words to avoid misunderstanding :)


This seems like FUD. If something isn't working, report it. Few updates doesn't
mean that it's "bit rotting" or "isn't really maintained". If something works
as it should, it doesn't need updates.



_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Joakim Hernberg-2
In reply to this post by Kjetil Matheussen-2
To put my money where my mouth is (so to speak :)

I just built JACK2 1.9.12 with the --profile option.

I started it with:
jackd -P80 -p512 -t5000 -dalsa -dhw:DSP,0 -r44100 -p128 -n2 -Xseq

On startup JACK2 reported:
Engine profiling activated, beware 197 MBytes are needed to record profiling points...

And on shutdown:
Write server and clients timing data...

The data is there and gnuplot can display it.

Possible issues it seems to store the data in the current working dir.
No idea where that might be if started from qjackctl or with dbus.
Maybe best to start it from the command line to be sure that you know
where the data ends up

--

   Joakim
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Stéphane Letz
It seems that « shit still works… »

> Le 10 juil. 2018 à 12:09, Joakim Hernberg <[hidden email]> a écrit :
>
> To put my money where my mouth is (so to speak :)
>
> I just built JACK2 1.9.12 with the --profile option.
>
> I started it with:
> jackd -P80 -p512 -t5000 -dalsa -dhw:DSP,0 -r44100 -p128 -n2 -Xseq
>
> On startup JACK2 reported:
> Engine profiling activated, beware 197 MBytes are needed to record profiling points...
>
> And on shutdown:
> Write server and clients timing data...
>
> The data is there and gnuplot can display it.
>
> Possible issues it seems to store the data in the current working dir.
> No idea where that might be if started from qjackctl or with dbus.
> Maybe best to start it from the command line to be sure that you know
> where the data ends up
>
> --
>
>   Joakim
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

Joakim Hernberg-2
Managed to only send this offlist, trying agian.

On Tue, 10 Jul 2018 12:36:50 +0200
Stéphane Letz <[hidden email]> wrote:

> It seems that « shit still works… »  

Indeed :)

Sorry for insinuating that JACK2 was bit rotting..!

Do you know if PROMISCIOUS mode is supposed to work?  Last time I tried
(a few years ago) I could not get it working with JACK2.

--

   Joakim
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

oleg68
This post was updated on .
In reply to this post by Joakim Hernberg-2
I'd made a file test.sh, that downloads, builds and runs jackd.
------------------------------------------
#/usr/bin/sh
rm -rf jack2
git clone git://github.com/jackaudio/jack2.git
cd jack2
./waf configure --profile
./waf build
echo
echo "Running jackd"
build/jackd -v -R -P40 -dalsa -d hw:Pro -r 48000 -p 1024 -n 2 -s -P
------------------------------------------

Than I ran:

./test.sh | tee test.log

The resulting  test.log
<http://jack-audio.10948.n7.nabble.com/file/t1525/test.log>   does not
contain any 'Engine profiling activated' message



--
Sent from: http://jack-audio.10948.n7.nabble.com/Jackit-f3.html
_______________________________________________
Jack-Devel mailing list
Jack-Devel@lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

termtech


On 07/13/2018 04:21 PM, oleg68 wrote:

> I'd maken a file test.sh, that downloads, builds and runs jackd.
> ------------------------------------------
> #/usr/bin/sh
> rm -rf jack2
> git clone git://github.com/jackaudio/jack2.git
> cd jack2
> ./waf configure --profile
> ./waf build
> echo
> echo "Running jackd"
> build/jackd -v -R -P40 -dalsa -d hw:Pro -r 48000 -p 1024 -n 2 -s -P
> ------------------------------------------
>
> Than I ran:
>
> ./test.sh | tee test.log
>
> The resulting  test.log
> <http://jack-audio.10948.n7.nabble.com/file/t1525/test.log>   does not
> contain any 'Engine profiling activated' message


Hm, no ./waf install step?

Although it appears that the jackd you built is in fact
  the one that is running, it seems possible to me that
  it may be loading all of its libraries from a previous jack
  installation such as in /usr or /usr/local - libraries that
  were not built with the profiling.

Try the install step which should replace those libraries.

I find that it is always a good idea to run "sudo ldconfig"
  after playing around with jack install steps, so that the
  system really can find the correct libraries.
That is supposed to happen automatically with most software,
  but I found sometimes it doesn't with jack, possibly with
  just one of the jack versions, I can't recall which.

Tim.
The MusE sequencer project.
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

oleg68
This post was updated on .
You are right. The problem was the conflict with the old jack libraries

But .waf install with ldconfig did not help.

I solved this problem after had built the rpm package
jack-audio-connection-kit for my operating system (fedora 28) with profiling enabled and
had updated the installed jack-audio-connection-kit with the new one.

Now I can see the message

'Engine profiling activated, beware 783 MBytes are needed to record
profiling points...'




--
Sent from: http://jack-audio.10948.n7.nabble.com/Jackit-f3.html
_______________________________________________
Jack-Devel mailing list
Jack-Devel@lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: How to profile jack cpu load?

John Rigg-16
On Sat, Jul 14, 2018 at 12:41:28AM -0700, oleg68 wrote:
> You are right. The problem was the conflict with the old jack libraries
>
> But .waf install with ldconfig did not help.

You need to tell "./waf configure" to install jack over
the existing jack package files. On Debian systems I use
--prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu

Your distro may use different locations, but it's easy
to check.

John
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
12