From owner-freebsd-questions@FreeBSD.ORG Sat Jan 12 15:52:31 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E7B60A66 for ; Sat, 12 Jan 2013 15:52:31 +0000 (UTC) (envelope-from fbsd8@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id B5684DDD for ; Sat, 12 Jan 2013 15:52:31 +0000 (UTC) Received: from [10.0.10.3] ([173.88.197.103]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 12 Jan 2013 07:52:26 -0800 Message-ID: <50F186BA.3020504@a1poweruser.com> Date: Sat, 12 Jan 2013 10:52:26 -0500 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: FreeBSD questions Subject: pax command and sparse files Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Jan 2013 15:52:26.0805 (UTC) FILETIME=[D1DDAE50:01CDF0DC] X-Sender: fbsd8@a1poweruser.com X-Authenticated-Sender: fbsd8@a1poweruser.com X-EchoSenderHash: [fbsd8]-[a1poweruser*com] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2013 15:52:32 -0000 I have a sparse file allocated to 1G ls -lh test.img shows 1.0G du -h test.img shows 5.9M This is what I was expecting. Now after pax on that single test.img file ls -lh test.img.tar.gz shows 1.4M du -h test.img.tar.gz shows 1.4M This is what I was expecting. Here is the problem: Running pax on a native directory tree takes 2 seconds to archive it. I put that same directory tree into a sparse file and now pax takes 35 seconds to archive it. The resulting archive file is good and restores correctlly. Why does pax take so long to archive a sparse file?