From owner-freebsd-current@freebsd.org Thu Mar 25 10:04:58 2021 Return-Path: Delivered-To: freebsd-current@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 CD3E05B71B4 for ; Thu, 25 Mar 2021 10:04:58 +0000 (UTC) (envelope-from agh@riseup.net) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (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 (4096 bits) client-digest SHA256) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F5gh93xCMz4qZn for ; Thu, 25 Mar 2021 10:04:57 +0000 (UTC) (envelope-from agh@riseup.net) Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4F5gh7121wzDqqW; Thu, 25 Mar 2021 03:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1616666695; bh=dloo2/qCblN+2QXsEcS+GYHVb00hjIsEaYGNBxLfXjg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bYrw9AiBWSpWkZv1GgAH3BQcBUuPbKhyEAGHecDTWY50Ukn12paIO3iAtzl1Nxm4N 8Z7x/EeUD5PVQfOryEXu4N7ueB43b0/3MS9WLAyxxCv6UgPrGstHwC54uYzWA/V12x sB4JwEuPDdNA/JQRAXW4VlxM4kwXVixhIQOUkYVU= X-Riseup-User-ID: 765D9576FAD78DBDEE41BD39087114E1270B2D161E37CA560EC590F63633A3D9 Received: from mail.riseup.net (localhost.riseup.net [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by fews1.riseup.net (Postfix) with ESMTPSA id 4F5gh663l9z5vdG; Thu, 25 Mar 2021 03:04:54 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 25 Mar 2021 03:04:54 -0700 From: Alastair Hogge To: myfreeweb Cc: freebsd-current@freebsd.org, Michael Gmelin , monochrome Subject: Re: freebsd 13 ryzen micro stutter In-Reply-To: References: <20210323101146.18c9a969@bsd64.grem.de> Message-ID: <677da81d7af9781be6b46c7cba4efd05@riseup.net> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4F5gh93xCMz4qZn X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=riseup.net header.s=squak header.b=bYrw9AiB; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (mx1.freebsd.org: domain of agh@riseup.net designates 198.252.153.129 as permitted sender) smtp.mailfrom=agh@riseup.net X-Spamd-Result: default: False [-3.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; RWL_MAILSPIKE_GOOD(0.00)[198.252.153.129:from]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[riseup.net:+]; DMARC_POLICY_ALLOW(-0.50)[riseup.net,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[198.252.153.129:from]; ASN(0.00)[asn:16652, ipnet:198.252.153.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[198.252.153.129:from]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[riseup.net:s=squak]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[198.252.153.129:from:127.0.2.255]; DWL_DNSWL_LOW(-1.00)[riseup.net:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2021 10:04:58 -0000 On 2021-03-23 17:34, myfreeweb wrote: > On March 23, 2021 9:11:46 AM UTC, Michael Gmelin wrote: >> >> >>On Mon, 22 Mar 2021 23:50:52 -0400 >>monochrome wrote: >> >>> After about 8 months of struggling to narrow this down I did another >>> search and saw this: >>> >>> https://www.reddit.com/r/freebsd/comments/lc8fwo/freebsd_13_vega_64_micro_stutter_in_x/ >>> >>> I haven't seen this come up here so I thought I would bring it up. >>> >>> My story started sometime before around August last year when synergy >>> started getting really annoying with stuttering. Pretty sure it >>> wasn't like that when I first started tracking 13-current in around >>> May 2020 (I was on 12 with scfb for a long time before that with no >>> issues), but since then I have tried to eliminate as many variables >>> as possible. First I switched to barrier instead of synergy. Shortly >>> after that I realized it was happening all the time and not just a >>> network problem, I started using foobillard to verify during tests. I >>> tried different RAM combinations, different network cards, a variety >>> of RAM timings, stripping rc.conf etc, powerd settings, also scfb, >>> with no effect. It is observable with ping -f, a dot or two appears >>> every time it glitches. It seemed much better with RC2, but now with >>> RC3 it seems to be back with a vengeance, and since its my main >>> workstation and barrier/synergy server host for several machines, it >>> is unbearable to use. Both Win10 and devuan3 on the same machine are >>> smooth with no issues. Any feedback or info would be appreciated. >>> >>> Hardware: >>> ASRock B450M Pro4 >>> Ryzen 2400G, no OC >>> 32M DDR4-2933 >>> Onboard Vega GPU, drm-fbsd13-kmod >>> _______________________________________________ >> >>Without knowing much about the issue at hand, just a few ideas: >> >>Sysctls I would look at: >>- raising *.cx_lowest >>- different kern.eventtimer.timer > > None of these should be an issue, but: > > sysctl kern.sched.steal_thresh=1 > > For some reason with the default value of 2, I'm seeing weird > stuttering in youtube videos, games, etc. on a 5950X system. 1 (or 0, > IIRC) works fine. I have noticed this too, firefox exhibits the issue frequently, however I have found it most noticeable in games/dhewm3[0] or Yamagi Quake 2[1]. There is a distinct pause every 3 or 4 seconds where the simulation advances significantly. Thanks for the kern.sched.steal_thresh pointer that has sorted the issue out for now. $ dmesg | egrep '(CPU:|avail memory)' CPU: AMD Ryzen 9 3950X 16-Core Processor (3500.02-MHz K8-class CPU) avail memory = 66779394048 (63685 MB) With an AMD NAVI 8GiB GPU, the host should be able to play either game well enuf, Quake 2 came out in 1997 and Doom 3 2004. I am sure Quake 2 used to play without issues on my old AMD bulldozer. 0: https://www.freshports.org/games/dhewm3/ 1: https://github.com/yquake2/yquake2