Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3483131ybt; Tue, 23 Jun 2020 03:31:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnAPRv08Vh7Mdo48gcC9WfzBvU3IxpRY+X+JvBgWLLpYaRw0or9hB8XJ3NDhRoqPOVTRcz X-Received: by 2002:a17:906:ae56:: with SMTP id lf22mr2931649ejb.59.1592908269328; Tue, 23 Jun 2020 03:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592908269; cv=none; d=google.com; s=arc-20160816; b=iybHquvT7HDu4AyzDfYTps8e4F4L+hwBVffbv7I+QAgUpZMUfu40DYMPDMRVPtla8H NG/A970oLVF3BTepgySU264l1b3a63ao8CIOWnxhti8TpVifJE+kzQrQv3gFz61VAl7Y AzgJSx2BOn0v7g0HclgsXSgqsqHjuWbcd8+xq4I6+zV/2t6FYp4tLoVMmVxitS9vls2w oNj5rCtP9RLfYOiX+b4RWtn6Bcu610gLIFmTylESVz2VgAWo0Cx4VmIryHxbu27DiZdB L9vm87LYtcZLowtbYg3PChiOuNbQyr3T1A5TXtJkBGeePASjuztj6BohKI0rmoVFd21p CmIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject:cc :to:autocrypt:from; bh=4EGYwQCN4eX/yRYzHcOo9hyBHOn78wGEJU69+Nhr8ro=; b=swMZ+vKudbHQzKayAog57jKHTnoCI7y0QunaiQXBQZ2waUMrFdqhGYgfhBXLMveK69 ozSmvdqaEzsJWBBGPnBnqFC5qc3S+gLm1hVIYJ+r06MUfjOavbOxNfSiExIOeqAhlLQ1 psGdaN8nHr+DLXugF5PKFTOHsmvAk0i3e8ckHfe3vYL5Q2/5ne7ACKAMWzcd0Buxr3mQ CgKQ3Mxnn7j+gkaq7wN79jS6ZoNawLgYmzsiyJ/ZR35iHjHKTLt2FOohPeL7v0djDJXS GRTeE0W23BVQFPn3i/pJbWNDRhqdqUWfdYAcBwdsZL6XqnL+I3rmPdDBxSz39Odw6w0p 0aKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc8si5697259ejb.150.2020.06.23.03.30.45; Tue, 23 Jun 2020 03:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732196AbgFWK0S (ORCPT + 99 others); Tue, 23 Jun 2020 06:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732145AbgFWK0S (ORCPT ); Tue, 23 Jun 2020 06:26:18 -0400 X-Greylist: delayed 1897 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 23 Jun 2020 03:26:17 PDT Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8234::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA045C061573 for ; Tue, 23 Jun 2020 03:26:17 -0700 (PDT) Received: from ip4d142d01.dynamic.kabel-deutschland.de ([77.20.45.1] helo=[192.168.66.101]); authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1jnfdW-0005yl-2o; Tue, 23 Jun 2020 11:54:38 +0200 From: Thorsten Leemhuis Autocrypt: addr=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KFjs0L5BZ/JtpOh9vw3pc/SHBxHn0nubtBoyANfG2R Le0dpPAjGfOL6cljnIYMFytgzVwDs6uM8FfFuE4mIhYiFV30o9fObwqbhO49LoKdABEBAAGJ AiUEGAEKAA8FAlJ4AQ0CGwwFCQ0oaIAACgkQcrbm70xYPS2OxxAAr8OqW+bEjQV2PLLAHIh6 fmhajXtSn9bzULofgyD4PsgMsG25di74GbegGyTIwt7cS7Z5ZR5KL7ZkN1GTDFGlWyiZ+6NC VsWR62+eujnYvtHsQPaTo8A/uFV+Too4v4ikS4ZD0ondWa1FimLouem9QwOSnyn4yErxUQcU yUXHLhUtYs7MO5R4G++Ev+9eK7rRqPeUOqTjQV6Eigi5Ny4536fKMJDNp+YhlRopWBA0fVjf tF0MJTV0ShFK1YWLOADJYo9NG+KOeyUqesOvRSxtpQcdcrwPFjkJ3JcknxZstvWid4goqMY7 l/vGoG7zQDSxUDpXcG9X70yHrmVK/w0dn/PHalfUnOsQpvQYTjGhZ4UnXAVaBsouYLGFo9AL lLNERHY4eRR4MEYvk6ABZ1AEaJwiwyZuPRt/iN1EIMM7fnQQcdBYHGJzaV8a3jwHeLAPY1e/ hS1OsrR9pqGvqQsagYkiZFOCjZxx0IQhokMSIxbFvNfLHTqXXpJzlCv9QGj3s2ZG6o36u42k yc+mP1ya8uxIFEwcp6C1h4TTisVFC2DXxDi7pqUd9oTuI4Hg19/i07cdYUHDiraDXSXW5zH9 5ZDV+rSqDU3ercoRd2qjGUOIXWOytHTeJhVOWqM0vOmXDUwwYHuEb0HFn3d/tz+idSrXUSXZ 5iv6NKaV29GWHbY= To: Linux Kernel Mailing List Cc: lwn@lwn.net Subject: kcbench, the Linux kernel compile benchmark, version 0.9.0 is out Message-ID: <5b2e2f50-a222-81e9-4383-c503d9a8fbe4@leemhuis.info> Date: Tue, 23 Jun 2020 11:54:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1592907977;f2886b3a; X-HE-SMSGID: 1jnfdW-0005yl-2o Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TWIMC: I released version 0.9.0 of kcbench, a simple Linux kernel compile benchmark. It basically downloads a Linux version (which one depends on the compiler used), extracts it, creates a configuration ('defconfig' by default), before it compiles a kernel ('vmlinux') in a temporary directory ('O=/tmp/foo/') while measuring the time it takes to build. It compiles a few kernels that way using different number of jobs (make -j #). After each run kcbench prints the time it took and how many kernels the machine can build per hour at this rate. This is how it looks: > [cttest@localhost ~]$ kcbench > Processor: Intel(R) Core(TM) i5-3350P CPU @ 3.10GHz [4 CPUs] > Cpufreq; Memory: powersave [intel_pstate]; 7895 MiB > Linux running: 5.6.2-125.vanilla.knurd.1.fc31.x86_64 [x86_64] > Compiler: gcc (GCC) 9.3.1 20200317 (Red Hat 9.3.1-1) > Linux compiled: 4.19.0 [/home/thl/.cache/kcbench/linux-4.19/] > Config; Environment: defconfig; CCACHE_DISABLE="1" > Build command: make vmlinux > Filling caches: This might take a while... Done > Run 1 (-j 4): 288.16 seconds / 12.49 kernels/hour [P:384%] > Run 2 (-j 4): 288.19 seconds / 12.49 kernels/hour [P:384%] > Run 3 (-j 6): 291.01 seconds / 12.37 kernels/hour [P:384%] > Run 4 (-j 6): 291.28 seconds / 12.36 kernels/hour [P:385%] You can use the benchmark to compare different machines, just make sure they use a similar compiler. Kcbench can be useful for stress tests, too. It's also a good tool to find the optimal number of jobs for compiling source code, as 'just use all cores' sometimes is not the fastest setting, as a quick test on an AMD Ryzen Threadripper 3990X (64 cores/128 threads) recently showed: > [cttest@localhost ~]$ kcbench -s 5.3 -n 1 -m > Processor: AMD Ryzen Threadripper 3990X 64-Core Processor [128 CPUs] > Cpufreq; Memory: Unknown; 63736 MByte RAM > Linux running: 5.6.0-0.rc2.git0.1.vanilla.knurd.2.fc31.x86_64 > Compiler used: gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1) > Linux compiled: 5.3.0 [/home/cttest/.cache/kcbench/linux-5.3/] > Config; Environment: defconfig; CCACHE_DISABLE="1" > Build command: make vmlinux > Run 1 (-j 128): 260.43 seconds / 13.82 kernels/hour > Run 2 (-j 136): 262.67 seconds / 13.71 kernels/hour > Run 3 (-j 64): 215.54 seconds / 16.70 kernels/hour > Run 4 (-j 72): 215.97 seconds / 16.67 kernels/hour (this is a quote from the man-page, which has a few more results) For more general information about kcbench see: * its project page: https://gitlab.com/knurd42/kcbench/ * its README: https://gitlab.com/knurd42/kcbench/-/blob/master/README.md * the man-page for kcbench, which tries to compile one Linux kernel really fast by using many jobs: https://gitlab.com/knurd42/kcbench/-/raw/master/kcbench.man1.md * the man-page for kcbenchrate (which is new with 0.9.0 [thx arnd for the suggestion]), which by default compiles one kernel on each CPU using one job to measure the rate and keep the all cores busy all the time: https://gitlab.com/knurd42/kcbench/-/raw/master/kcbenchrate.man1.md * the release page for kcbench 0.9.0, which list all its major improvements: https://gitlab.com/knurd42/kcbench/-/releases/v0.9.0 To quickly outline the potential briefly, here is what a 'kcbench --help' will show: > Usage: kcbench [options] > > Compile a Linux kernel and measure the time it takes. > > Available options: > -b, --bypass -- bypass cache fill run and measure immediately > -d, --detailedresults -- print more detailed results > -i, --iterations -- number or iterations per job > -j, --jobs (*) -- number of jobs to use ('make -j #') > -m, --modconfig -- build using 'allmodconfig vmlinux modules' > -o, --outputdir -- compile in /kcbench/ ('make O=#') > -q, --quiet -- quiet > -s, --src (|) -- take Linux sources from ; if not found > try ~/.cache/kcbench/linux-/ and > /usr/share/kcdata/linux-/; if still > not found download automatically. > -v, --verbose (*) -- increase verboselevel > > --add-make-args -- pass to make call ('make vmlinux') > --cc -- use specified target compiler ('CC=#') > --cross-compile -- cross compile for > --crosscomp-scheme -- naming scheme for cross compiler > --hostcc -- use specified host compiler ('HOSTCC=#') > --infinite -- run endlessly > --llvm -- sets 'LLVM=1' to use clang and LLVM tools > --no-download -- never download anything automatically > --savefailedlogs -- save log from failed compilations in > > -h, --help -- show this text > -V, --version -- output program version > > (*) -- option can be passed multiple times Ciao, Thorsten P.S.: kcbench is written in Bash, as it started quite small and grew a lot over time. Maybe at this point bash might not be the best choice, but OTOH it's something that runs nearly everywhere; it also understood by a lot of people, which makes it easy to adjust to specific needs.