hi crew(s) i just discovered little problem that i cannot figure out at all. it has been happening for the last couple of weeks and i really need to iron it out before i lose faith in my tools. i am posting this to both the demudi list and the pd because i'm not sure where the problem originates. i am using demudi with pd 38 test 7(althought this same problem is occurring with devel-37 and the stable 37). So i have this (pd) patch and admittedly its quite big, lots of live sampling and looping. i have made bigger patches before so i'm not convinced that i'm being excessive. it runs fine for about 20 minutes then all of a sudden the whole system goes into a melt down. the mouse is really slow and X looks as if its going to give up. (in some cases it does). my computer goes all crazy and the hard disk light is flashing like mad. the cpu meters (both pd and linux 'top' ) don't seem to be peaking out, its hovering around 30%. this all happened in a rehearsal the other day and it was quite embarrassing. i'm not quite sure where the problem is originating so any suggestions that i should check out would be great. am i using too many GOPs perhaps?
one other question while i'm here, i am also running JACK at 11.6 latency. the latency for the piece i am working on is important so i am reluctant to go slower here. the funny thing is though, i can't seem to get this latency with using 'just' ALSA. i get a bunch of clicks if i go below 20ms. this i odd to me because i would have thought that it would be more effiecient to use just ALSA without JACK to get super low latency. plus i am not using any other software besides PD so i don't really need jack running....do i? any suggestion would be fantastic. cheers tom
p4 2.6 (800fsb) 512RAM M-Audio Delta 1010.
Hallo, Tom Dunstan hat gesagt: // Tom Dunstan wrote:
one other question while i'm here, i am also running JACK at 11.6 latency. the latency for the piece i am working on is important so i am reluctant to go slower here. the funny thing is though, i can't seem to get this latency with using 'just' ALSA. i get a bunch of clicks if i go below 20ms. this i odd to me because i would have thought that it would be more effiecient to use just ALSA without JACK to get super low latency. plus i am not using any other software besides PD so i don't really need jack running....do i?
You should also try "pd -oss".
Frank Barknecht _ ______footils.org__
On Sun, 2004-10-31 at 07:04, Tom Dunstan wrote:
convinced that i'm being excessive. it runs fine for about 20 minutes then all of a sudden the whole system goes into a melt down. the mouse is really slow and X looks as if its going to give up. (in some cases it does). my computer goes all crazy and the hard disk light is flashing like mad. the cpu meters (both pd and linux 'top' ) don't seem to be peaking out, its hovering around 30%.
a couple ideas....
delays when they hit a bad sector. use the smartmon tools to get a diagnostic. syslog might say something about this too.
available). this is very likely since you mention that X is getting killed. linux seems to get really sluggish if you run out of ram. eventually it will kill one or more processes to free up space, but it can take a while before it decides what process to kill. I've noticed that it seems to hit the disk a lot during this time, even if you don't have swap enabled (not sure why, maybe its making an emergency swap area), the load average also goes way up which is correlated with the sluggish interactivity. since you've tested with multiple versions of pd, I'd guess some external or other process is leaking memory / left hanging, etc.
I manage some remote servers for work, and there was one that would consistently "crash" after about 2 weeks of uptime. in fact, it was not offline, you could ping it, but it could not even spawn a shell so i was unable to login and diagnose it -- eventually i determined that there was a cron job that was not exiting, so every day there would be a new copy of this process hanging around until the machine ran out of memory and essentially froze.
regarding the latency with jack, etc. first of all, if you really care about latency, i think its important to actually measure roundtrip latency with a loopback test, the reason being that the audio subsystem is suprisingly complex, i.e., functionally its a black box (or at least, a nearly opaque one). block size/count at the application level is just that -- the underlying driver and/or hardware could easily be doing something completely different (e.g., some devices actually operate with a fixed block size, alsa also has the plughw layer which can really confuse things). a program might claim to have x latency but in fact the true latency is 2x or some other number. it never ceases to amaze me how lazy people are when it comes to testing (myself included, i suppose ;).
I think that jack is a truely remarkable piece of work, and its quite possible that it simply "understands" how to use the alsa api to get the best possible performance (although this discussion is meaningless sans loopback testing). in any case the cpu overhead is negligible unless you are dithering/resampling, so I would not worry about it.
cheers & best of luck, andy.
Hello Tom,
don't lose the faith! There's an explaination for everything!
Tom Dunstan wrote:
i just discovered little problem that i cannot figure out at all. it runs fine for about 20 minutes then all of a sudden the whole system goes into a melt down.
p4 2.6 (800fsb)
OK. Since you are running Linux on a Pentium 4, I wouldn't rule out the possibility that this is a denormal numbers related problem. Usually, however, you see a huge spike in CPU usage with this, however...
Try running your patch on another CPU, OS or both. Does it run fine on OSX? What about with Linux on an Athlon? How about windoze?
Search the PD list archives for more on denormals, but basically the solution that is offered by other listers is to check out the CVS version of 0.37 or 0.37_devel and configure it with
-enable-optimize=pentium4 --enable-simd
You'll also need to do this with every external. These two config options, IIRC, insert the following flags into the makefile, which you will need to use with all your externals:
-march=pentium4 -mfpmath=sse
[correct me here, gang!]
Tim Blechmann has done some work with P4 optimizations by setting a Float To Zero switch in the devel branch. I didn't have any luck with it, but my P4 is too old to support this switch...
Another suggestion which came my way was to use something like KCacheGrind to find out what is eating up all your memory or CPU cycles. KCachegrind uses Calltree, and is part of KDE 3.3 (package kdesdk). See: http://kcachegrind.sourceforge.net/
This will also help you figure out if you are simply running out of RAM, as Andy suggests ;-)
Or this:
Tim Blechmann wrote:
thomas musil told me about the approach he used ... adding noise~ *~1e-14 to every feedback loop, filter ...
good luck, d.