1. vcpu dedicated / share CPU ¸®¼Ò½º ÇÒ´ç¹æ½Ä (¡°hw:cpu_policy¡±:¡±dedicated¡±) https://docs.openstack.org/admin¡©guide/compute¡©cpu¡©topologies.html
1) dedicated - Thread / Core °¡ cpu_id ¸¦ °¡Áö°í ÇÒ´ç - Áï ÀνºÅϽº´Â Ç×»ó µ¿ÀÏÇÑ cpu_id ³»¿¡¼¸¸ »ç¿ë
# virsh vcpupin <domain> VCPU: CPU Affinity ¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡© 0: 2
Tasks: 177 total, 1 running, 176 sleeping, 0 stopped, 0 zombie %Cpu0 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu1 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu2 : 99.7 us, 0.3 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu3 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu4 : 0.0 us, 0.7 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu5 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu6 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu7 : 1.3 us, 0.7 sy, 0.0 ni, 98.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
2) share - Thread / Core °¡ share ÇüÅ·ΠÇÒ´ç - Áï, µ¿ÀÏ Àåºñ³»¿¡ ƯÁ¤ÀνºÅϽº¿¡¼ CPU ¸®¼Ò½ººÎÇÏ°¡ ¹ß»ýÇÒ °æ¿ì Àüü ½Ã½ºÅÛ¿¡ ¿µÇâ
# virsh vcpupin <domain> VCPU: CPU Affinity ¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡©¡© 0: 0¡©7
Tasks: 177 total, 1 running, 176 sleeping, 0 stopped, 0 zombie %Cpu0 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu1 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu2 : 99.7 us, 0.3 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu3 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu4 : 0.0 us, 0.7 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu5 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu6 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu7 : 1.3 us, 0.7 sy, 0.0 ni, 98.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
2. Å×½ºÆ® Àåºñ - 1 Socket 4Core 8Thread / 2 Socket 12Core 24Thread
CPU : Intel(R) Xeon(R) CPU E31230 CPU(s): 8 On¡©line CPU(s) list: 0¡©7 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 CPU : Intel(R) Xeon(R) CPU E5¡©2620 CPU(s): 24 On¡©line CPU(s) list: 0¡©23 Thread(s) per core: 2 Core(s) per socket: 6 Socket(s): 2
3. Å×½ºÆ® °³¿ä ¸ñÀû : vcpu(Thread) ÇÒ´ç½Ã Á¤¼ö¿¬»êºÎ·Î ÀÎÇÑ ¼º´ÉÀúÇÏ ÃÖ¼ÒÈ ¹æ¹ý
1) vcpu(thread) Áõ°¡¿¡ µû¸¥ ¼º´Éº¯È 2) µ¿ÀÏÄھ 2°³ÀÇ 1vcpu(thread) ÀνºÅϽº »ý¼º½Ã ¼º´Éº¯È 3) ´Ù¸¥Äھ 2°³ÀÇ 1vcpu(thread) ÀνºÅϽº »ý¼º½Ã ¼º´Éº¯È 4) µ¿ÀÏÄھ ÇÒ´çµÈ ÀνºÅϽº¿¡¼ ¼·Î ¿µÇâ¾øÀÌ »ç¿ë°¡´ÉÇÑ ¹æ¹ýÀº? ¡© cpu_thread_policy=isolate 5) ¦¼öÇÒ´ç½Ã Thread ºÐ¹è ¾Ë°í¸®Áò
4. Core / Thread È®ÀÎ CPU ±¸Á¶ Âü°í url http://idchowto.com/?p=1520 http://m.todayhumor.co.kr/view.php?table=bestofbest&no=168938
# cat /sys/devices/system/cpu/*/topology/thread_siblings_list |sort -u 0,12 1,13 10,22 11,23 2,14 3,15 4,16 5,17 6,18 7,19 8,20 9,21
# virsh capabilities |grep cpu <cpu> </cpu> <cpus num='12'> <cpu id='0' socket_id='0' core_id='0' siblings='0,12'/> <cpu id='1' socket_id='0' core_id='1' siblings='1,13'/> <cpu id='2' socket_id='0' core_id='2' siblings='2,14'/> <cpu id='3' socket_id='0' core_id='3' siblings='3,15'/> <cpu id='4' socket_id='0' core_id='4' siblings='4,16'/> <cpu id='5' socket_id='0' core_id='5' siblings='5,17'/> ....................... <cpu id='21' socket_id='1' core_id='3' siblings='9,21'/> <cpu id='22' socket_id='1' core_id='4' siblings='10,22'/> <cpu id='23' socket_id='1' core_id='5' siblings='11,23'/> </cpus>
5. ¼º´Éüũ (dedicated) - socket, core, thread - Benchmark Tool : sysbench # sysbench ¡©¡©num¡©threads=1 ¡©¡©test=cpu ¡©¡©cpu¡©max¡©prime=20000 ¡©¡©validate run
1) vcpu(thread) Áõ°¡¿¡ µû¸¥ ¼³´Éüũ 1vcpu - total time: 24.7478s 2vcpu - total time: 14.0255s
2) µ¿ÀÏÄھ vcpu(thread) ÀνºÅϽº ÇÒ´ç ¼º´Éüũ - VM1 : 24.7478s - VM2 : 31.2511s ¡Ø ÀϺΠ¿µÇâ
3) ´Ù¸¥Äھ vcpu(thread) ÀνºÅϽº ÇÒ´ç ¼º´Éüũ -VM1 : 24.8439s - VM2 : 25.0490s ¡Ø º¯È ¾øÀ½
vcpu(thread) ¿¡ µû¸¥ ¼º´Éº¯È´Â ÀÖÀ¸¸ç µ¿ÀÏ core ³» ÇÒ´çµÈ vcpu(thread) ÀνºÅϽº´Â ¼·Î °£¼·ÀÌ ¹ß»ýÇÑ´Ù .
6. ±â´Éüũ (dedicated) 1) cpu_thread_policy=isolate - Äھ vcpu¸¦ µ¶¸³ÀûÀ¸·Î »ç¿ëÇÏ°Ú´Ù´Â ÀǹÌÀ̳ª Ȧ¼öÇÒ´ç½Ã ³ª¸ÓÁö vcpu´Â ºñ¾îÀÖÀ½ - ¸®¼Ò½º ³¶ºñ
2) vcpu ¦¼öÇÒ´ç - ¾Ë°í¸®Áò ¹«Á¶°Ç µ¿ÀÏÄÚ¾î·Î thread ÇÒ´ç - socketÀ» ³Ñ¾î°¡´Â ¸®¼Ò½º ÇÒ´ç Áö¿øÇÏÁö ¾ÊÀ½
3) vcpu Ȧ¼öÇÒ´ç - Äھ ºñ¾îÀÖ´Â vcpu(thread)´Â 1vcpu ¸¸ ÇÒ´ç°¡´É - ÀϺΠÄÚ¾î´Â dedicated ³»¿¡¼µµ Share per Core
¡Ø ÀϺΠÄÚ¾î´Â ¼·Î ´Ù¸¥ ÀνºÅϽº°¡ »ý¼ºµÇ¾î ÀνºÅϽº°£¿¡ °£¼·ÀÌ ¹ß»ýÇÒ¼ö ÀÖ´Ù.
7. ¿ä¾à - ±âº» vcpu ÇÒ´çÀº 2 / 4 / 8 ¦¼öÇüÅ·ΠÇÒ´ç - 1vcpu(thread) »óÇ°Àº dedicated / Share per Core - Socket³» vcpu(thread) ÀÌ»óÀÇ °í½ºÆå »óÇ°Àº share ´Üµ¶À¸·Î ¿î¿µ
|