From owner-freebsd-questions@freebsd.org Tue May 30 10:55:11 2017 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 DEC11B794F3 for ; Tue, 30 May 2017 10:55:11 +0000 (UTC) (envelope-from milios@ccsys.com) Received: from cargobay.net (cargobay.net [168.235.81.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE51380DF0 for ; Tue, 30 May 2017 10:55:11 +0000 (UTC) (envelope-from milios@ccsys.com) Received: from [192.168.1.47] (c-73-255-128-224.hsd1.fl.comcast.net [73.255.128.224]) by iron.ccsys.com (Postfix) with ESMTPSA id D07B4524; Tue, 30 May 2017 10:55:03 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Is it possible to use more than 1 CPUs during pkg create? From: "Chad J. Milios" In-Reply-To: <0101015c58b3dc58-1b936a1a-8412-472b-a257-c436a40e89f2-000000@us-west-2.amazonses.com> Date: Tue, 30 May 2017 06:55:02 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <0101015c58b3dc58-1b936a1a-8412-472b-a257-c436a40e89f2-000000@us-west-2.amazonses.com> To: Koichiro IWAO , freebsd-questions X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 10:55:12 -0000 > On May 30, 2017, at 5:33 AM, Koichiro IWAO wrote: >=20 > Hi, >=20 > is it possible to use more than 1 CPU cores during xz compression > done in pkg create? I know XZ Utils in base system can use more > than 1 CPUs if -T option given. I guess pkg internally calls APIs > of XZ Utils. I think it is potentially possible. >=20 > Or is it restricted to use only 1 CPU core for some reasons? >=20 >=20 > --=20 > `whois vmeta.jp | nkf -w` > meta Threading forfeits a bit of xz=E2=80=99s great compression ratio. An xz = file created with -T greater than 1 will necessarily be some amount = larger. Operating with just one thread achieves the maximal compression = ratio. (The multiple compression threads fail to share the dictionaries = they are currently building.) When you are transferring GBytes to yourself once, use -T0. When you are = compressing something one time that hundreds or thousands of people will = potentially download and/or store, use -T1 (the default).=