Gentoo Archives: gentoo-amd64

From: Beso <givemesugarr@×××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: Symlinks vs. Bind mounts.
Date: Tue, 12 Aug 2008 08:23:09
Message-Id: d257c3560808120123t4733d15pc81f4968cbba9bdf@mail.gmail.com
In Reply to: Re: [gentoo-amd64] Re: Symlinks vs. Bind mounts. by "Morgan Wesström"
1 2008/8/12 Morgan Wesström <gentoo-amd64@×××××××××.biz>
2
3 > Duncan wrote:
4 >
5 >> Now, if you /really/ want to make a difference in portage's speed,
6 >> consider pointing PORTAGE_TMPDIR at a tmpfs. If you've a decent amount of
7 >> memory, it'll make a HUGE difference, since all the files it normally
8 >> creates only temporarily in by default, /var/tmp/portage/* will be created
9 >> in memory (tmpfs) only. Even with a relatively low amount of memory, say a
10 >> gig (we're talking amd64 system context here, after all, and a gig has been
11 >> relatively common since its introduction, not some old 1990s 32-bit x86),
12 >> where tmpfs may be swapped out in some cases, the shortest lived files
13 >> should never hit disk (swap in the case of tmpfs) at all. That's a LOT of
14 >> extreme-latency hard-disk I/O avoided!! If you have some serious memory, 2
15 >> gig, 4 gig, higher (I have 8 gig), it's even MORE effective, as only the
16 >> biggest merges will ever hit disk at all, except of course for the initial
17 >> PORTDIR/DISTDIR operations and the final qmerge to the live filesystem.
18 >>
19 >
20 > This advice caught my attention since I moved my tmp space to Reiserfs for
21 > performance reasons. My knowledge of tmpfs is limited but I think it is a
22 > filesystem that uses RAM and can grow and shrink dynamically, right? If I
23 > follow this advice, what happens when I compile something like Open Office
24 > which allocates 3-4GB in /var/tmp during compilation and I only have 2GB
25 > physical RAM in the computer?
26 >
27
28 you'll use swap partition. but you'll not allocate all that ram space with
29 openoffice. i've tried to compile it twice. first time it was on disk and it
30 took almost 14 hours of compilation. the second time was on tmpfs with 3.8gb
31 and a 6gb swap file and it took less than 8 hours and i've never filled the
32 swap partition. to put at maximum use this method with low ram then don't
33 start xorg and graphical terminals but only the base vt and compile from
34 there. this will save you quite some ram space. you'll also find that the -j
35 option in your make.conf could be increased much when going with tmpfs. for
36 example i've passed from -j5 in hd use to -j9 in tmpfs and i still have a
37 very good and usable graphical system. with the old single core pc i was
38 using -j2 in hd and -j5 on tmpfs. this dramattically decreases compilation
39 time.
40
41 @duncan: do you remember that some time ago you were speaking about posting
42 the scripts to compile the kernel with the make.conf optimizations, but you
43 haven't posted them any more. do you still use them?!
44
45 --
46 dott. ing. beso

Replies

Subject Author
Re: [gentoo-amd64] Re: Symlinks vs. Bind mounts. "Morgan Wesström" <gentoo-amd64@×××××××××.biz>
[gentoo-amd64] Re: Symlinks vs. Bind mounts. Duncan <1i5t5.duncan@×××.net>