??????????谢?????????????
???????????? ???????[ 2014/6/18 14:20:07 ] ?????????????????? ???????
?????????????????薪?????锟�?
Single Thread:
[???407ms] counter = 100000001?? stopped
[???453ms] counter = 100000001?? stopped
[???412ms] counter = 100000001?? stopped
Two Thread Switch:
[???161503ms] counter = 100000001?? stopped
[???164508ms] counter = 100000001?? stopped
[???164201ms] counter = 100000001?? stopped
Multi Threads - 100 Threads:
[???3659ms] counter = 100000001?? stopped
[???3950ms] counter = 100000001?? stopped
[???3720ms] counter = 100000001?? stopped
Multi Threads - 2 Threads:
[???3078ms] counter = 100000001?? stopped
[???3160ms] counter = 100000001?? stopped
[???3106ms] counter = 100000001?? stopped
|
??????????????????谢?
???????????谢????????????慰?: http://www.linfo.org/context_switch.html?????????????????????卸?????????????????????????CPU??????????CPU????????????????????????芯???些?????????????校??????????????????????????????????????CPU??????????????????????????????????????????????????????????????????????????????????????婕�????????喂?????????????谢????????????????????????????CPU????斜???????????????????????????????????????????(Note. ?????????? ???????谢???????????????????????????????????. ??????????: CPU????????????????? ??????????????????校? TLB?????????????? CPU ??pipeline??????; ???????????????cache???霉???????? ??????????????????????????????????????小).
???????????????????谢?????澹�???????????????瑁�
?????????TwoThreadSwitchTester???????????????????????谢???????????????????????????谢?????????????????????????????????????谢???
????“Multi Threads - 100 Threads”??“Multi Threads - 2 Threads”??????????????????????谢???????????????????????????
????????Windows???????Linux?渭?vmstat?????????????????????Process Explorer??????????械??????????????谢????????
????Single Thread:
??????????????????谢???580-548=32?巍???548????????????????????
????Two Thread Switch:
??????????????????谢???33673295-124=33673171?巍???124????????????????????
????Multi Threads - 100 Threads:
??????????????????谢???846-329=517?巍???329????????????????????
????Multi Threads - 2 Threads:
??????????????????谢???295-201=94?巍???201????????????????????
?????????????????????????????????卸?????????
?????????????CPU???????????
????????????????????????????????????????????????????????????????????????????????????CPU?????????????????
???????????????????????????????????????????????
???????????????????????????????????????????????????????卸?????????????Hash?????key??????value??Redis??Node.js??????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????http://pan.baidu.com/s/1ntNUPWP
??????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11