From owner-freebsd-questions@freebsd.org Wed Sep 30 01:39:28 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84E94A0CAAC for ; Wed, 30 Sep 2015 01:39:28 +0000 (UTC) (envelope-from list@museum.rain.com) Received: from ns.umpquanet.com (ns.umpquanet.com [98.158.10.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69F831DC8 for ; Wed, 30 Sep 2015 01:39:27 +0000 (UTC) (envelope-from list@museum.rain.com) Received: from ns.umpquanet.com (localhost [127.0.0.1]) by ns.umpquanet.com (8.14.9/8.14.9) with ESMTP id t8U1dLxB080819 for ; Tue, 29 Sep 2015 18:39:21 -0700 (PDT) (envelope-from list@museum.rain.com) Received: (from james@localhost) by ns.umpquanet.com (8.14.9/8.14.9/Submit) id t8U1dLjT080818 for freebsd-questions@freebsd.org; Tue, 29 Sep 2015 18:39:21 -0700 (PDT) (envelope-from list@museum.rain.com) Date: Tue, 29 Sep 2015 18:39:21 -0700 From: Jim Long To: freebsd-questions@freebsd.org Subject: Is xzgrep broken? Message-ID: <20150930013921.GA80620@ns.umpquanet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 01:39:28 -0000 xzgrep seems to crap out very quickly when reading a large-ish file containing compressed ASCII SQL data (834014732 bytes compressed). # time xzgrep 9314517 /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz | wc 0 0 0 real 0m0.005s user 0m0.011s sys 0m0.001s xzcat appears to do better: # time xzcat /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz | grep 9314517 | wc 17 374475 17592746 real 4m0.654s user 3m45.401s sys 0m26.678s # xz -l /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz Strms Blocks Compressed Uncompressed Ratio Check Filename 1 1 795.4 MiB 8345.1 MiB 0.095 CRC64 /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz Jim