Date: Tue, 30 May 2017 06:55:02 -0400 From: "Chad J. Milios" <milios@ccsys.com> To: Koichiro IWAO <meta@vmeta.jp>, freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Is it possible to use more than 1 CPUs during pkg create? Message-ID: <D75F743F-D5F9-42EB-BE24-7A7A3C14B96E@ccsys.com> In-Reply-To: <0101015c58b3dc58-1b936a1a-8412-472b-a257-c436a40e89f2-000000@us-west-2.amazonses.com> References: <0101015c58b3dc58-1b936a1a-8412-472b-a257-c436a40e89f2-000000@us-west-2.amazonses.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On May 30, 2017, at 5:33 AM, Koichiro IWAO <meta@vmeta.jp> 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 <meta@vmeta.jp> 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).=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D75F743F-D5F9-42EB-BE24-7A7A3C14B96E>