Am 22.06.2016 um 12:56 schrieb Stefan Hajnoczi: > On Tue, Jun 21, 2016 at 05:12:57PM +0200, Peter Lieven wrote: >> - We changed the coroutine pool to a per thread model. I disabled the pool. >> This seems >> to cut the max used RSS to about 150MB which is still a lot more than >> qemu-2.2.0 > The per-thread coroutine pools only grow when a thread creates/destroys > coroutines. > > The QEMU main loop, iothread, and maybe vcpus should use coroutines. > The numerous thread-pool worker threads should not use coroutines IIRC. > > Creating coroutines is expensive and the pools improve performance a > lot. Maybe you can make observations about how to manage pool size more > efficiently for your VM?
I did not want to blame the coroutine pool. Its a good thing. I just wanted to mention that we changed from a global pool (with a global mutex) to a thread based pool. This might influence memory consumption. But the increased RSS usage I observe is also there with disable coroutine pool. What makes the coroutine pool memory intensive is the stack size of 1MB per coroutine. Is it really necessary to have such a big stack? Peter