kof02guy commented on issue #1136:
URL: https://github.com/apache/incubator-brpc/issues/1136#issuecomment-650753019


   @jamesge 请教一下关于bthread stack的内存管理相关的问题。
   就这个问题,现在我们定位到了是由于触碰到了max_map_count,使得task被分配到了pthread上运行。这使得bthread 
worker线程都被占满(有可能这时候所有的worker都在等被换出的bthread拿到的锁),从而hung住
   因此问题的关注点到了bthread的stack 
count,我从bthread_stack_count这个指标观察,发现这个指标只增不减。在代码里发现,bthread 
stack会在调用allocate_stack_storage的时候增加,而在deallocate_stack_storage的时候减少,而bthread 
stack会被object pool来管理。
   所以我现在怀疑是object pool里存储了过多的bthread 
stack对象。这些对象其实已经没有相应实际运行的任务和其对应了,但是还是在object pool中,所以占用了很多的map_count。
   所以我想请教一下,这些object会在什么时候被真正释放呢?有什么参数或者方法可以对这些在free listi里的对象的个数进行调节,使其提早释放?


----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to