Gentoo Archives: gentoo-embedded

From: Christopher Friedt <cfriedt@××××××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] slow compilation on NFS Root -> use an external USB hard disk ;-)
Date: Sun, 27 May 2007 21:12:26
Message-Id: 4659F417.5000404@visible-assets.com
1 I just thought that I'd mention this, because it wasn't completely
2 obvious to me at first, and maybe someone else who happens to google for
3 this subject might come up with this result.
4
5 Using the stage3 gentoo arm-softfloat-linux-uclibc filesystem, I had for
6 some time been natively compiling packages for my target system, with
7 the root located over NFS.
8
9 Normally it wasn't so bad - sure it was quite slower than
10 cross-compiling. But one thing I hated about cross compiling was
11 randomly running into packages that use some sort of pkgconfig file that
12 I didn't have present, or trying to run some native program in configure
13 and coming up with an error.
14
15 When I got around to compiling the GNU Classpath (for use with jamvm,
16 and stripped of all but the necessities), I found that compiling this
17 app over an NFS root failed quite often because of out-of-memory errors.
18 The process was killed outright. Then I read somewhere about creating a
19 swap file on an NFS root, using losetup to create a loop device, and
20 using swapon to load that swap into the kernel's VM. That turned out to
21 be the worst idea I think I've ever had, because the overhead of using
22 RPC with the NFS root was probably of O^2 complexity at that point,
23 especially considering all of the swapping that had to be done with such
24 a huge compile, using jikes of course.
25
26 Then I thought - hey, i have 2 external hard disks right in front of me
27 that connect via USB - my board has USB - (lightbulb !). Now the jikes
28 process is running at a staggering 50-70% as opposed to the 1-10% it was
29 before. The overhead is considerably less with usb-storage, even with
30 the swap file located on the external USB hard disk.
31
32 ~/Chris
33 --
34 gentoo-embedded@g.o mailing list

Replies