How much memory do I need for buildworld?

Nick Hibma nick at van-laarhoven.org
Mon Nov 24 10:35:14 UTC 2014


>> 
>> Nov 22 16:55:13 mercury kernel: swap_pager: out of swap space
>> Nov 22 16:55:13 mercury kernel: swap_pager_getswapspace(16): failed
>> Nov 22 16:55:13 mercury kernel: pid 22841 (tblgen), uid 0, was killed:
>> out of swap space
>> 
>> This machine has 256MB of RAM and one 64MB swap partition.
> 
> This is most likely the problem: you need more RAM for this particular
> instance of tblgen.  On my -CURRENT i386 box, it takes ~369MiB of RSS to
> build the X86 disassembler tables.
> 
> I'm surprised you didn't run into OOM problems earlier, with so little
> memory.  For such "router" like machines, it is obviously easier to do
> the build on a fast desktop machine, then install over NFS, or rsync
> /usr/src and /usr/obj to the target machine.

I suggest you have a look at NanoBSD in /usr/src/tools/tools/nanobsd.sh. It will build a disk image for you in roughly 1 hour on a fast machine with 4+ processors by doing a complete world. It allows you to regenerate the image and update a running image easily. If you keep your changes separated in /cfg you will find that you can actually work really quickly in this setup (even though not being able to install packages on the image directly is sometimes a bit of a nuisance).

We've wrapped that script with a lot of our own stuff and go from initial config to running in VM in less than 5 minutes, 2.5 minutes for an update after that (using an SSD on the host and FreeBSD in a single processor VM generating the image).

Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 243 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20141124/30bc89f4/attachment.sig>


More information about the freebsd-current mailing list