What is Hyper-Threading

Hyper Threading์— ๋Œ€ํ•˜์—ฌ ์•Œ์•„๋ด…์‹œ๋‹ค์•™~

Reference: Intel Docs

์ด ๊ธ€์—์„œ๋Š” single-threaded ๊ทธ๋ฆฌ๊ณ  multithreaded application์˜ ์ฐจ์ด์™€ Hyper-Thrading์ด ๋ฌด์—‡์ธ์ง€, ๊ทธ๋ฆฌ๊ณ  multithreading๊ณผ ์–ด๋–ค ์ ์ด ๋‹ค๋ฅธ์ง€ ์„ค๋ช…ํ•œ๋‹ค

What Is Multithreading?

  • Multithreading์ด๋ž€ ๋™์‹œ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ ๋ณ‘๋ ฌ ๋˜๋Š” ๋ถ„ํ•  ์ž‘์—…์˜ ํ•œ ํ˜•ํƒœ์ด๋‹ค

  • Thread program์€ single core์— ๋Œ€๋Ÿ‰์˜ workload๋ฅผ ์ œ๊ณตํ•˜๋Š” ๋Œ€์‹ , ์ž‘์—…์„ ์—ฌ๋Ÿฌ ๊ฐœ์˜ software thread๋กœ ๋ถ„ํ• ํ•œ๋‹ค

  • ์ด๋Ÿฌํ•œ Thread๋Š” ์‹œ๊ฐ„ ์ ˆ์•ฝ์„ ์œ„ํ•ด ์„œ๋กœ ๋‹ค๋ฅธ CPU core์— ์˜ํ•ด ๋ณ‘๋ ฌ ์ฒ˜๋ฆฌ๋œ๋‹ค

What Is Hyper-Threading?

  • Intel์ด ๋งŒ๋“  ๋™์‹œ multithreading ๊ธฐ์ˆ ๋กœ, ๋ฌผ๋ฆฌ์  ์‹คํ–‰ ์žฅ์น˜ ํ•œ ๊ฐœ์— ๊ฐ€์ƒ ์‹คํ–‰ ์žฅ์น˜ ๋‘ ๊ฐœ๋ฅผ ํ• ๋‹นํ•ด ์„ฑ๋Šฅ์„ ๋†’์ธ๋‹ค

  • Core ํ•œ ๊ฐœ๋‹น thread๊ฐ€ ๋‘ ๊ฐœ์”ฉ ์ถ”๊ฐ€๋˜๋ฏ€๋กœ, ์šด์˜์ฒด์ œ๋Š” physical core ์ˆ˜ * 2๋กœ core ์ˆ˜๋ฅผ ์ธ์‹ํ•œ๋‹ค

    • ์ฆ‰, ํ•˜๋‚˜์˜ physical core๊ฐ€ ๋‹ค๋ฅธ software thread๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ๋‘ ๊ฐœ์˜ logical core ์ฒ˜๋Ÿผ ์ž‘๋™ํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•œ๋‹ค

  • ๋‘ ๊ฐœ์˜ logical core๋Š” ๊ธฐ์กด์˜ single thread core ๋ณด๋‹ค ๋” ํšจ์œจ์ ์œผ๋กœ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค

    • Intel์˜ Hyper-Threading ๊ธฐ์ˆ ์€ core๊ฐ€ ์ด์ „์˜ ๋‹ค๋ฅธ ์ž‘์—…์ด ์™„๋ฃŒ๋˜๊ธฐ๋ฅผ ๊ธฐ๋‹ค๋ฆฌ๋Š” ์œ ํœด ์‹œ๊ฐ„์„ ์ด์šฉํ•˜์—ฌ CPU ์ฒ˜๋ฆฌ๋Ÿ‰์„ ๊ฐœ์„ ํ•œ๋‹ค

What Benefits Will I See from Hyper-Threading?

  • CPU Hyper-Threading์ด ์žˆ๋‹ค๋ฉด, PC๋Š” ๋” ์ ์€ ์‹œ๊ฐ„์— ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๊ณ , ๋” ๋งŽ์€ ๋ฐฐ๊ฒฝ ์ž‘์—…์„ ์ค‘๋‹จ ์—†์ด ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค

  • ์˜ฌ๋ฐ”๋ฅธ ํ™˜๊ฒฝ์—์„œ ์ด ๊ธฐ์ˆ ์€ CPU core๊ฐ€ ํ•œ ๋ฒˆ์— ๋‘ ๊ฐ€์ง€ ์ž‘์—…์„ ํšจ๊ณผ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค

See if Mac OS has enabled Hyper-Threading

sysctl ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด physical processor์™€ logical processor ์ˆ˜์˜ ์ฐจ์ด๋ฅผ ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๋‹ค

sysctl hw.physicalcpu hw.logicalcpu

๋‚˜๋Š” Intel Core i7 processor๊ฐ€ ํƒ‘์žฌ๋œ MacBook์„ ์‚ฌ์šฉ์ค‘์ด๋ผ์„œ, ์•„๋ž˜์™€ ๊ฐ™์ด Hyper-Threading์ด ํ™œ์„ฑํ™”๋œ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค

๋!

Last updated