[gentoo-user] Re: How to minimise resource usage during emerge

2008-09-13 Thread Nikos Chantziaras

Hilco Wijbenga wrote:

I have a very small virtual server (just 64MB RAM, no swap) where I'm
trying to install Gentoo. It fails to emerge binutils due to out of
memory. According to the handbook I need 64MB RAM and 256MB swap as a
bare minimum so this result is not entirely unexpected.

Given that I can't add a swapfile (simply not possible in this virtual
server) is the only option more RAM? If yes, then what is the minimum?
Are there ways to reduce the amount of memory used by emerge?


64MB is not enough, not by any stretch of the imagination.  Not for 
running the system, but for emerge.  512MB should be there for building 
with -O2.  At *least* 384MB.  You'll have a hard time compiling the 
compiler itself though; RAM usage with -O2 goes up to 700MB.


With that being said, you can minimize RAM usage by using -O1, or even 
-O0 to switch off the optimizer completely.  The runtime speed of the 
built programs won't be to your liking though.


The only real option is to get more RAM.




[gentoo-user] Re: How to minimise resource usage during emerge

2008-09-13 Thread Nikos Chantziaras

Nikos Chantziaras wrote:

[...]
The only real option is to get more RAM.


Another option is to emerge on another machine, build binary packages 
and emerge those in the embedded system.





Re: [gentoo-user] Re: How to minimise resource usage during emerge

2008-09-13 Thread Justin

Nikos Chantziaras schrieb:

Nikos Chantziaras wrote:

[...]
The only real option is to get more RAM.


Another option is to emerge on another machine, build binary packages 
and emerge those in the embedded system.



Or mount / as nfs on another machine, chroot in that and compile. This 
skips the whole extraction part on the embedded system.


What about temporary giving the VM more resources?



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Re: How to minimise resource usage during emerge

2008-09-13 Thread Simon

Yup, and on mine, here's what I do:
I emerge all on one machine, which uses distcc on 2 other machines.  Once 
machine1 is up2date, i rsync the binpkgs to machine2 and emerge using -k this 
time, all are installed by binary, those that are not found are emerged 
normally. Same process on last machine and bingo!


This is more how to maximize resource usage, in a way.


Nikos Chantziaras wrote:

Nikos Chantziaras wrote:

[...]
The only real option is to get more RAM.


Another option is to emerge on another machine, build binary packages 
and emerge those in the embedded system.








Re: [gentoo-user] Re: How to minimise resource usage during emerge

2008-09-13 Thread Hilco Wijbenga
On Sat, Sep 13, 2008 at 01:49, Nikos Chantziaras [EMAIL PROTECTED] wrote:
 Hilco Wijbenga wrote:
 I have a very small virtual server (just 64MB RAM, no swap) where I'm
 trying to install Gentoo. It fails to emerge binutils due to out of
 memory. According to the handbook I need 64MB RAM and 256MB swap as a
 bare minimum so this result is not entirely unexpected.

 Given that I can't add a swapfile (simply not possible in this virtual
 server) is the only option more RAM? If yes, then what is the minimum?
 Are there ways to reduce the amount of memory used by emerge?

 64MB is not enough, not by any stretch of the imagination.  Not for running
 the system, but for emerge.  512MB should be there for building with -O2.
  At *least* 384MB.  You'll have a hard time compiling the compiler itself
 though; RAM usage with -O2 goes up to 700MB.

I assume you mean RAM + swap? Because I have a virtual machine
(VirtualBox) on my home box with 256MB which works perfectly
(including compiling GCC multiple times). It does have lots of swap,
though.

 With that being said, you can minimize RAM usage by using -O1, or even -O0
 to switch off the optimizer completely.  The runtime speed of the built
 programs won't be to your liking though.

I've never tried not using -O2. Is the difference really that noticeable?

 The only real option is to get more RAM.

That means paying more. :-) I don't want to do that until I'm sure
this virtual box satisfies my requirements.



Re: [gentoo-user] Re: How to minimise resource usage during emerge

2008-09-13 Thread Hilco Wijbenga
On Sat, Sep 13, 2008 at 02:10, Justin [EMAIL PROTECTED] wrote:
 Nikos Chantziaras schrieb:

 Nikos Chantziaras wrote:

 [...]
 The only real option is to get more RAM.

 Another option is to emerge on another machine, build binary packages and
 emerge those in the embedded system.

Yeah, it looks like this is the way to go. I've never used binary
packages so this will be an interesting exercise.

 Or mount / as nfs on another machine, chroot in that and compile. This skips
 the whole extraction part on the embedded system.

Interesting. I'm not sure if I can, though. I don't have control of
the kernel. I'll investigate.

 What about temporary giving the VM more resources?

Nope, not possible unless I pay more. I had intended to simply use a
big swap file but even that doesn't work. This virtual box doesn't
support it.



[gentoo-user] Re: How to minimise resource usage during emerge

2008-09-13 Thread Nikos Chantziaras

Hilco Wijbenga wrote:

On Sat, Sep 13, 2008 at 02:10, Justin [EMAIL PROTECTED] wrote:

Nikos Chantziaras schrieb:

Nikos Chantziaras wrote:

[...]
The only real option is to get more RAM.

Another option is to emerge on another machine, build binary packages and
emerge those in the embedded system.


Yeah, it looks like this is the way to go. I've never used binary
packages so this will be an interesting exercise.


If the other machine has its packages compiled with the same -march 
GCC flag as the embedded one, you can simply do:


  quickpkg atom

This will simply create a binary package of the specified package atom 
without compiling anything (it will use the existing installation of the 
package).  This will of course only work if the package is already 
installed.  If not, use emerge to compile and build the package without 
actually installing it.


The only thing to keep in mind is the -march flag.  It must be for the 
embedded system, not the current system.