一次簡單網絡讀寫的性能測試,TPS 8W, vmstat監控到CS為12W,後來查閱資料這個CS
具體包括哪些内容。大部分網絡資料顯示CS包括:模式切換(軟中斷),上下文切換。
但後來一同志論證認為不正确,TPS8w ,每個TPS有一次讀寫,就會發生16w的上下文切換。
那CS應該隻包括: 上下文切換。
什麼情況下發觸發上下文切換:
<a href="http://www.cnblogs.com/zhiranok/archive/2012/08/13/context_switch_1.html" target="_blank">http://www.cnblogs.com/zhiranok/archive/2012/08/13/context_switch_1.html</a>
這篇文章明确mode switch與context switch不同,這裡的context其實為process context。
一個高CS的例子:
<a href="http://www.361way.com/linux-context-switch/5131.html." target="_blank">http://www.361way.com/linux-context-switch/5131.html.</a>
http://www.361way.com/rhel7-pcp/5149.html
本文轉自 anranran 51CTO部落格,原文連結:http://blog.51cto.com/guojuanjun/1951816