Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!

We are using FreeBSD 8.2 on an embedeed system and facing one serious problem when accesing shared libraries.


When executing a binary on FreeBSD the execution performance is normal. If an other binary(or the same) is accessing the same library later then the performance is going down and it takes 32 times longer as normal for execution of that binary.

Example:

[xyz@abc:/home/tech]$ time bsdtar -c -z -f blaj.tar /root/fil5
bsdtar: Removing leading '/' from member names

real 0m1.580s
user 0m1.259s
sys 0m0.094s

[xyz@abc:/home/tech]$ md5 /lib/* |tail
MD5 (/lib/libncurses.so.8) = 4c3a4e81c6809c036fb7890ec8ca5da6
MD5 (/lib/libncursesw.so.8) = f3d25d899f2824d1ae25587c8b4627ac
MD5 (/lib/libpcap.so.7) = 2e01c2516512c79098dd8141dca5b692
MD5 (/lib/libreadline.so.8) = aacf63c65af272d50e24fd4419832ca7
MD5 (/lib/libsbuf.so.5) = 822bca7648230400ab31c52bca9b5d57
MD5 (/lib/libssp.so.0) = e3b84bdab817677c111aa2eda18b5585
MD5 (/lib/libthr.so.3) = e9c612ba80c93dc691a42a1e0a45b3b6
MD5 (/lib/libufs.so.5) = adbbec21f31590d67e653f2b4d611441
MD5 (/lib/libutil.so.8) = 402925e0b90f5720b1afd63be763c3c8
MD5 (/lib/libz.so.5) = d9451d770482bec21475a466d6ecba97


[xyz@abc:/home/tech]$ time bsdtar -c -z -f blaj.tar /root/fil5
bsdtar: Removing leading '/' from member names

real 0m43.726s
user 0m43.533s
sys 0m0.083s

[xyz@abc:/home/tech]$ time bsdtar -c -z -f blaj.tar /root/fil5
bsdtar: Removing leading '/' from member names

real 0m43.766s
user 0m43.564s
sys 0m0.091s
[xyz@abc:/home/tech]$


It seems that this is happening with all executable that link dynamically.

Any idea what could cause that performance problem? Maybe something with the filesystem is wrong? The same binaries compiled for a Linux system are working without any problems?!

regards

AR
Posted
Updated 15-Jun-14 19:59pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900