1 |
On Mon, 2011-01-17 at 16:23 -0800, Grant wrote: |
2 |
> > I think the idea is never use swap if possible, but in a case where |
3 |
> > you don't have swap space or run out of swap space I think it's still |
4 |
> > possible to lose data. |
5 |
> |
6 |
> Isn't swap just an extension of system memory? Isn't adding 4GB of |
7 |
> memory just as effective at preventing out-of-memory as dedicating 4GB |
8 |
> of HD space to swap? I can understand enabling swap on a laptop or |
9 |
> other system with constrained memory capacity, but doesn't it make |
10 |
> sense to disable swap and add memory on a 24GB server? |
11 |
> |
12 |
> Is swap basically a way to save money on RAM? |
13 |
> |
14 |
> - Grant |
15 |
> |
16 |
|
17 |
No swap contains pages from memory that have not been accessed for |
18 |
awhile so they can be stored elsewhere freeing ram for actual active |
19 |
pages. When they need to be accessed, they have to be swapped back in, |
20 |
and often something swapped back out to make room for it. |
21 |
|
22 |
And for those with gigabytes of swap, keep in mind that the majority of |
23 |
processors can only access up to 32 x 2G swapfiles under linux, so 4G is |
24 |
only going to be half used. Some processors are only able to handle |
25 |
very small swapfiles, whilst amd opterons can handle very large ones. |
26 |
|
27 |
It does appear however that some distros (redhat and suse ?) have |
28 |
modified something to allow larger swap sizes on 64bit systems, but via |
29 |
google it seems very muddy at the moment. |
30 |
|
31 |
On my mostly 32bit systems its only the opterons (which are running |
32 |
64bit systems) that can access more than 2G swap using gentoo-sources |
33 |
kernels when I tested late last year. |
34 |
|
35 |
BillK |
36 |
|
37 |
|
38 |
-- |
39 |
William Kenworthy <billk@×××××××××.au> |
40 |
Home in Perth! |