From nobody Wed Jul 07 18:18:35 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 D03F512228BE for ; Wed, 7 Jul 2021 18:18:41 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 4GKnjs54mZz4drl for ; Wed, 7 Jul 2021 18:18:41 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-ej1-x630.google.com with SMTP id c17so4707287ejk.13 for ; Wed, 07 Jul 2021 11:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=ahMVuPS//b9Di9wkPHsQ8UphefgFSTLxhSgP/SdEpNQ=; b=QEV74BZW9adqDhfShG1mfZcvbW+i/y8hdoKBEbWVSeH61FigvWitfTzNKKBiJf7k2M K5T4PvZYi1v+elKESDS4J1y+ARWKXGcCWQVsgx2PNBOoFL3mWnGnPKSb+5WI5RrzB+ra pzM/75CRKyOw4PGMt4I5PTvsJn4tO1czAOYmtTnM3bp55/v8FzjuvvlTpJ1vBeRZz0Si VRKo6Rntt1KqPSmw+oXkbU0AuPYmlmQYMYdoBlW6wZqvrYSrWwknS04Fn3kI/YVv1nBb 4RuvXjwhwTpGYcR8bJu/ki/fD/ERi0aQieXv8LprXQDqH9Hy3PAhxdF2s40jF7T4bvFz APvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=ahMVuPS//b9Di9wkPHsQ8UphefgFSTLxhSgP/SdEpNQ=; b=KBRJHv8QDZJL8fUpDoGSJ6USXRXj756YYQHArqPjWlwy+VqYVxjzgt3eDcIVOZriVH VDWnHkNa6OiHPhXIy/Tc5JnWuNaSqhaa6QXeQyjokClW2v1/7nkdLHZAULMl0xYgTMxv 04JOCDsc86EDguBuH+bl5vdFI+E5gudvzRYPaUlZRvZP0hXYJsO9+VqN5qFiGRF4XMwO MrKlsSRHZknNLcerMUQoMjQ1eJ9hWE8zgYKCzrcMh/YhvlmQ/32qG4YRLLXGAS9LcFQ7 6i7ymSJHzqYjdFjJzZnuQUX3Run2yo3js+XZ249Kf/iCPxVR7gMn0sPaBbzn+zjcVvhA ngjg== X-Gm-Message-State: AOAM5306P5oV+BASAwjku2yc+/Dh/ml0wf7KLmqaaWd9ghF1+vucT1Xe MLL01NOpHyNtN51sC1tj5H0= X-Google-Smtp-Source: ABdhPJx1w3mREflKGoCcr0ejuOVDNt+EildpPZQYQ73jRObpeSpb08BTCMmeBwfeDLmJyvJ2bDjSTw== X-Received: by 2002:a17:907:1c14:: with SMTP id nc20mr17424341ejc.140.1625681919567; Wed, 07 Jul 2021 11:18:39 -0700 (PDT) Received: from ernst.home (pd9e2360f.dip0.t-ipconnect.de. [217.226.54.15]) by smtp.gmail.com with ESMTPSA id k25sm7731409eds.77.2021.07.07.11.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 11:18:39 -0700 (PDT) Date: Wed, 7 Jul 2021 20:18:35 +0200 From: Gary Jennejohn To: George Mitchell Cc: FreeBSD Hackers Subject: Re: Periodic rant about SCHED_ULE Message-ID: <20210707181835.75601d54@ernst.home> In-Reply-To: <13445948-7804-20b4-4ae6-aaac14d11e87@m5p.com> References: <13445948-7804-20b4-4ae6-aaac14d11e87@m5p.com> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; amd64-portbld-freebsd14.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: 4GKnjs54mZz4drl 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)[] 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. > > Based on my total lack of an exact understanding of how loadable > kernel modules work, I nevertheless hypothesize that it should be > possible for the scheduler to be a loadable kernel module, given that > the interface to the schedule seems to have been carefully thought out > and scrupulously observed by both ULE and 4BSD. Perhaps the system > could start with a dummy scheduler that is just barely functional > enough to get the appropriate module loaded and have it supersede the > dummy scheduler? Then switching between the schedulers would become > much less of a hassle than it is currently. Why, if it is configurable, > it could even be compatible with freebsd-update! > > I've been ranting about this for years now, and I've had my say -- but > no one has ever answered my question about what workload SCHED_ULE is > best for, though numerous people have claimed that it's better than > SCHED_4BSD for -- some rumored workload or other. -- George > IIRC there was talk about making the scheduler loadable in the early days. But that was years ago and I may be misrembering. I have a Ryzen 5 1600 with 6 cores, so older tech and "only" 3200MHz. I can do a clean buildworld on FreeBSD-14 using only 10 of the 12 SMTs in about 40 minutes using SCHED_4BSD. While still browsing the interwebs or watching a film etc. with no noticeable lags in performance. So, for my normal desktop usage SCHED_4BSD is the only way to go. -- Gary Jennejohn