Good day! I have a fork-on-connect daemon. After profiling it with perf tool, I found out that function "do_lookup_x" consume lot's of CPU time. All the function calls for shared-libraries functions are after fork.
Is there any way to lookup all symbols before fork?
Setting the environment variable
LD_BIND_NOW
should help achieving just that.Set it with
export LD_BIND_NOW=1
then execute your program.
Excerpt:
The possible solutions:
Please see here for the full article and here for further info.