Gentoo Archives: gentoo-amd64

From: "Sami Näätänen" <sn.ml@××××××××××××.fi>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: upgrade an old system
Date: Wed, 06 May 2009 22:57:39
Message-Id: 200905070157.35952.sn.ml@keijukammari.fi
In Reply to: [gentoo-amd64] Re: upgrade an old system by Duncan <1i5t5.duncan@cox.net>
1 On Wednesday 06 May 2009 19:39:02 Duncan wrote:
2 snip
3 snip
4 snip
5 > Third, tmpfs is useful in that it isn't restricted to physical memory,
6 > and can use swap as well, if there's memory pressure and something in
7 > tmpfs to swap out. Thus the "worst case" as mentioned earlier, that
8 > there's not enough memory and the system has to write the files to disk
9 > (swap, now) after all. But another implication, then, is that swap size
10 > matters too. It can't use swap you don't have configured and mounted!
11 > The old rule of thumb was to have swap of twice the size of regular
12 > memory. While that no longer really applies as it used to, because if
13 > someone has memory of say four gigs, it's unlikely they're going to be
14 > prepared to wait for 8 gigs of swap to fill up even if they have it
15 > configured (at least if they're running a single disk, RAID-0/striped
16 > swap is faster and thus not as bad), for those with a gig of RAM or more,
17 > I'd say 2 gigs swap minimum is reasonable. Those using tmpfs for
18 > anything major, however, as we're talking about here, will probably want
19 > more, say 4-6 gigs swap, just in case.
20
21 Just as a note swap is striped by kernel if you set the individual swap
22 partitions to same priority level. So no need to build swap partiotion as an
23 RAID array.
24
25 I use RAID 1 (mirrored) swap partition of 4GB in size just to protect swap
26 outs from disk failures.
27 I simply want this system to be a more resilient to disk failures. :)
28
29 snip
30 snip
31 snip
32 sharpens the scissors :)
33 snip
34 snip
35
36 > OTOH, while multiple tmpfs mounts increases overall resource exposure,
37 > it /does/ allow one to better restrict access to individual tmpfs
38 > mounts. Perhaps that's Sami's strategy. If he limits writing (and
39 > perhaps reading too) on his PM temp to the portage user (and root, of
40 > course), then by separating them, he's limiting exposure on his (assumed
41 > world writable) 2-gig system tmpfs to its 2-gigs, while I'm exposing that
42 > whole 6-gig tmpfs to writes by any user. As I said, perhaps he'll post
43 > his reasoning and we'll see.
44
45 I simply mount my PM temp to /var/tmp/paludis and chown it as
46 paludisbuild:paludisbuild to restrict this 5GB space to be only for paludis
47 temp usage.
48
49 The system /tmp I restricted to 2GB as I some times need more tmp space than
50 my earlier restriction, which was about 800MB.
51
52 The reason I restrict my /tmp quite small is cache. This way I'm not tempted
53 to use the /tmp too much. The reason is that I simply want to allow the
54 system to keep almost every program and most of the files I use in the cache
55 memory. This will make the system more responsive. Besides I have sometimes
56 forgot that I had something in my /tmp and after a reboot... I of course did
57 some things again because I like that so much. :)
58
59 The only thing that anoyingly invalidates my io buffers is listening music.
60 Maybe I should cut the size of my Music library heavily. :)
61
62 The real reason why I use tmpfs for the PM temp dir is not that it makes
63 compiles so much faster, but the fact that it will also ease the unnecessary
64 disk writes that building packages generate. This will result in a longer life
65 time for my disks.
66
67 snip
68 snip
69 OK Does anyone want to buy a "slightly" used scissors? :)

Replies

Subject Author
[gentoo-amd64] Re: upgrade an old system Duncan <1i5t5.duncan@×××.net>