Skip to contentSkip to conversation

gobject-introspection: reserve less memory for qemu

PATCH In review Chen Qi 2 participants 3 messages Jan 22, 2021

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 gobject-introspection: reserve less memory for qemu

By default, qemu reserves 4G virtual address. It's too large. We've met error due to lack of memory even on a 32G build machine.

So change it to 512M to mitigate this problem.

---
 .../gobject-introspection/gobject-introspection_1.66.1.bb        | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.66.1.bb +1 -0
index ee0ab2866b..6c49fe31ba 100644
@@ -36,6 +36,7 @@ DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autocon
 # Also prelink-rtld is used to find out library dependencies of introspection binaries
 # (standard ldd doesn't work when cross-compiling).
 DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
+QEMU_OPTIONS_append = " -R 512M"
 
 # needed for writing out the qemu wrapper script
 export STAGING_DIR_HOST
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · Chen Qi

By default, qemu reserves 4G virtual address. It's too large. We've met error due to lack of memory even on a 32G build machine.

So change it to 512M to mitigate this problem.

---
 .../gobject-introspection/gobject-introspection_1.66.1.bb | 1 +

 1 file changed, 1 insertion(+)

Are you sure its out of memory?

Its only taking virtual addresses, it shouldn't actually be allocating it all.

We did notice that on some of our autobuilder workers we had to change mmap_min_addr setting being too 65536 which solved out "out of memory" issues.

Cheers,

Richard

author
#2 lore raw
Quoted 15 lines · Richard Purdie
Quoted 9 lines · Chen Qi

By default, qemu reserves 4G virtual address. It's too large. We've met error due to lack of memory even on a 32G build machine.

So change it to 512M to mitigate this problem.

---
  .../gobject-introspection/gobject-introspection_1.66.1.bb        | 1 +
  1 file changed, 1 insertion(+)

Are you sure its out of memory?

Its only taking virtual addresses, it shouldn't actually be allocating it all.

Quoted 9 lines

We did notice that on some of our autobuilder workers we had to change mmap_min_addr setting being too 65536 which solved out "out of memory" issues.

Cheers,

Richard

Thanks. I checked the server, the value is 4096. I've changed it to 65536.

Best Regards,

Chen Qi