Paolo Bonzini <pbonz...@redhat.com> writes:

> On 14/01/2015 11:20, Kevin Wolf wrote:
>>> > The same problem applies to coroutine stacks, and those cannot be
>>> > throttled down as easily.  But I guess if you limit the number of
>>> > threads, the guest gets slowed down and doesn't create as many coroutines.
>> Shouldn't we rather try and decrease the stack sizes a bit? 1 MB per
>> coroutine is really a lot, and as I understand it, threads take even
>> more by default.
>
> Yup, 2 MB.  Last time I proposed this, I think Markus was strongly in 
> the "better safe than sorry" camp. :)

Yup.  Running out of stack is a nasty failure mode.

> But thread pool workers definitely don't need a big stack.

When analysis leads to an upper bound for stack size, by all means use
it.

Absent rigorous analysis backed by testing, I recommend to throw address
space at the problem.

32 bit limitations can force us to throw less generously (and be less
safe) there.  Not a good reason to compromise safety on 64 bit machines
as well, though.

[...]

Reply via email to