Gentoo Archives: gentoo-user

From: james <garftd@×××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
Date: Mon, 30 Mar 2020 22:17:33
Message-Id: b528f124-6419-994a-d8ce-f3852091ee7c@verizon.net
In Reply to: Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading... by tuxic@posteo.de
1 On 3/28/20 9:24 AM, tuxic@××××××.de wrote:
2 > On 03/28 05:59, Mark Knecht wrote:
3 >> On Fri, Mar 27, 2020 at 10:58 PM <tuxic@××××××.de> wrote:
4 >>>
5 >>> On 03/27 11:51, Mark Knecht wrote:
6 >>>> On Fri, Mar 27, 2020 at 11:11 AM <tuxic@××××××.de> wrote:
7 >>>>>
8 >>>>> On 03/27 06:04, Andrea Conti wrote:
9 >>>>>> Hello,
10 >>>>>>
11 >>>>>>> Thread(s) per core: 1 <<<<<
12 >>>>>>> Does my CPU hyperthread?
13 >>>>>>
14 >>>>>> Definitely not.
15 >>>>>>
16 >>>>>> Your kernel config is fine, chances are hyperthreading (aka "SMT
17 >> mode")
18 >>>> is
19 >>>>>> disabled in your BIOS settings.
20 >>>>>>
21 >>>>>> andrea
22 >>>>>>
23 >>>>>
24 >>>>> Hi Andrea,
25 >>>>>
26 >>>>> I checked that: The BIOS setting was set to use hyperthreading.
27 >>>>>
28 >>>>> But "Number of cores" was set to six. I changed that to 12 and
29 >>>>> Voila! I got two threads per core.
30 >>>>>
31 >>>>> I think "Number of cores" is a little misleading, since there
32 >>>>> are six physical cores (not threads) with a RYZEN 5.
33 >>>>>
34 >>>>> I feeling not that comfortable with this solution.
35 >>>>>
36 >>>>> Is there any way to check for the validity of this setting
37 >>>>> beside a tool, which prints a "2" after the word "threads" ;) ?
38 >>>>>
39 >>>>> Cheers!
40 >>>>> Meino
41 >>>>>
42 >>>>>
43 >>>>
44 >>>> cat /proc/cpu should give info for each thread. I've been running an i7
45 >> 980
46 >>>> Extreme processor @3.33GHz here at home for about 12 years or so. It's 6
47 >>>> cores but shows 12 processors on both Gentoo and now Kubuntu.
48 >>>>
49 >>>> I generally run top and then hit '1' and 'z'. You can watch what
50 >> percentage
51 >>>> each core/thread is using.
52 >>>>
53 >>>> Time a BIG compile job twice, once with each kernel. If it's working
54 >> you'll
55 >>>> measure a significant difference in time. Note that it won't be 2x as
56 >>>> you'll also be limited by disk read/write throughput, but you'll know
57 >> it's
58 >>>> basically working.
59 >>>>
60 >>>> On Gentoo make sure you're compile settings in (I think make.conf - I no
61 >>>> longer run Gentoo much) are set to take advantage of all your cores and
62 >> not
63 >>>> limited to something smaller. Also watch overheating when using more
64 >>>> cores/threads. On older PCs like mine when you possibly have dust in CPU
65 >>>> coolers might not be as efficient as when they are new.
66 >>>>
67 >>>> HTH,
68 >>>> Mark
69 >>>
70 >>> Hi Mark,
71 >>>
72 >>> thank you for your explanations! :)
73 >>>
74 >>> /proc/cpu doesn't exist on my system....may be you are referring to
75 >>> /proc/cpuinfo?
76 >>>
77 >>> The problem was caused by a kernel misconfiguration by me.
78 >>>
79 >>> In the kernel setup there is a setting "Number of cores" which
80 >>> I had set to six ... since my CPU has 6 physical core.
81 >>>
82 >>> Setting this to twelve (and blurring the syntactically border between
83 >>> threads and cores thereby...) gives me twelves cores in top, htop
84 >>> and such and (as an example) compiling the kernel is faster -
85 >>> so it is not a display gimmick only.
86 >>>
87 >>> I think "Number of cores" is a misnomer...or am I wrong?
88 >>>
89 >>> Cheers!
90 >>> Meino
91 >>>
92 >>
93 >> Meino,
94 >> Yes, /proc/cpuinfo. Sorry.
95 >>
96 >> Well yes, I guess the 'Number of cores' is a misnomer if you're trying
97 >> to equate the language in the kernel against Intel/AMD marketing data for
98 >> physical cores. 6 physical cores with or without hyperthreading is still 6
99 >> physical cores. However 6 physical cores (my processor) _WITH_
100 >> hyperthreading enabled is 12 _LOGICAL_ cores which is more what I think the
101 >> kernel verbiage is about. Semantics I suppose.
102 >>
103 >> I'm glad you found it wasn't a gimmicky number. It really does work,
104 >> within the limits of the hardware being able to figure out what one thread
105 >> should be fetching or writing while the other thread is computing. It's not
106 >> a perfect 2:1 like 12 physical cores might be, but it's a lot less silicon
107 >> and therefore a lot less expensive.
108 >>
109 >> Cheers,
110 >> Mark
111 >
112 > Hi Mark,
113 >
114 > In the meanwhile I found "glance" and installed it, which is the
115 > bazooka-out-of-the-box-no-configuration terminal-brethren of "conky"
116 > :)
117 >
118 > Enough plugins enabled (which come with it preinstalled), you can
119 > watch in realtime, what each core/thread is doing right now...nearly. Big
120 > Brother for the sustem with no bad intention in mind. I am only
121 > curious :)
122 >
123 > And you get your sensors diplayed, the workload of your GPU (nvidia in
124 > my case), all processes and lot lot more.
125 >
126 > The faster the CPU gets (my previous PC was 12 years old...), the
127 > more the peripheral devices are becoming show stoppers ("stoppers"
128 > in the barest truth of its meaning).
129 >
130 > Unfortunatelu the SSD I ordered is in status "ready for delivery"
131 > since 23.03.2020....corona....you know...
132 >
133 > And with 12 cores enabled on a recent CPU and running for example a
134 > bigger update via emerge (enabled for 12 threads of course)
135 > ...all the cores are simply waiting a lot
136 > faster......for the harddisc :)
137 >
138 > Thanks for your help -- stay healthy!
139 >
140 > Cheers!
141 > Meino
142
143 Meino,
144
145 You might like the organization and details of
146
147 "sys-process/htop"
148
149 to look at cores and processes.
150
151
152 hth,
153 James

Replies