From nobody Sat Mar 25 15:47:42 2023 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 4PkNtm2hCzz41M17 for ; Sat, 25 Mar 2023 15:54:40 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.org (uucp.dinoex.org [IPv6:2a0b:f840::12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "uucp.dinoex.sub.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PkNtk5368z49p6 for ; Sat, 25 Mar 2023 15:54:38 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of pmc@citylink.dinoex.sub.org designates 2a0b:f840::12 as permitted sender) smtp.mailfrom=pmc@citylink.dinoex.sub.org; dmarc=none Received: from uucp.dinoex.org (uucp.dinoex.org [IPv6:2a0b:f840:0:0:0:0:0:12]) by uucp.dinoex.org (8.17.1/8.17.1) with ESMTPS id 32PFs6ej053110 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sat, 25 Mar 2023 16:54:07 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: Received: (from uucp@localhost) by uucp.dinoex.org (8.17.1/8.17.1/Submit) with UUCP id 32PFs65f053109 for freebsd-hackers@freebsd.org; Sat, 25 Mar 2023 16:54:06 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from disp.intra.daemon.contact (disp-e.intra.daemon.contact [IPv6:fd00:0:0:0:0:0:0:112]) by admn.intra.daemon.contact (8.17.1/8.17.1) with ESMTPS id 32PFncAu079184 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK) for ; Sat, 25 Mar 2023 16:49:38 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from disp.intra.daemon.contact (localhost [127.0.0.1]) by disp.intra.daemon.contact (8.17.1/8.17.1) with ESMTPS id 32PFlgk4004538 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sat, 25 Mar 2023 16:47:44 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: (from pmc@localhost) by disp.intra.daemon.contact (8.17.1/8.17.1/Submit) id 32PFlgdE004537 for freebsd-hackers@freebsd.org; Sat, 25 Mar 2023 16:47:42 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) X-Authentication-Warning: disp.intra.daemon.contact: pmc set sender to pmc@citylink.dinoex.sub.org using -f Date: Sat, 25 Mar 2023 16:47:42 +0100 From: Peter To: freebsd-hackers@freebsd.org Subject: Re: Periodic rant about SCHED_ULE Message-ID: 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-Disposition: inline X-Milter: Spamilter (Reciever: uucp.dinoex.org; Sender-ip: 0:0:2a0b:f840::; Sender-helo: uucp.dinoex.org;) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (uucp.dinoex.org [IPv6:2a0b:f840:0:0:0:0:0:12]); Sat, 25 Mar 2023 16:54:09 +0100 (CET) X-Spamd-Result: default: False [-2.27 / 15.00]; FAKE_REPLY(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.969]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; BLOCKLISTDE_FAIL(0.00)[2a0b:f840::12:server fail]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[sub.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_XAW(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; ARC_NA(0.00)[]; ASN(0.00)[asn:205376, ipnet:2a0b:f840::/32, country:DE]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4PkNtk5368z49p6 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N Quoting George Mitchell : >> https://forums.freebsd.org/threads/what-is-sysctl-kern-sched-preempt_thresh.85 >> >Thank you! -- George You're welcome. Can I get a success/failure report? --------------------------------------------------------------------- >> On 3/22/23, Steve Kargl wrote: >>> >>> I reported the issue with ULE some 15 to 20 years ago. Can I get the PR number, please? --------------------------------------------------------------------- Test usecase: ============= Create two compute tasks competing for the same -otherwise unused- core, one without, one with syscalls: # cpuset -l 13 sh -c "while true; do :; done" & # tar cvf - / | cpuset -l 13 gzip -9 > /dev/null Within a few seconds the two task are balanced, running at nearly the same PRI and using each 50% of the core: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5166 root 1 88 0 13M 3264K RUN 13 9:23 51.65% sh 10675 root 1 87 0 13M 3740K CPU13 13 1:30 48.57% gzip This changes when the tar reaches /usr/include with it's many small files. Now smaller blocks are delivered to gzip, it does more syscalls, and things get ugly: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5166 root 1 94 0 13M 3264K RUN 13 18:07 95.10% sh 19028 root 1 81 0 13M 3740K CPU13 13 1:23 4.87% gzip This does not happen because tar would be slow in moving data to gzip: tar reads from SSD, or more likely from ARC, and this is always faster than gzip-9. The imbalance is made by the scheduler.