* qemu needs > 2 GB of RAM to build?
@ 2011-11-18 19:39 Scott Garman
2011-11-18 19:49 ` Khem Raj
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Scott Garman @ 2011-11-18 19:39 UTC (permalink / raw)
To: openembedded-core
Hi all,
I'm testing building core-image-minimal in a resource-constrained
environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm
finding that the build of qemu-native fails because the OOM killer steps
in and kills gcc. This is happening during the linking phase of building
qemu.
If this is true, I assume it would pretty much mean that no one can
build our images without more than 2 GB of RAM. Is this true? Is this
something for us to be concerned about?
Scott
--
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 19:39 qemu needs > 2 GB of RAM to build? Scott Garman
@ 2011-11-18 19:49 ` Khem Raj
2011-11-18 19:59 ` Joshua Lock
2011-11-21 0:54 ` Ni Qingliang
2011-12-03 20:03 ` Khem Raj
2 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2011-11-18 19:49 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman <scott.a.garman@intel.com> wrote:
> Hi all,
>
> I'm testing building core-image-minimal in a resource-constrained
> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
> that the build of qemu-native fails because the OOM killer steps in and
> kills gcc. This is happening during the linking phase of building qemu.
>
what distro are you running on guest ? it could be something wrong
with the distro gcc or system
> If this is true, I assume it would pretty much mean that no one can build
> our images without more than 2 GB of RAM. Is this true? Is this something
> for us to be concerned about?
I have not seen such an error on a system which has 2G RAM all builds
qemu-native fine here
>
> Scott
>
> --
> Scott Garman
> Embedded Linux Engineer - Yocto Project
> Intel Open Source Technology Center
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 19:49 ` Khem Raj
@ 2011-11-18 19:59 ` Joshua Lock
2011-11-18 20:24 ` Scott Garman
0 siblings, 1 reply; 10+ messages in thread
From: Joshua Lock @ 2011-11-18 19:59 UTC (permalink / raw)
To: openembedded-core
On 18/11/11 11:49, Khem Raj wrote:
> On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman <scott.a.garman@intel.com> wrote:
>> Hi all,
>>
>> I'm testing building core-image-minimal in a resource-constrained
>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
>> that the build of qemu-native fails because the OOM killer steps in and
>> kills gcc. This is happening during the linking phase of building qemu.
What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
something equally large such as eglibc, qt or the kernel at the same time.
> what distro are you running on guest ? it could be something wrong
> with the distro gcc or system
I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
only 2GB RAM.
>
>> If this is true, I assume it would pretty much mean that no one can build
>> our images without more than 2 GB of RAM. Is this true? Is this something
>> for us to be concerned about?
>
> I have not seen such an error on a system which has 2G RAM all builds
> qemu-native fine here
I think BB_NUMBER_THREADS is the key here. And whether you're running
much in the way of a desktop environment.
Joshua
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 19:59 ` Joshua Lock
@ 2011-11-18 20:24 ` Scott Garman
2011-11-18 20:28 ` Joshua Lock
2011-11-18 21:17 ` Martin Jansa
0 siblings, 2 replies; 10+ messages in thread
From: Scott Garman @ 2011-11-18 20:24 UTC (permalink / raw)
To: openembedded-core
On 11/18/2011 11:59 AM, Joshua Lock wrote:
>
>
> On 18/11/11 11:49, Khem Raj wrote:
>> On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman<scott.a.garman@intel.com> wrote:
>>> Hi all,
>>>
>>> I'm testing building core-image-minimal in a resource-constrained
>>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
>>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
>>> that the build of qemu-native fails because the OOM killer steps in and
>>> kills gcc. This is happening during the linking phase of building qemu.
>
> What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
> qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
> something equally large such as eglibc, qt or the kernel at the same time.
I had it set to 2, but I'm able to reproduce the problem when rebuilding
*only* qemu-native.
>> what distro are you running on guest ? it could be something wrong
>> with the distro gcc or system
>
> I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
> only 2GB RAM.
This is a Fedora 14 host running GNOME 2.x
> I think BB_NUMBER_THREADS is the key here. And whether you're running
> much in the way of a desktop environment.
I would have thought PARALLEL_MAKE would have been more of the issue - I
think I saw two instances of ld running via top when the crash occurred.
In any case, the purpose behind this exercise for me is to test the
feasibility of using a VM environment for performing builds. The idea is
to get Windows users started with some tutorial screencasts they can
follow along with using the VM until they feel compelled enough to set
up a native Linux development system.
It sounds like a system requirement of using this VM will have to be
that the host system have 6 GB or more of RAM (since the VM guest won't
be able to use all of that - generally around 50-60%). This pretty much
rules out its use on all but the most recent laptops.
Scott
--
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 20:24 ` Scott Garman
@ 2011-11-18 20:28 ` Joshua Lock
2011-11-18 21:17 ` Martin Jansa
1 sibling, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-11-18 20:28 UTC (permalink / raw)
To: openembedded-core
On 18/11/11 12:24, Scott Garman wrote:
> On 11/18/2011 11:59 AM, Joshua Lock wrote:
>>
>>
>> On 18/11/11 11:49, Khem Raj wrote:
>>> On Fri, Nov 18, 2011 at 11:39 AM, Scott
>>> Garman<scott.a.garman@intel.com> wrote:
>>>> Hi all,
>>>>
>>>> I'm testing building core-image-minimal in a resource-constrained
>>>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
>>>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm
>>>> finding
>>>> that the build of qemu-native fails because the OOM killer steps in and
>>>> kills gcc. This is happening during the linking phase of building qemu.
>>
>> What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
>> qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
>> something equally large such as eglibc, qt or the kernel at the same
>> time.
>
> I had it set to 2, but I'm able to reproduce the problem when rebuilding
> *only* qemu-native.
>
>>> what distro are you running on guest ? it could be something wrong
>>> with the distro gcc or system
>>
>> I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
>> only 2GB RAM.
>
> This is a Fedora 14 host running GNOME 2.x
>
>> I think BB_NUMBER_THREADS is the key here. And whether you're running
>> much in the way of a desktop environment.
>
> I would have thought PARALLEL_MAKE would have been more of the issue - I
> think I saw two instances of ld running via top when the crash occurred.
Both doing linking for qemu-native? I thought I remembered one giant
link phase but it's been a while.
>
> In any case, the purpose behind this exercise for me is to test the
> feasibility of using a VM environment for performing builds. The idea is
> to get Windows users started with some tutorial screencasts they can
> follow along with using the VM until they feel compelled enough to set
> up a native Linux development system.
>
> It sounds like a system requirement of using this VM will have to be
> that the host system have 6 GB or more of RAM (since the VM guest won't
> be able to use all of that - generally around 50-60%). This pretty much
> rules out its use on all but the most recent laptops.
Can you not include some canny sstate packages in the VM image? i.e
qemu-native?
Or work with qemu upstream to re-work the link phase?
Or both. One short-term and one long-term :-)
Cheers,
Joshua
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 20:24 ` Scott Garman
2011-11-18 20:28 ` Joshua Lock
@ 2011-11-18 21:17 ` Martin Jansa
2011-11-18 21:42 ` Scott Garman
1 sibling, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2011-11-18 21:17 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 2776 bytes --]
On Fri, Nov 18, 2011 at 12:24:25PM -0800, Scott Garman wrote:
> On 11/18/2011 11:59 AM, Joshua Lock wrote:
> >
> >
> > On 18/11/11 11:49, Khem Raj wrote:
> >> On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman<scott.a.garman@intel.com> wrote:
> >>> Hi all,
> >>>
> >>> I'm testing building core-image-minimal in a resource-constrained
> >>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> >>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
> >>> that the build of qemu-native fails because the OOM killer steps in and
> >>> kills gcc. This is happening during the linking phase of building qemu.
> >
> > What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
> > qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
> > something equally large such as eglibc, qt or the kernel at the same time.
>
> I had it set to 2, but I'm able to reproduce the problem when rebuilding
> *only* qemu-native.
>
> >> what distro are you running on guest ? it could be something wrong
> >> with the distro gcc or system
> >
> > I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
> > only 2GB RAM.
>
> This is a Fedora 14 host running GNOME 2.x
>
> > I think BB_NUMBER_THREADS is the key here. And whether you're running
> > much in the way of a desktop environment.
>
> I would have thought PARALLEL_MAKE would have been more of the issue - I
> think I saw two instances of ld running via top when the crash occurred.
>
> In any case, the purpose behind this exercise for me is to test the
> feasibility of using a VM environment for performing builds. The idea is
> to get Windows users started with some tutorial screencasts they can
> follow along with using the VM until they feel compelled enough to set
> up a native Linux development system.
>
> It sounds like a system requirement of using this VM will have to be
> that the host system have 6 GB or more of RAM (since the VM guest won't
> be able to use all of that - generally around 50-60%). This pretty much
> rules out its use on all but the most recent laptops.
Why not enable more swap? It's slow but works for short peaks in mem
usage. I have to extend our swap from 2G to 4G on VM with 2G RAM for
some builds.. also needed during linking unstripped libs :/.
Regards,
>
> Scott
>
> --
> Scott Garman
> Embedded Linux Engineer - Yocto Project
> Intel Open Source Technology Center
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 21:17 ` Martin Jansa
@ 2011-11-18 21:42 ` Scott Garman
0 siblings, 0 replies; 10+ messages in thread
From: Scott Garman @ 2011-11-18 21:42 UTC (permalink / raw)
To: openembedded-core
On 11/18/2011 01:17 PM, Martin Jansa wrote:
> Why not enable more swap? It's slow but works for short peaks in mem
> usage. I have to extend our swap from 2G to 4G on VM with 2G RAM for
> some builds.. also needed during linking unstripped libs :/.
Thank you, Marin - this is an excellent idea. :)
Scott
--
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 19:39 qemu needs > 2 GB of RAM to build? Scott Garman
2011-11-18 19:49 ` Khem Raj
@ 2011-11-21 0:54 ` Ni Qingliang
2011-12-03 20:03 ` Khem Raj
2 siblings, 0 replies; 10+ messages in thread
From: Ni Qingliang @ 2011-11-21 0:54 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
I have encountered the same problem on archlinux in VM.
after googled it, maybe it is GCC's defect
On Sat, 2011-11-19 at 03:39 +0800, Scott Garman wrote:
> Hi all,
>
> I'm testing building core-image-minimal in a resource-constrained
> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm
> finding that the build of qemu-native fails because the OOM killer steps
> in and kills gcc. This is happening during the linking phase of building
> qemu.
>
> If this is true, I assume it would pretty much mean that no one can
> build our images without more than 2 GB of RAM. Is this true? Is this
> something for us to be concerned about?
>
> Scott
>
> --
> Scott Garman
> Embedded Linux Engineer - Yocto Project
> Intel Open Source Technology Center
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Yi Qingliang
niqingliang@insigma.com.cn
https://niqingliang2003.wordpress.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-11-18 19:39 qemu needs > 2 GB of RAM to build? Scott Garman
2011-11-18 19:49 ` Khem Raj
2011-11-21 0:54 ` Ni Qingliang
@ 2011-12-03 20:03 ` Khem Raj
2011-12-05 0:40 ` Ni Qingliang
2 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2011-12-03 20:03 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman <scott.a.garman@intel.com> wrote:
> Hi all,
>
> I'm testing building core-image-minimal in a resource-constrained
> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
> that the build of qemu-native fails because the OOM killer steps in and
> kills gcc. This is happening during the linking phase of building qemu.
>
> If this is true, I assume it would pretty much mean that no one can build
> our images without more than 2 GB of RAM. Is this true? Is this something
> for us to be concerned about?
>
I think this could be because of gcc bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48190
that bug has now been fixed and backported to gcc-4.5 and gcc 4.6
branches as well
however this fix has to go into the gcc in distro that you are running
on build host
we will get this fix into oe-core gcc as well but that may not help
with qemu-native
-Khem
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: qemu needs > 2 GB of RAM to build?
2011-12-03 20:03 ` Khem Raj
@ 2011-12-05 0:40 ` Ni Qingliang
0 siblings, 0 replies; 10+ messages in thread
From: Ni Qingliang @ 2011-12-05 0:40 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Do you mean it need the native-gcc on host to fix this bug?
On Sun, 2011-12-04 at 04:03 +0800, Khem Raj wrote:
> On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman <scott.a.garman@intel.com> wrote:
> > Hi all,
> >
> > I'm testing building core-image-minimal in a resource-constrained
> > environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> > PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
> > that the build of qemu-native fails because the OOM killer steps in and
> > kills gcc. This is happening during the linking phase of building qemu.
> >
> > If this is true, I assume it would pretty much mean that no one can build
> > our images without more than 2 GB of RAM. Is this true? Is this something
> > for us to be concerned about?
> >
>
> I think this could be because of gcc bug
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48190
> that bug has now been fixed and backported to gcc-4.5 and gcc 4.6
> branches as well
> however this fix has to go into the gcc in distro that you are running
> on build host
> we will get this fix into oe-core gcc as well but that may not help
> with qemu-native
>
> -Khem
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Yi Qingliang
niqingliang@insigma.com.cn
https://niqingliang2003.wordpress.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-12-05 0:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18 19:39 qemu needs > 2 GB of RAM to build? Scott Garman
2011-11-18 19:49 ` Khem Raj
2011-11-18 19:59 ` Joshua Lock
2011-11-18 20:24 ` Scott Garman
2011-11-18 20:28 ` Joshua Lock
2011-11-18 21:17 ` Martin Jansa
2011-11-18 21:42 ` Scott Garman
2011-11-21 0:54 ` Ni Qingliang
2011-12-03 20:03 ` Khem Raj
2011-12-05 0:40 ` Ni Qingliang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.