Gentoo Archives: gentoo-user

From: Joshua Murphy <poisonbl@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] how to use RAM
Date: Tue, 13 Oct 2009 16:26:16
Message-Id: c30988c30910130926p1e1c55a8x69d13f5382a579b2@mail.gmail.com
In Reply to: [gentoo-user] how to use RAM by "Stefan G. Weichinger"
1 On Mon, Oct 12, 2009 at 4:44 PM, Stefan G. Weichinger <lists@×××××.at> wrote:
2 >
3 > Greets, gentoo-users,
4 >
5 > as I ordered myself an upgrade from 4 to 8 gigs of RAM for my main
6 > workstation, just because it's rather cheap now and I have good use for
7 > the "old" 4 gigs I wonder what to do with those shiny new additional 4 gigs.
8 >
9 > OK, linux uses it for IO-caching, yep ...
10 >
11 > I have some ram-disk already for compiling stuff (portage-stuff) and I
12 > can think of increasing app-caches like operas own ram-cache to make use
13 > of the memory.
14 >
15 > I will give my virtual machines more RAM to improve their performance,
16 > yes, this is maybe the main reason for me to upgrade RAM.
17 >
18 > But are there any other things I might forget?
19 >
20 > Are there any creative non-ricer ways to really make use of it?
21 >
22 > I would like to hear your opinion on this, I am quite sure the
23 > gentoo-community knows one trick or the other ;-)
24 >
25 > Thanks a lot, Stefan
26 >
27 >
28
29 Non-ricer? Well... this sorta breaks that category.
30
31 There's a rather handy tool[1] already in the stage3, I've used it
32 alongside bootchart to force-load everything needed into ram during
33 boot, before it's needed, so execution gets held up by i/o just a
34 little less. Actually shaved a few seconds off of my desktop's bootup
35 once upon a time (3.0 GHz core 2 duo on 4GB of ram, which had
36 excessive eyecandy while remaining fairly lightweight). The second use
37 I put it through, and this one just a little more long-term useful,
38 was preloading my wm, most of my home directory (primarily all the
39 config files), aterm, firefox, a few other common tools I use, and the
40 libraries they were using on my system while logging in. All of my
41 applications were starting in no time at all. The catch... I took the
42 brute force approach, rather than using an add-on tool to
43 automagically choose what to prefetch for me. There are also setting
44 in the bootscripts that, if you're not already using them, will make
45 use of at least a little, using tmpfs here and there, and also just
46 putting /tmp and /var/tmp onto tmpfs (outside of building things like
47 open office, this tends to work well). Oh, and if you really do want
48 to use up all that ram.... build openoffice in tmpfs... if it could
49 use all 8GB for files only, it might actually work out, I know it
50 kills off when you only have part of 4GB to feed it.
51
52 [1] artifice ~ # busybox readahead
53 BusyBox v1.14.2 (2009-10-13 06:37:22) multi-call binary
54
55 Usage: readahead [FILE]...
56
57 Preload FILE(s) in RAM cache so that subsequent reads for thosefiles
58 do not block on disk I/O
59
60 --
61 Poison [BLX]
62 Joshua M. Murphy

Replies

Subject Author
Re: [gentoo-user] how to use RAM "Stefan G. Weichinger" <lists@×××××.at>