Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Rust, pkgsrc



> Yes. I had a similar problem.  The build would fill up the
> /tmp/ directory and die from exhausted resources.  I had /tmp/
> created with tmpfs and had a constraint of 64M.  The answer for
> me was to create /tmp in /etc/fstab with tmpfs and no size
> constraint.  Then Rust would build, but it still took a long
> time.

Yes, rust is an absolute Pig resource-wise.  Not only does it
carry a copy of llvm inside itself (it most probably has to), it
also carries a nubmer of other packages inside.  Plus, the build
builds most parts at least twice if I've been able to observe
correctly.

When building on NetBSD/amd64 8.0, I noticed that the work/
directory after a "make" consumes in the order of 10G disk space,
possibly more when cross-building (my current work/ is 13G, which
is an unfinished cross-build because I hit build issues...).

It is conceivable that the storage could be reduced somewhat (but
probably not by much?) by tweaking src/bootstrap/boostrap.py to
say -Cdebuginfo=0 instead of 2 for RUSTFLAGS.

So that you have an idea what to expect:

My amd64 build host has 8G real memory, and a 2G tmpfs /tmp, and
... it didn't run out of space anywhere :) On this particular
host (i7 3rd-gen, 4 real cores, 8 w/HT, pkgsrc and system on SSD)
the build of 1.29.2 completed in a little over 2 hours wall-clock
time, csh's "time" report at the end of the build was

40468.007u 1958.277s 2:04:42.18 567.0%  0+0k 10302+100556io 129329pf+0w

So, yes, the build makes fairly good use of the multiple cores;
notice the 567.0%, which, if I've understood correctly, indicates
approx. 5.7* parallelism on average.

The last version I managed to build on one of my NetBSD/macppc
8.0 machines (a single-core 1.5GHz G4 Mac Mini, 1GB memory) was
1.29.2, the build took nearly 29 hours wallclock time.  This one
doesn't have a tmpfs, and has a single file system with ~40G
free, so it also didn't run into any barriers on the /tmp front
either.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index