1 |
Uwe Thiem <uwix@××××.na> wrote: |
2 |
|
3 |
> There are too damn many myths about swap out there. Like this one: |
4 |
> Always configure twice as much swap as you have ram. Why? |
5 |
|
6 |
<OT> |
7 |
Well, it depends on how swap is handled by system. In linux, your |
8 |
total memory = physical memory + swap (as you wrote) |
9 |
|
10 |
A couple years ago I got answer from HP, where they said with hp-ux: |
11 |
total memory = physical memory + (swap - physical memory) |
12 |
only if swap > physical memory ! |
13 |
|
14 |
and |
15 |
total memory = physical memory |
16 |
if swap < physical memory |
17 |
(in other words, it was completely useless to have swap < phys.memory, |
18 |
and optimum was really swap = 2 * physical memory) |
19 |
|
20 |
They explained to me, that hp-ux 11 (or at least that early version) |
21 |
allocates part of swap of the same size as physical memory and mirrors |
22 |
the whole image of ram into swap for performance reasons: when more |
23 |
memory is needed, it can be immediatelly made free, because it is |
24 |
already paged to disk. |
25 |
|
26 |
So when I had 1GB RAM and 2GB swap, even right after system boot-up |
27 |
only 1GB of swap were free (in the other half of swap there was already |
28 |
mirror of physical memory), and I could not start any process which |
29 |
needed more than 2GB total memory. |
30 |
|
31 |
It seemed to me to be a complete vaste, and I was really angry, because |
32 |
it was time when 4 GB disk was a luxury (and e.g. irix did not have |
33 |
this strange "feature"). But things might have changed since then... |
34 |
</OT> |
35 |
|
36 |
Jarry |
37 |
|
38 |
-- |
39 |
Telefonieren Sie schon oder sparen Sie noch? |
40 |
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie |
41 |
-- |
42 |
gentoo-user@g.o mailing list |