Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading... james <garftd@×××××××.net>