Strange slowdown of zlib.
Magnus Nilsson
magnus.nilsson at gmail.com
Thu Jun 19 15:44:07 UTC 2014
I have the strangest behaviour of zlib on FreeBSD 8.2 (ARM, but I don't
think it's necessarily an ARM specific issue).
Doing
# md5 /lib/libz.so.5
or
# cp /lib/libz.so.5 /tmp/
# export LD_LIBRARY_PATH=/tmp/
slows down applications (I've tested bsdtar and gzip) using zlib to a crawl
on my system.
In the later case, doing
# unset LD_LIBRARY_PATH
reverts the issue.
However, I haven't found any way to recover from the first case, apart from
rebooting - then the execution time is back to normal.
Here is a log of what I describe above (first moving zlib, then doing the
md5):
# cp some2MBfile /tmp/
# time gzip /tmp/some2MBfile
real 0m0.325s
user 0m0.284s
sys 0m0.037s
# rm /tmp/some2MBfile.gz
# cp /lib/libz.so.5 /tmp/
# export LD_LIBRARY_PATH=/tmp/
# cp some2MBfile /tmp/
# time gzip /tmp/some2MBfile
real 0m11.949s
user 0m11.635s
sys 0m0.035s
# rm /tmp/some2MBfile.gz
# unset LD_LIBRARY_PATH
# cp some2MBfile /tmp/
# time gzip /tmp/some2MBfile
real 0m0.325s
user 0m0.288s
sys 0m0.035s
# rm /tmp/some2MBfile.gz
# md5 /lib/libz.so.5
# cp some2MBfile /tmp/
# time gzip /tmp/some2MBfile
real 0m11.919s
user 0m11.608s
sys 0m0.031s
# rm /tmp/some2MBfile.gz
Do you have any idea what could be going on?
Any clues are welcome.
Kind regards/Magnus
More information about the freebsd-embedded
mailing list