From owner-freebsd-embedded@FreeBSD.ORG Thu Jun 19 15:44:07 2014 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 066539EC for ; Thu, 19 Jun 2014 15:44:07 +0000 (UTC) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [IPv6:2a00:1450:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 988C52D77 for ; Thu, 19 Jun 2014 15:44:06 +0000 (UTC) Received: by mail-we0-f176.google.com with SMTP id u56so2493781wes.7 for ; Thu, 19 Jun 2014 08:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/l8LV1sJ191TZlJ/3hTaK7BcbxlxenFMgmfoUpoNK+g=; b=PbNFOrhONc0r/vmheq2gXkt0FytSl4tyUD9a0oKDgIvuOLCENLq0hCEryORoYVRI4o 6nm9+jnusd8FJItqUWGLO+E0bVvnrEpPAA2WRyCXKtDTMwrOVkg6/csnApkjr0FHz0Tc Pb2//Ebie5hT2Sv2oabM0PEvddCGvTMUbC0Rus91pmsAF240vXSV2PU8S3fnzrJfNVM+ AuwmO+hkzXjFzgm2mvep6MvCOaC752C9TqS8fh8ckOM2Q2kDiPzXgPsfgo3AblE1mBlJ wRzfNinUn/0rpnTgQboSBzug7OaQstzLvnMETVX296RkEt9l+LVGF24diLcVNyJ3Ctvp TotA== MIME-Version: 1.0 X-Received: by 10.194.91.144 with SMTP id ce16mr5788803wjb.18.1403192644858; Thu, 19 Jun 2014 08:44:04 -0700 (PDT) Received: by 10.216.23.1 with HTTP; Thu, 19 Jun 2014 08:44:04 -0700 (PDT) Date: Thu, 19 Jun 2014 17:44:04 +0200 Message-ID: Subject: Strange slowdown of zlib. From: Magnus Nilsson To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 15:44:07 -0000 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