This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to optimize a server in codec engine

Other Parts Discussed in Thread: SYSBIOS

No profile in package.bld because i used whole_programe or whole_program_debug there is a warning message during compiling as BIOS Release Notes write.  

 

all_syslink.cfg :

var BIOS = xdc.useModule('ti.sysbios.BIOS');

BIOS.libType = BIOS.LibType_NonInstrumented;

 

# time ./app_remote.xv5T

real    0m 3.95s

user    0m 0.27s

sys     0m 0.21s

 

all_syslink.cfg :

var BIOS = xdc.useModule('ti.sysbios.BIOS');

BIOS.libType = BIOS.LibType_Custom;

 

# time ./app_remote.xv5T

real    0m 4.76s

user    0m 0.21s

sys     0m 0.33s

The result is conflict with BIOS User Guide said that the Custom BIOS.libTyp is the best Run-Time Performance.

 

Also, I print the customCCopts

print("customCCopts=", BIOS.customCCOpts);

customCCopts= -mv6740 --abi=eabi -q -mi10 -mo -pdr -pden -pds=238 -pds=880 -pds1110 --program_level_compile -o3 -g --optimize_with_debug

why I have "--optimeze_with_debug" option  in customCCopts ? 

 

BIOS User Guide customCCopts: --abi=eabi -q -mi10 -mo -pdr -pden -pds=238 -pds=880 -pds1110 --program_level_compile -g --embed_inline_assembly

there is no "-o3" and "--optimize_with_debug" in customCCopts but have "--emded_inline_assembly" option ?

 

Has other aspect to effect server performance except build profile(e.g. stack or heap )?

 

  • If you use the custom library, the BIOS libraries will get rebuilt using options from your .cfg file.   The non-inst library has no Assert or Log statements.   If you use Custom and want best peformance, you should disable the Assert and Log calls.    Depending on which modules and options you are using, you should get same or slightly better performance.

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.assertsEnabled = false;
    BIOS.logsEnabled = false;

    I'll see if someone else can answer your customCCOpts questions ...

    -Karl-

  • The user's guide section you quote is showing how to create an un-optimized, fully debuggable custom SYS/BIOS library. (The 'embed_inline_assembly' option is not required and does not provide any benefit. I'll update the user's guide.)

    By default, the BIOS.customCCOpts are configured internally to provide the best performance. This is what you're seeing when you print your BIOS.customCCOpts.

    The -o3 option tells the compiler to perform very aggressive performance optimizations.

    The -g and -optimize_with_debug options together tell the compiler to provide as much debug information as possible without compromising performance.

    Alan

     

  • But why the performance I used  BIOS.LibType_NonInstrumented is better than BIOS.LibType_Custom? Also, whole_program or whole_program_debug option is better then BIOS.libType?

  • The NonInstrumented libraries have Logs and Asserts disabled.

    Disabling Logs and Asserts significantly improves performance.

    Did you add the config script commands that Karl suggested?

    var BIOS = xdc.useModule('ti.sysbios.BIOS');

    BIOS.libType = BIOS.LibType_Custom;
    BIOS.assertsEnabled = false;
    BIOS.logsEnabled = false;

     

    Alan

  • I disabled Logs and Assert, replace g729 interface  with isphenc_copy for testing,

    Custom : 1.39s

    NonInstru:1.37s    

  • This is unexpected.

    Can you send me the zipped up 'package' subdirectory of your project?

    I need to look at the makefiles used to create the custom SYS/BIOS and IPC libraries to help understand the performance degradation.

    Alan

  • 6165.server.tar.gz

    This is my server zipped package. 

    By the way, it seems like to set the L1D cache, L1P cache, L2 cache will effect server performance?

  • The server application is NOT being built with BIOS.libType = BIOS.LibType_Custom.

    It appears to be built using the fully instrumented library (BIOS.LibType_Instrumented).

    I didn't find the .cfg file that goes along with the server application.

    Can you please add the following line to it:

     

        BIOS.libType = BIOS.LibType_Custom;

     

    And then rebuild and re-run your tests?

    Alan

  • Sorry!  I don't want to change vim script configuration and change file suffix to .js.

    But the data I tested before is correct. I have recovered the file suffix to default.

    8875.server.tar.gz

  • I don't understand what you mean.

    The zipped package you provided before shows that the server application was built using the fully instrumented SYS/BIOS libraries,

    The zip file you most recently posted shows the BIOS.libType selection code to be completely commented out of your "all_syslink.cfg" file:

    var BIOS = xdc.useModule("ti.sysbios.BIOS");

    /*BIOS.libType = BIOS.LibType_Custom;
    //BIOS.libType = BIOS.LibType_NonInstrumented;
    BIOS.logsEnabled = false;
    BIOS.assertsEnabled = false;*/

    This will result in your server application linking with the fully instrumented (and slower) SYS/BIOS  library.

     

    Alan

     

  • hi,

    Yeah, you can uncomment this and comment whole_program to use it.when I test the time for running I have changed it to commented or uncomented,

    so this is not a problem. I'm sorry to that I 'm not descripte clearly how I test the data. But now, I opened DSP cache MAR regesiter and set L2 cache size to 256K.

     

    input data: 34S  pcm speech  

    codec: TI g729

    time: 0.97s

    The problem have been solved, thanks all people for helping me.