Number of components per init

Norman Feske norman.feske at ...1...
Wed Oct 5 13:17:33 CEST 2016


Hi Roman,

> - How big is the initial quota of init?

init receives the quota for all the available physical memory from core.
The amount depends on the physical memory of the machine. It is printed
by core when init is started. Look for a message like this:

  24 MiB RAM assigned to init

> - Can I change that quota - or only the preserved slack memory?

If you are using Qemu, you may adjust the memory of the virtual machine
by putting the following line (for 256 MiB) in your run script:

  append qemu_args " -m 256 "

In your run script, the value is 64 MiB, which leaves merely 24 MiB (on
64 bit) for init.

> - If not - is there another way to prevent the "Quota exceeded!"
>   warning?

I looked a bit closer at your scenario. Here is what happens:

For each child started by init, init needs to create several
capabilities (e.g., the parent capability presented to the child, or the
capability for the local ROM session for providing the child's binary as
"binary" ROM module). The allocation of those capabilities is performed
via the 'Nova_native_pd::alloc_rpc_cap' RPC function. This function
naturally consumes session quota of the corresponding PD session (init's
PD session). At one point, the initial session quota (that was passed to
core when init's PD session was created) is depleted. In this case, core
prints the diagnostic message and returns an error to the client (init).
Init responds to this error by upgrading the session quota of its PD
session using the preserved slack memory. The session upgrading is
handled at 'base-nova/src/lib/base/rpc_cap_alloc.cc'.

In your case, the message you see is merely a diagnostic message. The
condition is handled properly. In cases where proper error handing of
the 'Out_of_metadata' condition is missing, the message used to be quite
valuable to spot the problem. So we decided to kept it.

Of course, you may opt to suppress the message by adjusting the code in
'base/include/base/allocator_guard.h'.

> - Does the size of the metadata allocation for a child depends on
> whether I'm using a 32 or 64 bit system?

Yes. I.e., your scenario produces the message only on 64 bit, not on 32 bit.

> 
> - Is a scenario with 19 or more components within one init considered
> 'large'?

The static part of the current scenarios (like the ones tested by our
autopilot) typically consists of fewer components. Personally, I only
hit the limit with the Turmvilla scenario.

That said, the limit turned out not to be a problem in your case. The
message is a false-positive warning. The default limit becomes a problem
not before the PD-session upgrade fails. I can trigger the problem with
your run script when configuring Qemu with 64 MiB of memory and starting
76 children. Sorry that my previous email pointed you to the wrong
direction.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list