Why does select() consume so much CPU time in my program?

后端 未结 4 1303
南旧
南旧 2020-12-08 07:08

I have several Java applications that use MINA, and all of them use 20 MINA threads. One application serves around 10,000 concurrent connections, that are usually idle but r

4条回答
  •  不知归路
    2020-12-08 07:58

    One app is polling 10,000 connections, using very little CPU per connection, but all together it could add up to a good fraction of CPU time. All priority does is let some other job get in line first.

    The other app that has fewer connections but does more crunch per connection could also show the higher percent, but it should show a lower fraction of time waiting, and a higher fraction CPU-ing.

提交回复
热议问题