1 |
Grant wrote: |
2 |
> ... |
3 |
> |
4 |
>> To confuse you even more, there is a swappiness setting as well. On my old |
5 |
>> x86 rig, I have 2Gbs of ram. My hard drive is really slow since it is IDE. |
6 |
>> I set swappiness to 20. That tells the kernel that I have swap space but |
7 |
>> don't use it unless you must. For what I use the rig for, 2Gbs is plenty of |
8 |
>> ram. The lower the swappiness setting, the less the kernel will try to use |
9 |
>> ram. The higher the setting, the more it will try to use swap. |
10 |
>> |
11 |
>> I have a new rig that is amd64 and has SATA drives which are pretty fast. I |
12 |
>> still have swappiness set to 20. Why do I have it set to 20 when the drives |
13 |
>> are faster you ask? I have it set to 20 because I have 16Gbs of ram here. |
14 |
>> Even if I have portage's work directory on tmpfs and am compiling OOo, it |
15 |
>> should not need swap then either. |
16 |
>> |
17 |
>> By the way, my swap partition is 1Gb on both systems. Why have it this way |
18 |
>> since one machine has 2Gbs and one has 16Gbs? As it has been said, you want |
19 |
>> a little swap and even using a little swap is OK. You just don't want it to |
20 |
>> be using swap and actually swapping data all the time. On my old rig, it |
21 |
>> started out with 512Mbs. I use KDE and it got to the point where it was |
22 |
>> using enough ram that it was not just using swap and letting things sit, it |
23 |
>> was actively swapping data from swap and doing so a lot. It would only be |
24 |
>> using a 100Mbs sometimes 200Mbs. The point is, it was slowing the system |
25 |
>> down because of the swapping process. I bought a stick of ram and all was |
26 |
>> well again. It would still use a 100Mbs of swap at times but it would not |
27 |
>> be actively swapping the data back and forth so it wasn't a big deal. |
28 |
>> |
29 |
>> I think the point is this, it is good to have a little swap. It is even OK |
30 |
>> for it to use a little swap when it is mostly sitting there. When you |
31 |
>> notice it using swap and it is actively swapping and moving things back and |
32 |
>> forth, you need more memory. Having the swap may can save you from a crash |
33 |
>> but is can also give you a "time to add more ram" hint too. If Linux starts |
34 |
>> using swap a good bit, you need more ram. |
35 |
>> |
36 |
> OK, how can you determine when a machine is actively swapping and |
37 |
> moving things back and forth? Do you need to monitor the system with |
38 |
> a real-time tool during peak usage? |
39 |
> |
40 |
> - Grant |
41 |
> |
42 |
> |
43 |
> |
44 |
|
45 |
I use gkrellm on mine. It has a little charty thingy. I think iotop |
46 |
will show if anything is being swapped to. There may be others as well |
47 |
for a console or non-X machine. Most people know of top but that really |
48 |
doesn't help a lot. It doesn't show things moving just how much is |
49 |
being used. I think there is a better command that shows this but dang |
50 |
if I can recall it right now. Somebody help a old fart out here. lol |
51 |
|
52 |
Dale |
53 |
|
54 |
:-) :-) |