You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/11/25 10:29:56 UTC

[GitHub] [incubator-brpc] yushcs opened a new issue #1294: brpc调用openmp时cpu消耗不受控制

yushcs opened a new issue #1294:
URL: https://github.com/apache/incubator-brpc/issues/1294


   在brpc服务中调用openmp进行矩阵运算,在设置了环境变量`OMP_NUM_THREADS和OMP_DYNAMIC="FALSE"`后,cpu消耗依旧不受控制。
   例:`OMP_NUM_THREADS=4 OMP_DYNAMIC="FALSE"`;单个client请求的情况下,cpu消耗达到在600%-1000%之间波动;多个client并发的情况下,cpu消耗更加不可控。
   已验证使用pthread对上述openmp的计算模块进行多线程调用时cpu消耗正常;已验证在brpc服务中去除openmp的相关模块后正常。
   请问上述情况和bthread有没有关系?或者有什么排查方向吗?非常感谢!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yushcs commented on issue #1294: brpc调用openmp时cpu消耗不受控制

Posted by GitBox <gi...@apache.org>.
yushcs commented on issue #1294:
URL: https://github.com/apache/incubator-brpc/issues/1294#issuecomment-733649814


   cpu消耗是在bvar的process_cpu_usage里看的,bthread_work_usage是0.95左右(单client请求的情况下)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit commented on issue #1294: brpc调用openmp时cpu消耗不受控制

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1294:
URL: https://github.com/apache/incubator-brpc/issues/1294#issuecomment-733641046


   可能是有锁block bthread worker。你说的cpu消耗的值具体是哪里看的?top看的,还是bvar里面的cpu_usage? work_usage bvar是多少?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] houjincheng1992 commented on issue #1294: brpc调用openmp时cpu消耗不受控制

Posted by GitBox <gi...@apache.org>.
houjincheng1992 commented on issue #1294:
URL: https://github.com/apache/incubator-brpc/issues/1294#issuecomment-914036934


   这个有什么解法吗


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org