Date: Sun, 19 Dec 2021 14:48:29 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 254040] AMD 5950X hyperthreading strange performance swings Message-ID: <bug-254040-227-6xXarbaAyB@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-254040-227@https.bugs.freebsd.org/bugzilla/> References: <bug-254040-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254040 Stefan E=C3=9Fer <se@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |se@FreeBSD.org --- Comment #2 from Stefan E=C3=9Fer <se@FreeBSD.org> --- Interesting result, which I could reproduce. But I'd be very surprised if this was connected to bug 256594. I have performed a few tests on -CURRENT, with different numbers of process= es running in parallel: $ t () {=20 for i in $(jot ${1:-1}); do dd if=3D/dev/zero bs=3D1M count=3D1000 | bzip2 - | wc > /dev/null & done 2>&1 | grep transferred; wait } $ t 4 1048576000 bytes transferred in 5.601800 secs (187185555 bytes/sec) 1048576000 bytes transferred in 5.649712 secs (185598117 bytes/sec) 1048576000 bytes transferred in 5.695707 secs (184099356 bytes/sec) 1048576000 bytes transferred in 9.145955 secs (114649153 bytes/sec) $ t 4 1048576000 bytes transferred in 5.615530 secs (186727884 bytes/sec) 1048576000 bytes transferred in 6.000599 secs (174745209 bytes/sec) 1048576000 bytes transferred in 8.281161 secs (126621862 bytes/sec) 1048576000 bytes transferred in 8.982560 secs (116734646 bytes/sec) $ t 4 1048576000 bytes transferred in 5.597056 secs (187344204 bytes/sec) 1048576000 bytes transferred in 8.940248 secs (117287131 bytes/sec) 1048576000 bytes transferred in 8.962013 secs (117002282 bytes/sec) 1048576000 bytes transferred in 8.975112 secs (116831521 bytes/sec) There are only two typical throughput value ranges: 175 to 188 MB/s and 115= to 125 MB/s (in powers of 10, not 2). This is roughly a factor of 3/2 ... $ t 16 1048576000 bytes transferred in 7.537053 secs (139122806 bytes/sec) 1048576000 bytes transferred in 7.643938 secs (137177468 bytes/sec) 1048576000 bytes transferred in 7.658221 secs (136921619 bytes/sec) 1048576000 bytes transferred in 7.676633 secs (136593217 bytes/sec) 1048576000 bytes transferred in 7.684927 secs (136445807 bytes/sec) 1048576000 bytes transferred in 7.692365 secs (136313868 bytes/sec) 1048576000 bytes transferred in 7.785566 secs (134682056 bytes/sec) 1048576000 bytes transferred in 7.869853 secs (133239594 bytes/sec) 1048576000 bytes transferred in 7.887814 secs (132936190 bytes/sec) 1048576000 bytes transferred in 7.902913 secs (132682214 bytes/sec) 1048576000 bytes transferred in 7.901557 secs (132704990 bytes/sec) 1048576000 bytes transferred in 7.918014 secs (132429169 bytes/sec) 1048576000 bytes transferred in 7.964384 secs (131658150 bytes/sec) 1048576000 bytes transferred in 7.973078 secs (131514575 bytes/sec) 1048576000 bytes transferred in 7.992037 secs (131202601 bytes/sec) 1048576000 bytes transferred in 8.074766 secs (129858370 bytes/sec) Now all results are between 130 and 140 MB/s. And this outcome is stable ov= er multiple runs. $ t 32 1048576000 bytes transferred in 11.279196 secs (92965495 bytes/sec) 1048576000 bytes transferred in 11.343222 secs (92440755 bytes/sec) 1048576000 bytes transferred in 11.345478 secs (92422376 bytes/sec) 1048576000 bytes transferred in 11.422671 secs (91797797 bytes/sec) 1048576000 bytes transferred in 11.522082 secs (91005777 bytes/sec) 1048576000 bytes transferred in 11.757213 secs (89185763 bytes/sec) 1048576000 bytes transferred in 11.796787 secs (88886578 bytes/sec) 1048576000 bytes transferred in 11.787529 secs (88956389 bytes/sec) 1048576000 bytes transferred in 11.830471 secs (88633499 bytes/sec) 1048576000 bytes transferred in 11.866944 secs (88361080 bytes/sec) 1048576000 bytes transferred in 11.901904 secs (88101537 bytes/sec) 1048576000 bytes transferred in 11.956605 secs (87698475 bytes/sec) 1048576000 bytes transferred in 11.952918 secs (87725524 bytes/sec) 1048576000 bytes transferred in 11.955508 secs (87706519 bytes/sec) 1048576000 bytes transferred in 11.961946 secs (87659316 bytes/sec) 1048576000 bytes transferred in 11.992837 secs (87433521 bytes/sec) 1048576000 bytes transferred in 12.017736 secs (87252376 bytes/sec) 1048576000 bytes transferred in 12.023212 secs (87212632 bytes/sec) 1048576000 bytes transferred in 12.014854 secs (87273302 bytes/sec) 1048576000 bytes transferred in 12.054915 secs (86983277 bytes/sec) 1048576000 bytes transferred in 12.149618 secs (86305266 bytes/sec) 1048576000 bytes transferred in 12.179530 secs (86093302 bytes/sec) 1048576000 bytes transferred in 12.260039 secs (85527952 bytes/sec) 1048576000 bytes transferred in 12.261602 secs (85517046 bytes/sec) 1048576000 bytes transferred in 12.260685 secs (85523445 bytes/sec) 1048576000 bytes transferred in 12.386748 secs (84653048 bytes/sec) 1048576000 bytes transferred in 12.415505 secs (84456972 bytes/sec) 1048576000 bytes transferred in 12.487385 secs (83970822 bytes/sec) 1048576000 bytes transferred in 12.527210 secs (83703871 bytes/sec) 1048576000 bytes transferred in 12.602776 secs (83201986 bytes/sec) 1048576000 bytes transferred in 12.618314 secs (83099532 bytes/sec) 1048576000 bytes transferred in 12.725476 secs (82399749 bytes/sec) Again similar results on multiple runs, always between 80 and 93 MB/s. The big variations exist if not all cores are busy, and this might be due to non-optimal scheduling performed by SCHED_ULE. It would be very interesting= to repeat this test with SCHED_4BSD, instead. Funny detail: my CPU is reported to have an upper CPU clock of 4000 MHz, not 3400 MHz (no overclocking, but I had powerd running before, it has been sto= pped for these measurements). And I'm quite sure that I had once seen C2 statistics in the sysctl output, which are missing, now: $ sysctl dev.cpu.0=20=20=20=20=20 dev.cpu.0.temperature: 48,6C dev.cpu.0.cx_method: C1/hlt dev.cpu.0.cx_usage_counters: 175874 dev.cpu.0.cx_usage: 100.00% last 6552us dev.cpu.0.cx_lowest: C8 dev.cpu.0.cx_supported: C1/1/0 dev.cpu.0.freq_levels: 4000/3740 2800/2800 2200/1980 dev.cpu.0.freq: 4000 dev.cpu.0.%parent: acpi0 dev.cpu.0.%pnpinfo: _HID=3DACPI0007 _UID=3D0 _CID=3Dnone dev.cpu.0.%location: handle=3D\_SB_.PLTF.C000 dev.cpu.0.%driver: cpu dev.cpu.0.%desc: ACPI CPU Maybe I need to check the energy efficiency settings in the BIOS, but I tho= ught I had enabled all of them again, after the last BIOS update ... --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254040-227-6xXarbaAyB>