本文主要介紹cpu核數(shù)怎么算(cpu核數(shù)多有什么用),下面一起看看cpu核數(shù)怎么算(cpu核數(shù)多有什么用)相關(guān)資訊。
說到服務(wù)器的性能指標(biāo),我們經(jīng)常會(huì)提到cpu是雙核、四核、八核等。按照我們的理解,核心數(shù)越高性能越好,但是如何理解cpu的核心數(shù)呢?
1.cpu核數(shù)的概念通俗的說,單個(gè)cpu核就是一個(gè)人做同一件事,多核就是很多人同時(shí)做同一件事。
cpu:cpu是中央處理器,是一臺(tái)電腦中最重要最核心的東西。cpu的主要工作是處理和計(jì)算數(shù)據(jù),所以cpu的運(yùn)行速度、主頻、緩存和核心數(shù)量決定了cpu的質(zhì)量。
cpu的主頻越高,緩存越大,核心越多,cpu的運(yùn)行速度就越快,處理圖形圖像文件的速度就越快,價(jià)格也就越貴。
多核:cpu內(nèi)核總數(shù)=物理cpu數(shù)量*邏輯cpu總數(shù)=物理cpu數(shù)量*每個(gè)物理cpu的內(nèi)核數(shù)量*超線程數(shù)量。
接下來,我們來看看cpu的基本架構(gòu)。
多個(gè)物理cpu通過總線進(jìn)行通信,效率很低,如下所示:
多核cpu,不同核通過l2緩存通信,存儲(chǔ)和外設(shè)通過總線與cpu通信,如下:
多核超線程,每個(gè)核有兩個(gè)邏輯處理單元,兩個(gè)核共同共享一個(gè)核的資源,如下:
2.檢查linux系統(tǒng)中cpu的參數(shù)。下面以筆者的linuxi服務(wù)器為例輸出參數(shù),其中cpu為四核:
# view cpu information (model) [root @ aaa ~]# cat/proc/cpu info | grepname | cut-f2-d: | uniq-c4 intel xeon cpu e5-2403 v2 @ 1.80ghz# view the number of physical cpu [root @ aaa ~] # cat/proc/cpuinfo | grep' physical id' | sort | uniq | wc-l1 # view the number of cores (i.e. the number of cores) in each physical cpu [root @ aaa ~] # cat/proc/cpuinfo | grep' cpu core' | uniqcpu core: 4# check the number of logical central processors [root @ aaa ~] # cat/proc/cpu info | grep' processor' | wc -l4# check the indicators of central processors [root @ aaa ~] # lscpuararchtecture: x86 _ 64 cpu op-mode: 32 bits, 64-bit sequence: little endian cpu:4 online cpu list: 0-3 threads per core: 1 core per slot: 4 slots: 1numa node: 1 vendor id: genuineintelcpu series: 6 model: 62 step: 4cpu mhz: 1800.057bogomips: 3600. article label:
了解更多cpu核數(shù)怎么算(cpu核數(shù)多有什么用)相關(guān)內(nèi)容請關(guān)注本站點(diǎn)。