From nobody Thu Jul 08 07:19:07 2021 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3B88E1225C1A for ; Thu, 8 Jul 2021 07:19:15 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 4GL72W0xvKz3PX4 for ; Thu, 8 Jul 2021 07:19:14 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: by mail-lf1-x12d.google.com with SMTP id 8so556538lfp.9 for ; Thu, 08 Jul 2021 00:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=svxLhvZ+EgOOnXXFK3w6ZrsrriMdPHYutUgTAKb8bS4=; b=AE9MlaAn/JoS+ric/fQ9cFX9YjPdRlZJ1kd9uOyuk/hjB8ymS+zppqEAaXyM8rahxh K83KCtIUHEc488kqzF0ZoimaDq7U94Y7vW3hLiXq18iDzwNv1LQa3h8wWEKIiU2wkDqL VFLkbJzEjQulvVY+eItMXNtze61/UWWf60+hNNJtvsnykHqTUcbxyNXljuPXXhN/gGVq YvydJ9cawbav0PFBVt2siVdGqYRyHSgAppwMMLZY2XVVIbS4KDlh56ODLmzphS6iMq9f k/MCti9A3Bqnb8knyQYRCE0AnJ0b3gWuy4WGUh1LcBeEb+neJeEj9u8/mph3/eLHduFj F2yQ== 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:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=svxLhvZ+EgOOnXXFK3w6ZrsrriMdPHYutUgTAKb8bS4=; b=BgB0d/qVn56o3luu2oo2xWEyA8P+W2lKxXv0KnnaOp0KYQtQxnGSF4mwcv4Lm9CayN WTweCFF0FP+4PsEzyWXwiM4m8UwkfxEOPl+NPxJTkIaEhchRNM+e9oapuZdVs6UylBpU XkTAz0aiCTQHDgUL65Mn2jrCDPFRbOmlGdh610VB1xzdds16w7STRUarH5xhCjt0eZpa 45rZDhAOZPmi1n1VLMjeJJhP8WCT4LYqbbpZ7xA0KThBgUeZcnYXUD7mKk16BPPE3NTl K4EWfkvMdbiGj9ePFxik1bV55en6K0yz3q56V5sXl7GN90+9JmUwjn3hER4dbJV5Z9Kl w/aw== X-Gm-Message-State: AOAM5321Uen0blS/qSmZdQdoNy29gMzVLqi4VmoWFNw2FVNzNh15qsBw /stZVZASSJZGfTr5TrW/Fu0DXwH+mr4= X-Google-Smtp-Source: ABdhPJzlJRSkRL+i6jzwG+H7+0+UU73bn0yGtclqrl1ccHpy1PKSLiZ8StAmz8S9OzvFXrhWdxCKZg== X-Received: by 2002:a05:651c:1ac:: with SMTP id c12mr8487994ljn.179.1625728753725; Thu, 08 Jul 2021 00:19:13 -0700 (PDT) Received: from rimwks.local ([2001:470:1f15:3d8:7285:c2ff:fe37:5722]) by smtp.gmail.com with ESMTPSA id y6sm153646lje.21.2021.07.08.00.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 00:19:13 -0700 (PDT) From: Rozhuk Ivan X-Google-Original-From: Rozhuk Ivan Date: Thu, 8 Jul 2021 10:19:07 +0300 To: George Mitchell Cc: FreeBSD Hackers Subject: Re: Periodic rant about SCHED_ULE Message-ID: <20210708101907.0be3a3c2@rimwks.local> In-Reply-To: <13445948-7804-20b4-4ae6-aaac14d11e87@m5p.com> References: <13445948-7804-20b4-4ae6-aaac14d11e87@m5p.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4GL72W0xvKz3PX4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[freebsd]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 7 Jul 2021 13:47:47 -0400 George Mitchell wrote: > CPU: AMD Ryzen 5 2600X Six-Core Processor (3600.10-MHz K8-class CPU) > (12 threads). > > FreeBSD 12.2-RELEASE-p7 r369865 GENERIC amd64 (SCHED_ULE) vs > FreeBSD 12.2-RELEASE-p7 r369865 M5P amd64 (SCHED_4BSD). > > Comparing "make buildworld" time with misc/dnetc running vs not > running. (misc/dnetc is your basic 100% compute-bound task, running > at nice 20.) > > Three out of the four combinations build in roughly four hours, but > SCHED_ULE with dnetc running takes close to twelve! (And that was > overnight with basically nothing else running.) This is an even > worse disparity than I have seen in previous releases. I do not use dnetc, but shed_ule on 2700 compile wold faster than 4 hours. With ccache it takes ~10 minutes: world+kernel build and install and update loaders. # Make an SMP-capable kernel by default options SMP #b Symmetric MultiProcessor Kernel options NUMA #o Non-Uniform Memory Architecture support options EARLY_AP_STARTUP #o device cpufreq #m for non-ACPI CPU frequency control device cpuctl #m Provides access to MSRs, CPUID info and microcode update feature. # Kernel base options SCHED_ULE #b 4BSD/ULE scheduler options _KPOSIX_PRIORITY_SCHEDULING #b POSIX P1003_1B real-time extensions options PREEMPTION #b Enable kernel thread preemption and sysctl tunings on desktop only: # SCHEDULER kern.sched.steal_thresh=1 # Minimum load on remote CPU before we'll steal // workaround for freezes kern.sched.balance=0 # Enables the long-term load balancer kern.sched.balance_interval=1000 # Average period in stathz ticks to run the long-term balancer kern.sched.affinity=10000 # Number of hz ticks to keep thread affinity for