On Wednesday 06 May 2009 19:39:02 Duncan wrote:
snip
snip
snip
> Third, tmpfs is useful in that it isn't restricted to physical memory,
> and can use swap as well, if there's memory pressure and something in
> tmpfs to swap out.  Thus the "worst case" as mentioned earlier, that
> there's not enough memory and the system has to write the files to disk
> (swap, now) after all.  But another implication, then, is that swap size
> matters too.  It can't use swap you don't have configured and mounted!
> The old rule of thumb was to have swap of twice the size of regular
> memory.  While that no longer really applies as it used to, because if
> someone has memory of say four gigs, it's unlikely they're going to be
> prepared to wait for 8 gigs of swap to fill up even if they have it
> configured (at least if they're running a single disk, RAID-0/striped
> swap is faster and thus not as bad), for those with a gig of RAM or more,
> I'd say 2 gigs swap minimum is reasonable.  Those using tmpfs for
> anything major, however, as we're talking about here, will probably want
> more, say 4-6 gigs swap, just in case.

Just as a note swap is striped by kernel if you set the individual swap 
partitions to same priority level. So no need to build swap partiotion as an 
RAID array.

I use RAID 1 (mirrored) swap partition of 4GB in size just to protect swap 
outs from disk failures.
I simply want this system to be a more resilient to disk failures. :)

snip
snip
snip
sharpens the scissors :)
snip
snip

> OTOH, while multiple tmpfs mounts increases overall resource exposure,
> it /does/ allow one to better restrict access to individual tmpfs
> mounts.  Perhaps that's Sami's strategy.  If he limits writing (and
> perhaps reading too) on his PM temp to the portage user (and root, of
> course), then by separating them, he's limiting exposure on his (assumed
> world writable) 2-gig system tmpfs to its 2-gigs, while I'm exposing that
> whole 6-gig tmpfs to writes by any user.  As I said, perhaps he'll post
> his reasoning and we'll see.

I simply mount my PM temp to /var/tmp/paludis and chown it as 
paludisbuild:paludisbuild to restrict this 5GB space to be only for paludis 
temp usage.

The system /tmp I restricted to 2GB as I some times need more tmp space than 
my earlier restriction, which was about 800MB.

The reason I restrict my /tmp quite small is cache. This way I'm not tempted 
to use the /tmp too much. The reason is that I simply want to allow the  
system to keep almost every program and most of the files I use in the cache 
memory. This will make the system more responsive. Besides I have sometimes 
forgot that I had something in my /tmp and after a reboot... I of course did 
some things again because I like that so much. :)
 
The only thing that anoyingly invalidates my io buffers is listening music. 
Maybe I should cut the size of my Music library heavily. :)

The real reason why I use tmpfs for the PM temp dir is not that it makes 
compiles so much faster, but the fact that it will also ease the unnecessary 
disk writes that building packages generate. This will result in a longer life 
time for my disks.

snip
snip
OK Does anyone want to buy a "slightly" used scissors? :)


Reply via email to