You are not logged in.

#1 2011-05-14 13:00:30

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Questions concerning Intel Core i3 2310M (number of cores, threads)

Dear Community,

for the past 8 years I’ve been happily using my AMD Athlon XP 3000+ Desktop PC. But times have changed and with it, I recently bought a new computer: I switched to a Thinkpad x220i laptop. One week of configuration and now it works like a charm (with kernel26-pf, openbox, tmux, luakit, it’s so neat!).

But in the meantime, cpus have changed a lot, but I was neither interested nor affected, which is why today, I’m feeling like an absolute newcomer not knowing how many cpus my computer has or how to corectly set makeflags in makepkg.conf. This is the aim of this thread. Just to clarify these things.

On the Intel homepage, I read that the Intel Core i3-2310M @ 2,1 GHz has

# of Cores    2
# of Threads    4
Clock Speed    2.1 GHz

but cat /proc/cpuinfo (with the ondemand governor working) says

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz
stepping        : 7
cpu MHz         : 800.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 4187.07
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

and this output is repeated another three times for cpu1, cpu2 and cpu3.

cpufreq-info output is here: http://cxg.de/_a759b8.htm

So what does this mean now?

a) Before having the laptop in my hands I thought “well, it has two cores, i.e. 2x2.10GHz of computing power and that’s it

b) But after seeing the cpuinfo output and the ondemand governor’s behavior of being able to scale e.g. cpu2 as high as 2.10GHz while the other three stay at 800MHz, I have the feeling of 4 cpus in my laptop each possibly working with up to 2.10GHz.

Basically, I don’t know what the “threads” are about. Any hints on further reading into the topic (though it should not be too detailed…)? May a thread be considered a cpu?

Which notion comes nearer to the truth? And what do I set makeflags in makepkg.conf to? I think I read in the wiki to set it “just one higher than the number of cpus I have”, which is why I currently have “-j3” in makepkg.conf. Or should it rather be “-j5”?

Any illumination on these two questions would be received thankfully!

Best,

Jakob

Last edited by jakob (2011-05-14 13:08:55)

Offline

#2 2011-05-14 13:13:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Questions concerning Intel Core i3 2310M (number of cores, threads)

2 are physical "real" cores and the other 2 are virtual "hyper threaded" cores.  If you're using the standard Arch kernel, use j5 in /etc/makepkg.conf but if you're using ck's kernel with the bfs, set it to 4.  The cpufreq gov can throttle each individual core independently.  If you compile something like a kernel, watch it and you'll see all 4 go up to the max. freq.

Enjoy!

Last edited by graysky (2011-05-14 13:15:28)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2011-05-14 13:15:43

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: Questions concerning Intel Core i3 2310M (number of cores, threads)

graysky wrote:

2 are physical "real" cores and the other 2 are virtual "hyper threaded" cores.  If you're using the standard Arch kernel, use j5 in /etc/makepkg.conf but if you're using ck's kernel with the bfs, set it to 4.

Enjoy!

Wow that was a fast one! Thank for the BFS specific hint, I really appreciate that! But does “hyper threaded cores” mean they’re able to produce actual 4.2 GHz (I learned from a friend that it’s not so much about the heigh of GHz anymore today, but the difference seems important for me, also to understand)

Thanks for your fast reply!

Offline

#4 2011-05-14 13:15:52

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Questions concerning Intel Core i3 2310M (number of cores, threads)

Each thread allows a separate job to be executed by the system, the OS can show this as if they were cpu's. So 2 cpu's with 2 threads will show up as 4 cpu's, since 4 jobs can be run simultaneously.

In your scenario, -j3 should be okay to use (i think), since even though separate threads can be run, when compiling you will max out your (physical) processor capacity anyway (someone please correct me here if needed).

edit: too slow..

Last edited by litemotiv (2011-05-14 13:16:48)


ᶘ ᵒᴥᵒᶅ

Offline

#5 2011-05-16 17:36:29

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: Questions concerning Intel Core i3 2310M (number of cores, threads)

Ok. so if i get this right I have 2x2.10GHz of real processing power here, but each of those may virtually be split into two virtual threads and these threads are even able to be governed as if processing with 2.10GHz themselves, though that is not actually possible?

Sorry for my confusion but this is exactly what I didnt get yet. Are there 4.20GHz now or 8.40?

thanks!

Jakob

Offline

#6 2011-05-16 17:40:35

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Questions concerning Intel Core i3 2310M (number of cores, threads)

jakob wrote:

Ok. so if i get this right I have 2x2.10GHz of real processing power here, but each of those may virtually be split into two virtual threads and these threads are even able to be governed as if processing with 2.10GHz themselves, though that is not actually possible?

That's it! smile


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB