[linux-audio-dev] Performance problems caused by dlopen()

Anders Torger torger at ludd.luth.se
Sat Oct 5 03:15:01 UTC 2002


I have some wierd performance problems in my convolution software. The 
programs does this:

1. read configuration file
2. load some modules with dlopen() and run some init code in them
3. fork a convolution process which starts convolving as fast as it can.
4. provide I/O through shared memory to the convolution process

Although I have disabled the use of the dlopen()'d modules (for 
debugging this problem), running the init code in the beginning causes 
the convolution loop to take 109ms instead of 62ms.

Even if I close all dlopen()'d modules after fork in the convolution 
process, it still runs at 109ms. However, if I replace the init code in 
the modules (which just initialises some data structures and read some 
configuration) with just a return statement, or load only two modules 
instead of three, the filter loop starts running at 62ms again.

Of course it is hard to debug with only this scarce information, 
however, if anyone know about general performance problems caused by 
loading dynamic stuff into the software with dlopen(), and how they 
should be avoided, I'd be glad to know.

Oh, I use a 2.4.17 kernel, low-latency patched.

/Anders Torger



More information about the Linux-audio-dev mailing list