hieuhtr / Blog

Don’t be lazy. Don’t make excuses. No one cares. Work fucking harder.
Other
6 stars 2 forks source link

CPU Architecture fundamental #55

Open hieuhtr opened 7 years ago

hieuhtr commented 7 years ago

Terminology

screen shot 2017-07-10 at 8 54 55 pm

Example:

Intel® Core™ i7-5557U Processor on Macbook pro: 2 cores, 4 threads

sysctl -n hw.ncpu # = 4
sysctl -n hw.physicalcpu # = 2
sysctl -n hw.logicalcpu # = 4
screen shot 2017-07-10 at 9 19 49 pm

Reference:

Chapter 6: CPUs in http://www.brendangregg.com/sysperfbook.html