On 2015-12-16, Christopher Sean Hilton <[email protected]> wrote: > I'm trying to dpb to maintain a small set of packages for a handfull > of OpenBSD boxes that I run. These boxes will all be single purpose > servers of some type or another. Many of them will run with limited > disk space and memory on Soekris hardware. What resources do I want on > my dpb/build box to make it fast?
I wouldn't overthink it. The number one limit is CPU. Faster CPU, better. Regarding memory, you want to avoid going into swap. On amd64, the biggest pig in the build is lang/pypy which requires ~4GB. The second biggest ones are the Mozillas, which take ~2GB during linking. (binutils 2.17 may have shaved off a few hundred MB there, I haven't really payed attention.) The vast majority of ports take far, far less memory. So your memory requirements really depend on how many of those big ports you will end up building in parallel. With ncpu*2GB but a minimum of 4GB you should be on the safe side. Disk doesn't matter much. If you run off magnetic disk, you want to use soft updates at least for the work and log directories. Probably the biggest question is how many cores to use for the build. At the low level, our SMP scales poorly. More cores are faster than fewer cores, but also mean that ever more CPU goes into spinning on the big lock instead of compiling. At the high level, dpb's ability to distribute build jobs to all cores is limited by the numer of ports and their interdependencies. It works well for building the whole ports tree, but if you only do a "small set of packages", the build may have to wait for some port that everything else depends on. Probably the biggest hint for building small sets of packages on more than one core is to increase dpb's parallel property (-p flag) to ncpu, from its default of ncpu/2, so you won't see half the cores idling while the build blocks on something like gcc/4.9 or llvm. Anyway, as I said above, don't overthink it. Do an initial build with modest resources, see how it goes. -- Christian "naddy" Weisgerber [email protected]

