minimizing physical memory budget

Steven Harp steven.harp at adventiumlabs.com
Wed Jun 27 23:59:24 CEST 2018


What are the main factors in estimating the minimum RAM
quantum needed by a component?   (Excluding for this discussion
any dynamic allocation an application might perform.)

The Genode Foundations book (18.05) suggests that if no quantum
is specified, "init has a reasonable default of 160K (on 32 bit)".

Experimentally, it seems like even the most modest components
need more. For example the client side of the hello_tutorial,
essentially 5 source lines and a 20K stripped ELF binary, seems to 
need  about 500K on a 32-bit x86 system. 

At quantum="480K" for hello_client, one sees:
 Warning: PD (init -> hello_client) RAM limit (used=380K, limit=394587)
    exceeded during transfer_quota(6K)
(and the test hangs.)

At 425K, the result is:
 [init] child "hello_client" requests resources: ram_quota=69632
 page fault, pd='init -> hello_client' thread='hello_client' cpu=0 ip=0xa2adc address=0xa00fde50 stack pointer=0x0  qualifiers=0x6 irUWp reason=1

At 300K, we see:
 [init] Error: allocation of read-write segment failed
 [init] Error: hello_client: out of RAM during ELF loading

Is there a way to tweak component compilation/linking parameters to 
minimize physical RAM required?

// Steve Harp



More information about the users mailing list