Swap partition thrashing

Riley Williams (rhw@bigfoot.com)
Fri, 5 Jun 1998 20:06:53 +0100 (BST)


Hi Michael.

>> From the discussion that has taken place recently, the general
>> conditions for another bug in the Linux source have been tracked
>> down. However, according to the MAINTAINERS file, there is nobody
>> responsible for the relevant section of the code.

>> From what has been said, there appears to be some sort of
>> thrashing occurring in the memory management code that deals with
>> swapping to/from disk, which occurs specifically in the following
>> circumstances:

>> 1. There are TWO OR MORE swap partitions allocated.

>> 2. ALL swap partitions have the SAME priority setting.

>> I don't know the code well enough at the moment to investigate
>> further, but would be interested to discover who's responsible for
>> the relevant section of code so I can pass on this report to
>> somebody who's better able to handle it than I am...

> I think you are on the wrong track here as I have 2 identical 128mb
> partitions at the same priority (need interleaved swap) and have
> had these in place for quite a long time (2.0.1x).

> I have seen thrashing-from-hell, but not with any of the last, say
> 10-12 versions or so. I have tried _very_ hard to get the machine
> to thrash with no success. What I do see is a whole lot of kswapd
> eating most of my io bandwidth for any task which consumes more
> than 16 of 80 meg of ram no matter how I tune parameters. I suspect
> that this kswapd activity gets toxic only on small memory machines.

> This I believe is a known problem which is being addressed by the
> vm magicians. It will get better when someone figures out how to
> solve the fragmentation issues.. and no sooner I think.

Here's a summary of what's been reported so far...

1. Two drives, one partition on each, both pri=1, thrash badly.
(Original report).

2. Two drives, one partition on each, pri=-1 and pri=-2, no
thrashing. (One of my systems).

3. Three drives, swap on two of them, pri=-1 and pri=-2, no
thrashing. (Another of my systems).

4. Three drives, swap on each, two pri=2, one pri=1, thrash badly.
(Another report I've received).

5. Three drives, swap on each, two pri=1, one pri=5, no thrashing.
(Another report I've received).

6. Two or more swap partitions on same drive, no thrashing with
any combination of priorities. (Four reports of this so far).

This does suggest a possible set of rules, but more reports are needed
to verify them. The rule-set suggested is as follows:

1. TWO OR MORE swap partitions.

2. TWO OR MORE of these SHARE the HIGHEST priority level.

3. The ones that share the highest priority level are on DIFFERENT
drives, with not more than one on each drive involved.

To ocomplete the picture, I'd like to receive further reports, and
ESPECIALLY for either of the following conditions:

A. Thrashing NOT occurring when the above conditions are met.
Please state your partition setup.

B. Thrashing occurring when the above conditions are NOT met.
Again, please state your partition setup.

However, reports confirming the above premise are also welcome...

Best wishes from Riley.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu