PDA

View Full Version : CPU usage


RRokkenAudio
02-11-2010, 02:52 AM
Just loading a blank project with like 4 knobs and *out1 = *in1; gives me about .4% cpu. Just as an baseline, reaEQ default uses 0.7% with 4bands! Am I missing something, is the only thing that adds to the cpu the processing loop? .4% kinda seems high to me.

~Rob.

stupeT
02-11-2010, 03:18 AM
Just loading a blank project with like 4 knobs and *out1 = *in1; gives me about .4% cpu. Just as an baseline, reaEQ default uses 0.7% with 4bands! Am I missing something, is the only thing that adds to the cpu the processing loop? .4% kinda seems high to me.

~Rob.

In general REAPER seems to eat more CPU with the most primitive Projects. The good thing: it increases CPU-load much slower than other DAWs when the projects are getting bigger.

My tip: don't worry.

dub3000
02-11-2010, 03:37 AM
I think he's talking about writing a vst

did you compile in release mode or debug mode? Can make a very big difference

Dstruct
02-11-2010, 03:43 AM
Just loading a blank project with like 4 knobs and *out1 = *in1; gives me about .4% cpu. Just as an baseline, reaEQ default uses 0.7% with 4bands! Am I missing something, is the only thing that adds to the cpu the processing loop? .4% kinda seems high to me.

~Rob.

0.4 % seems high to you?

RRokkenAudio
02-11-2010, 04:14 AM
I'm talking about c++ and iplug. I am compiling in debug mode. I'll take a look at that. BTW,Yeah, .4% for a plug that actually doesn't do anything is quite high.

EDIT: Just tested in release mode got " cannot open input file 'lice.lib'", so, some work to do, I really never used release!

~Rob.

RRokkenAudio
02-11-2010, 04:38 AM
woo. massive linker errors now:

Linking...
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _fopen already defined in LIBCMT.lib(fopen.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(sprintf.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _abort already defined in LIBCMT.lib(abort.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _sscanf already defined in LIBCMT.lib(sscanf.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(getenv.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: _fprintf already defined in LIBCMT.lib(fprintf.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: ___iob_func already defined in LIBCMT.lib(_file.obj)
msvcrt.lib(MSVCR90.dll) : error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj)
Creating library Release/test.lib and object Release/test.exp
LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Release/BTEQ.dll : fatal error LNK1169: one or more multiply defined symbols found

dub3000
02-11-2010, 04:44 AM
woo. massive linker errors now:



go back, clean/recompile everything as release, including all libraries.

expect a 2x to 10x speedup moving from debug to release, depending on your code.

RRokkenAudio
02-11-2010, 04:48 AM
ah, seeing as though i never knew about release, i bet i built everything with debug(iplug,lice etc lol)

Thank you!

it reduced cpu a little. maybe about .3 on the one plug that was running 3%...

every little bit helps.

Xenakios
02-11-2010, 01:57 PM
Just loading a blank project with like 4 knobs and *out1 = *in1; gives me about .4% cpu. Just as an baseline, reaEQ default uses 0.7% with 4bands! Am I missing something, is the only thing that adds to the cpu the processing loop? .4% kinda seems high to me.

~Rob.

Apart from the mentioned "are you building in debug mode?" issue, don't test the CPU usage of your plugins with just 1 instance of the plugin. Put 10 or more of them into the host project, so you will get more meaningful CPU usage figures. Hosts will have a noisy baseline CPU usage, so using more instances of your plugin gives more accurate CPU load readings.

I know you don't own one at the moment, but also in a multicore computer take into consideration how the host spreads the multithreaded audio processing, ie. in Reaper it is track-by-track, which means putting 10 plugins on 1 track will be heavier processing than having 10 tracks each with 1 instance of the plugin. (This similar scheme is most likely in use with other hosts too.)