Gentoo Archives: gentoo-amd64

From: Richard Freeman <rich0@g.o>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Managing CPU usage when doing emerges
Date: Wed, 20 May 2009 13:58:58
Message-Id: 4A140C90.4040009@gentoo.org
In Reply to: Re: [gentoo-amd64] Managing CPU usage when doing emerges by Mark Haney
1 Mark Haney wrote:
2 > Paul Hartman wrote:
3 >> I agree, I use /dev/shm (4gigs) for my portage tmpdir and it has had a
4 >> bigger noticeable speed impact than ccache or niceness, and the
5 >> silence of zero disk activity (other than reading the distfiles in the
6 >> unpack stage and installing the compiled files) is nice, too.
7 >>
8 >
9 > I would do this, however, my problem is (or was) RAM. Until yesterday I
10 > had only 1GB RAM in this laptop. Now I have doubled it which is the max
11 > it will support (it's 4 years old). I don't think 2GB is worth trying a
12 > tmpfs for.
13 >
14
15 I wouldn't let this deter you. I only have 2GB of RAM in my server and
16 it is doing quite a bit (myth, apache, samba, shorewall, postfix, etc).
17 I just have a nice big 8GB swap partition and I never have issues.
18
19 In the worst case using lots of tmpfs causes swapping which slows down
20 compilation due to IO. In the best case, not using tmpfs causes lots of
21 writing to disk and slowdown due to IO. In my opinion the worst that
22 can happen with tmpfs is that it just goes no faster than what you see
23 now. In certain well-tuned applications there might be benefits to not
24 using swap at all, but if you have a swapfile now the system will use it
25 whether your RAM is full or not, and at least with tmpfs you have the
26 benefit of separating long-term file storage from short-term file
27 storage and allowing the OS to optimize accordingly.