[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Individual Synth's CPU usage...



Just a detail that comes to mind, in speedstep enabled systems (most computers with intel chips, amd has a similar feature too if I'm not mistaken), the cpu usage does not grow linearly to my knowledge. After a certain amount of load is reached, the CPU clock speed is increased by the OS, and there are multiple throttle levels. The side effect of this is that a piece of code eating 40% of CPU may or may not use 60% (instead of 80%) when two instances of it is ran simultaneously. Thus predictions might not be accurate.

Batuhan Bozkurt
/* http://www.earslap.com */




On Jul 24, 2009, at 11:19 AM, Sciss wrote:

the graph is determined by the SynthDef class as far as i know (method finishBuild), so it could be enforced in the class library i guess... maybe with a little tweak it could be represented to the user as one ugen (like CpuUsage or whatever) and then CpuUsage:addToSynth would add the two actual ugens.

ciao, -sciss-


Am 24.07.2009 um 08:32 schrieb Dan Stowell:

Oh yes, that might do it. The equivalent of "tic" and "toc" in matlab.
Hadn't thought of that. There's no way for a ugen on its own to time
the execution of a synth, but if you could ensure that Tic.kr came at
the start of the synth's graph, and Toc.kr came at the end, you could
measure the interval. Hmm...

Dan

2009/7/23, Josh Parmenter <josh@xxxxxxxxxxxxxxxxx>:
Or possibly a UGen pair that run at the head and tail of the UGen graph, and check the amount of time it takes to execute the graph (storing values in the Graph's struct)? Then the second UGen could output the difference? I don't know how to access the values that would yield the amount of CPU used to calculate the Graph, but I imagine that could be another solution.

Best,

Josh


On Jul 23, 2009, at 2:53 PM, Sciss wrote:


hmmm, maybe you are right. i imagine, technically it would maybe be easier
to have something like a new server command

[ /n_bench, <nodeID> ]

or so. that way you could even calculate the total CPU usage of a
sub-branch of the node graph....

ciao, -sciss-


Am 23.07.2009 um 23:47 schrieb Josh Parmenter:


I'm not sure if this is really something a UGen could easily compute,
since it would have to know how long the entire SynthDef graph takes. and it would (I'm guessing) have to actually outputs its value somewhere in the
synthesis chain.

Not sure if this helps, but one thing I do with pieces is, before
performing them, run 20 of a synth and get an average from that (divide by
20 obviously). Then in my routines that are creating new notes (or
responding to triggers), I check the current CPU Usage before creating the note with s.avgCPU . If it is below a certain threshold, I let the new synth
be created.

Best,

Josh

On Jul 23, 2009, at 10:49 AM, Sciss wrote:


hi,

any clues how to measure a particular synth's individual CPU usage? i
like to add a management to my live patch that can track which instruments takes how much CPU and can also warn before creating a new instance of that
instruments if CPU would go too high...

if there's none -- how difficult would it be to have like a
CpuUsage.kr ugen?

ciao, -sciss-


_______________________________________________
sc-users mailing list

info (subscription, etc.):
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive:
https://listarc.bham.ac.uk/marchives/sc-users/
search:
https://listarc.bham.ac.uk/lists/sc-users/search/


******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own
interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi
Nono
*/


_______________________________________________
sc-users mailing list

info (subscription, etc.):
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive:
https://listarc.bham.ac.uk/marchives/sc-users/
search:
https://listarc.bham.ac.uk/lists/sc-users/search/



_______________________________________________
sc-users mailing list

info (subscription, etc.):
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive:
https://listarc.bham.ac.uk/marchives/sc-users/
search:
https://listarc.bham.ac.uk/lists/sc-users/search/


******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own
interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi
Nono
*/


_______________________________________________
sc-users mailing list

info (subscription, etc.):
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search:
https://listarc.bham.ac.uk/lists/sc-users/search/



--
http://www.mcld.co.uk

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/