From owner-freebsd-current@freebsd.org Fri Dec 15 18:39:44 2017 Return-Path: Delivered-To: freebsd-current@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 49542E88F26 for ; Fri, 15 Dec 2017 18:39:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 D2328809E5; Fri, 15 Dec 2017 18:39:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBFIdS1n018253 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 15 Dec 2017 20:39:31 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBFIdS1n018253 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBFIdSen018252; Fri, 15 Dec 2017 20:39:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 15 Dec 2017 20:39:28 +0200 From: Konstantin Belousov To: Wolfram Schneider Cc: David Wolfskill , freebsd-current Subject: Re: /usr/obj is 11GB huge on FreeBSD 12-current Message-ID: <20171215183928.GO2272@kib.kiev.ua> References: <20171215120243.GB1179@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 18:39:44 -0000 On Fri, Dec 15, 2017 at 06:38:48PM +0100, Wolfram Schneider wrote: > On 15 December 2017 at 17:51, Wolfram Schneider wrote: > > On 15 December 2017 at 13:02, David Wolfskill wrote: > >> On Fri, Dec 15, 2017 at 10:12:09AM +0100, Wolfram Schneider wrote: > >>> Hi, > >>> > >>> I upgraded a machine from 11-stable to 12-current. The /usr/obj tree > >>> is now 11GB huge: > >>> > >>> FreeBSD 12-current > >>> $ du -hs /usr/obj > >>> 11G /usr/obj > >>> > >>> on FreeBSD 11-stable it was less the size: > >>> $ du -hs /usr/obj > >>> 5.6G /usr/obj > >>> > >>> this is a problem when you have a small VM with 20GB disk space or less. > >>> > >>> Is there a way to use less /usr/obj disk space during build? I know > >>> that we have to do some bootstrapping for newer compiler tools, but > >>> does we need to keep all temp files during the build? > >> > >> There was a change near the beginning of November; please see UPDATING > >> entry 20171101 -- you probably have several no-longer-used > >> subdirectories under /usr/obj/usr/src/. > >> > >> Once those are cleared out, my experience (tracking stable/11 & head in > >> different slices on the same machines) is that stbale/11 is using about > >> 5.0G, while head uses about 6.1G. > > > > I think the suspect directories are "tmp" and "obj-lib32", together > > they are 4.1GB huge. > > > > I will run a build of current again with a clean obj tree (-current on > > a recent -current). Let's see. > > I run a test on universe12b (FreeBSD 12.0-CURRENT #0 r325426: Sun Nov > 5) with an empty obj directory. > > `make buildworld' creates 9.7GB of obj data. After running `make > buildkernel' it will grow to 12GB. This is on a ZFS filesystem (my > original report was on UFS) Most likely reason of the bump is generation of debugging data, turned on for 12. Another not usable thing to disable are tests and profile libraries. Put the following into /etc/src.conf: WITHOUT_PROFILE=yes WITHOUT_DEBUG_FILES=yes WITHOUT_TESTS=yes