vm rewrite ready [Re: broken VM in 2.4.10-pre9]

Andrea Arcangeli (andrea@suse.de)
Sun, 16 Sep 2001 20:34:14 +0200


On Mon, Sep 17, 2001 at 06:25:38PM +0800, Tonu Samuel wrote:
> On 16 Sep 2001 05:31:11 +0000, Linus Torvalds wrote:
>
> > Also note that the amount of "swap used" is totally meaningless in
> > 2.4.x. The 2.4.x kernel will _allocate_ the swap backing store much
> > earlier than 2.2.x, but that doesn't actuall ymean that it does any of
> > the IO. Indeed, allocating the swap backing store just means that the
> > swap pages are then kept track of, so that they can be aged along with
> > other stores.
>
> Problem still exists and persists. Not long time ago man from Yahoo
> described well case when change from 2.2.19 to 2.4.x caused performance
> problems. On 2.2.19 everything ran fine. They have MySQL running+did

After a few days of developement I think I'm ready to release the VM
rewrite I did.

The alternate vm will be included in 2.4.10pre9aa1 (or anwways the very
next -aa release) and I'll maintain it in the -aa tree. It is supposed
to provide:

1) stable kswapd, avoid the kswapd 100% load of the cpu problem
(this is provided by the classzone design, btw I improved the
implementation a little bit compared to the 2.3/2.4.0-test patches,
now I try to do things as lazily as possible without the bookkeeping
in the pagealloc/pagefreeing)
2) optimal performance, avoid slowdowns after multiple runs of workloads
and avoid swapout storms (for databases not using O_DIRECT)
3) you will get swap+ram of available virtual memory

At the moment it's of course still a bit experimental and subject to
changes but I'm writing this email on top of it and it's perfectly
usable.

This isn't an hack/band-aid or a small set of changes, it's a
complete rewrite from scratch of the whole memory balancing including
garbage collections lru lists, kswapd etc... (only the swap_out() path
is almost unchanged)

The only benchmark I did so far is been `dbench`. Without the vm patch
applied dbench says:

andrea@laser:/mnt > dbench 40
40 clients started
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
.......................................+..........................................................................................................................+..................+.....................................+...........................................................................................+...........................................+..+.......................................++............................................+................+............+..................++++++++++++++++++++++++++++****************************************
Throughput 9.40112 MB/sec (NB.7514 MB/sec 94.0112 MBit/sec)
andrea@laser:/mnt > dbench 40
40 clients started
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
..........................................................................+.....................................+...................................................+...............................................................................+...+...............................................................................+.........................+.....................................+...............+................................................................................+.++++++++++++++++++++++++++++++****************************************
Throughput 9.56469 MB/sec (NB.9559 MB/sec 95.6469 MBit/sec)
andrea@laser:/mnt >

After I apply my vm patch dbench constantly says:

andrea@laser:/mnt > for i in 1 2 3 4 ; do dbench 40; done
40 clients started
.......................................................................................................................................................................................................................................................................................................++.+..+...+...............................+..+..............................................................................................................................................................+.........................+.................................................................................+..........................................+.......................................................................................+...............+.+..+..........................................................................................................+.................+.................+.......................+...........................+..........................+.................
..................+....+.+.+........................................+................................+.+...................................................................................................................................+........................................................................+...........................+................................................................+.......................+...........................+.............................................................++++++****************************************
Throughput 20.353 MB/sec (NB%.4412 MB/sec 203.53 MBit/sec)
40 clients started
................................................................................................................+.................................................+..............+............................................+.....................................................................................................................................................+........................................+....+................+.+..........................................++.......................................+...............................+...................................................+............................................................................+.........+.....................................................................+..............................................................................................................................................................................+............+................................+...............
...............................................+...............+.......................................................+...+++...................................+.................................+............+..............................+...................................................++...................................................+...............................................................................................................+.......+...+....................................+......+...+...+****************************************
Throughput 20.9269 MB/sec (NB&.1586 MB/sec 209.269 MBit/sec)
40 clients started
..........................................................................................................................................+.............................+..........+..............................................................................+............+...............................................+...................................................................+.......................+.........................................................................................................................++......+.........................................................................+.........+....+.......+...................................................+....+.............................................+....................................................+..........................................................+................+................................................................................................................................
.......................+.........+...............................................................+........................+.........................................................................+.....................................................................................................................................................................+.......+..+..........................+............................+................+................+.....+......+..........+...............+........+.....+.+****************************************
Throughput 21.0787 MB/sec (NB&.3483 MB/sec 210.787 MBit/sec)
40 clients started
.................................................................................................................................................................+......................+.+...................................+.......................................+...............................+........................................................................................+.........................................................+................................+...................................................................................................................++................+.................................+........................+........................+....................+.......................++..........................................................+......+.........................................+......................................................+...............................+.................................................................
..............+...................................................+......................................................................................................................................................................................................+.....................+......+...............................+................................................+..........................................+.......+......................................+..............................+...+.+.+............+.++****************************************
Throughput 21.6167 MB/sec (NB'.0208 MB/sec 216.167 MBit/sec)
andrea@laser:/mnt >

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/