public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matthias Bethke <matthias@towiski.de>
To: gentoo-amd64@lists.gentoo.org
Subject: Re: [gentoo-amd64]  Re: Symlinks vs. Bind mounts.
Date: Tue, 12 Aug 2008 21:31:28 +0200	[thread overview]
Message-ID: <20080812193128.GK7990@aldous> (raw)
In-Reply-To: <48A1476D.8020409@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

Hi Juan,
on Tue, Aug 12, 2008 at 05:18:53AM -0300, you wrote:
>> If I follow this advice, what happens when I compile something like
>> Open Office which allocates 3-4GB in /var/tmp during compilation and
>> I only have 2GB physical RAM in the computer?
>
> If all the Virtual Memory (VM = RAM+SWAP) is exhausted the kernel will try 
> to kill the process that is consuming most of it.

That's why tmpfs also uses swapspace. Given the address space you have
on a 64bit system, I don't see any reason[0] to save swapspace any
more---after I tried the tmpfs idea for the first time, I just
repartitioned my system for 32 GiB of swap and put /tmp and
/var/tmp/portage on tmpfs. Just perfect.
Not only does this speed up everything that uses temporary files, it
also minimizes the effect of programs that fragment or leak their
memory, like FF2 that had a habit of packing small cached things after
big ones and then not reusing the big ones after they had been freed and
thus ballooning to perverse sizes. I've seen a Firefox grow to over 10
GiB (at 4 GB physical RAM) with minimal impact on the rest of the system
because the hardly ever touched pages just get paged out at some point
and don't matter as long as they stay on disk.

cheers,
	Matthias

[0] OK, there is small overhead due to larger page tables but it's
negligible.
-- 
I prefer encrypted and signed messages. KeyID: FAC37665
Fingerprint: 8C16 3F0A A6FC DF0D 19B0  8DEF 48D9 1700 FAC3 7665

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2008-08-12 19:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12  3:28 [gentoo-amd64] Symlinks vs. Bind mounts Juan Fco. Giordana
2008-08-12  4:45 ` [gentoo-amd64] " Duncan
2008-08-12  7:52   ` Morgan Wesström
2008-08-12  8:18     ` Juan Fco. Giordana
2008-08-12  8:30       ` Beso
2008-08-12 14:38         ` Duncan
2008-08-12 15:05           ` Beso
2008-08-12 15:38             ` Wil Reichert
2008-08-13  1:37               ` Duncan
2008-08-12 15:40             ` Duncan
2008-08-25 10:16             ` Peter Volkov
2008-08-12 19:31       ` Matthias Bethke [this message]
2008-08-12  8:23     ` Beso
2008-08-12  9:22       ` Morgan Wesström
2008-08-12  9:29         ` Beso
2008-08-12 10:04         ` Peter Humphrey
2008-08-13 22:54           ` Matthias Bethke
2008-08-14  8:07             ` Duncan
2008-08-14 18:08               ` Richard Freeman
2008-08-14 20:37                 ` Matthias Bethke
2008-08-14 22:29                 ` Duncan
2008-08-14 20:25               ` Matthias Bethke
2008-08-14  8:07             ` Peter Humphrey
2008-08-15 14:16               ` Adam Mooz
2008-08-12 14:02       ` Duncan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080812193128.GK7990@aldous \
    --to=matthias@towiski.de \
    --cc=gentoo-amd64@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox