From owner-freebsd-current@freebsd.org Tue Aug 21 06:03:34 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D277108A321 for ; Tue, 21 Aug 2018 06:03:34 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-20.consmr.mail.ne1.yahoo.com (sonic303-20.consmr.mail.ne1.yahoo.com [66.163.188.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7864748E7 for ; Tue, 21 Aug 2018 06:03:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: JC6pI7AVM1lGaj7z61zS48TL5TBdqsh1MWx7Kp56KTwvY4KdmoMeM9Bh2bV1Vpt tHT8.CDRFOGlMH4K9P_0wHsc.skvrgHAEOwX21r5tn.iP_8_puo6zsWJEiS7j9pD6ScgwfLjF4i5 5zo3Mjrv95IoWxOJG1No6hc3ZlquIMt.Up5upW_4vaVcZ86HIS9Bh3ua4AMNm26th9SxfZ2TFoge TrVA2vANdSggxtv4DCRHICY4FqMduENVyXQIBXPdVWHAPJFJlAIEofPRMWnyA.WHD9c0H10emup4 QjvrvPnVl3EJUcMbC1SP4i4uMvlaSHbD9p8gpy6H8vSpgWscWEwX5KkSb7YtVRU2ICOUuA2TIZIE ZdVmHuIvO9_pAlNqowmv9rIGj6VA02sRvdA3Jl_NVZcukeljMSPnTxkzCujeaGe2tWdAI_MspK1a 1ohWxqyAbq4KUc6.7ufZnqPZXDHFHfpEqPSavP583leOn5mz7kcWi6WT1Kc2V0kS4jlTEQyp8fDs j0OHhkFtrV9GQeKi1.odAo0EKxEPVOoaPsj7YTZLe0kUFucXTftr2TyFcT.9SMs6JP9DUdDkK2XQ Kqt.DgMiOYU7l7cBIqoqCV0u70SmiNpynqrdET6PyvdHa2u3IKVDZ6F59qCP_nSODHiSLkHJV3Fh 4E88WX2ggbmWGKyhBowYjGAh2Oi91g6JfOb7W1eYuX7KOuCavDczAITlAi47qRwlVIKbmsm9U.tf Ot7F5HrFkvHrGPpri3mMbgADw9PTCxx.wXp.KrkFsTRICw3EuO9RrCx.fUtnA0drbtt4uC.eM_Kh AzBxIMcjynxx0kRRXj26F7YX9e5D86RMCfk94x._oyQJ8tQ5x4wE6EzqEKj16JgGcoJmJPqmTprh kjpOWOn4mlCfhJcoJZVXkMKPAZ80Yhy6qYdCsQf5dhkU4zp2yDvi.KTG.AOd5pMWYD4bpu0Lhyqg 1GGpjm6Nw_oeThyWpD8AqqxitsiXok0svwXEOn0Os9No91hFooCTf3rLW4WiU4WEjDEMWWxJBsxS 4D7RyrlA- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Tue, 21 Aug 2018 06:03:27 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp414.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e9dd84fa656d3a8d0f51a260363547b7; Tue, 21 Aug 2018 06:03:25 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: building LLVM threads gets killed Message-Id: Date: Mon, 20 Aug 2018 23:03:24 -0700 To: gurenchan@gmail.com, FreeBSD Current X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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: Tue, 21 Aug 2018 06:03:34 -0000 When I discovered that you were building debug versions of devel/llvm60 that also meant that my Pine64+ 2GB specifics do not make a useful comparison (do not show how small an environment can be for a build). Last I tried such a debug build was on a powerpc64 with 16 MiBytes RAM and it took having a swap space of 10 MiBytes (9 insufficient) but it was devel/llvm40 and the machine was not in use for anything else significant and was using UFS, unlike your more involved context (ZFS, large applications running). For your usage, it is not clear to me that 32 GiBytes is all that much RAM, nor that 32GiByte RAM + 2 GiByte swap is all that big of a total. To me it seemed odd that your swap was so small for what you described as running in your environment vs. the amount of RAM. If it turns out handy, the stress test (scaled to 32 GiBytes) should show how your context handles low free RAM over extended periods. (Without the complications or delays of a build being involved.) (The Mark Johnston patches expose more than just any "was killed" notice.) My expectation is that the stress test would over time show OOM kills even if you expanded the swap space so that it clearly had notable space not in use at the time. It may be that setting vm.pageout_oom_seq large enough would help your builds complete by tolerating low free RAM for a longer time. Something I only just learned was that by default lld is multi-threaded. I've been told that this mode of operation uses more RAM but I've no knowledge of my own about the tradeoffs. They might be bigger for debug builds than for non-debug builds. Doing a quick experiment showed lld using 5 threads or so unless I used -Wl,--no-threads . (I was using the cc/c++ command interface.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)