From owner-freebsd-ports@freebsd.org Sun Dec 20 21:05:56 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DBA24CC357; Sun, 20 Dec 2020 21:05:56 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CzZrg5wdmz3lGL; Sun, 20 Dec 2020 21:05:55 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: by mail-lf1-x135.google.com with SMTP id o13so18989971lfr.3; Sun, 20 Dec 2020 13:05:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:message-id:mime-version :content-transfer-encoding; bh=7jtowyKzRv+2aUMElDhknHKCU0u2/JeTMcQifkKUGH0=; b=qIIS15dHWkx5VA4fSWIKt4r4YtaBFH7Btd1pPVRDjAvBdGcOUjN4WGfu1eAwtheSrx SOX7sgbA3ar6qopd5pX21uSF8Sfe0O7Jqcti+7iJv8xZd01zIqiW1EMWec4/1m5G0hs3 U8rfJkb1eys6CPv9EorWc3uL8cyLBFR7ljn4q8/qJXb1lOBSS/whqnZ/zAKiDDGb73ZY LqlfMPyY/Nmy8ussGmRZl6AGkbEyoT4yKuHrmxRaxW9hw4fyse8Tc0/OcGRqCpg5dcwS H/DtPcTAh8CPr1e74+P9qVq0MQ2anJfT0+K/zlFL3NjDBPbO+AsBYzHtfkG472JNkooU hv1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:mime-version :content-transfer-encoding; bh=7jtowyKzRv+2aUMElDhknHKCU0u2/JeTMcQifkKUGH0=; b=ozLZpocGyH1J0FG6VMjdP1yuRmFcJcPzsi4ylxVb2++lavTQmYRJtwUcG9jn6PQBoz 0Q3ITdjJGqyBABe+Ylf9363bG4DviIpZU5DlGJWgxoMrGXG//udzo5uh/r/HYMUFBLSM sIGdPyby+cglnnm/O0fleuQtbFOvEkbRerncgt8ZuYMRvVd5tfJ6+cfe71oi44ybOrRA YRMVZYOLj0NHvQvfuXDbB61VX5uSooH22+YjgBgoXMzna1PaAsfI564E77tIJTR3kjCN VrKxD1H2106qUe0diBMLNYotWLN1pA0lFWv7M9WSa2xPVeuevRYbjwtHjZjn8mKHDy1L Nsrg== X-Gm-Message-State: AOAM530is3l9YUevPTPq1uZ6B7iI7b4N3I1sr7S6h/1nUt4nG8BEQL1f 7o601jb6KArC1/ZavlG0mJtfmJy2XpI= X-Google-Smtp-Source: ABdhPJzgu7hKkJB6gm97H2HpxoFbd0KUla7WBzLx0nxf4xc4ThzBHBUZUXEZ8XtD4whDh348YDIl1Q== X-Received: by 2002:ac2:598c:: with SMTP id w12mr4918278lfn.526.1608498352900; Sun, 20 Dec 2020 13:05:52 -0800 (PST) Received: from rimwks.local ([2001:470:1f15:3d8:7285:c2ff:fe37:5722]) by smtp.gmail.com with ESMTPSA id m16sm1772023lfb.248.2020.12.20.13.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Dec 2020 13:05:52 -0800 (PST) From: Rozhuk Ivan X-Google-Original-From: Rozhuk Ivan Date: Mon, 21 Dec 2020 00:05:50 +0300 To: freebsd-ports@freebsd.org, Rozhuk Ivan , freebsd-hackers@freebsd.org Subject: ccache: zero cache hit ratio on port update Message-ID: <20201221000550.1dbe4d70@rimwks.local> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; amd64-portbld-freebsd12.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CzZrg5wdmz3lGL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=qIIS15dH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rozhukim@gmail.com designates 2a00:1450:4864:20::135 as permitted sender) smtp.mailfrom=rozhukim@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[freebsd.org,gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::135:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::135:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::135:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-ports,freebsd-hackers] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Dec 2020 21:05:56 -0000 Hi! I spent some time to digg into this. This is my 2-3 attempt to fix it. [1] Current we have normal cache hit ratio on port rebuild and zero on version/hashtag/any_thing_that_change_port_src_dir_name. Zero cache hit ratio even if only readme.md changed in project, that causes hashtag->dir name change. Most annoying effect of this - build time for heavy projects is very different: chorome: build ~4 hours, rebuild 15 minutes. (Ryzen 2700x) I do not expext that 4h->15m, but even 2h - is good motivation for me. I know two ways to fix it: 1. Change port system to use static names Example: Now: /tmp/ports/usr/ports/net/ssdpd/work/ssdpd-784c7a726c26561bb65345b71b4e1726b69f58c7/ Fixed: /tmp/ports/usr/ports/net/ssdpd/work/ssdpd Fixed: /tmp/ports/usr/ports/net/ssdpd/work/src (Can some one explain: why port system add version/hashtag/random to dir name?) (Is it strongly required?) 2. Do something with ccache + out of source build: https://github.com/ccache/ccache/issues/751 [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246245