From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 16 Sep 2001 14:34:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 16 Sep 2001 14:34:19 -0400 Received: from penguin.e-mind.com ([195.223.140.120]:25360 "EHLO penguin.e-mind.com") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Sun, 16 Sep 2001 14:34:08 -0400 Date: Sun, 16 Sep 2001 20:34:14 +0200 From: Andrea Arcangeli To: Tonu Samuel Cc: Linus Torvalds , linux-kernel@vger.kernel.org Subject: vm rewrite ready [Re: broken VM in 2.4.10-pre9] Message-ID: <20010916203414.B1315@athlon.random> In-Reply-To: <9o1dev$23l$1@penguin.transmeta.com> <1000722338.14005.0.camel@x153.internalnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <1000722338.14005.0.camel@x153.internalnet>; from tonu@please.do.not.remove.this.spam.ee on Mon, Sep 17, 2001 at 06:25:38PM +0800 X-GnuPG-Key-URL: http://e-mind.com/~andrea/aa.gnupg.asc X-PGP-Key-URL: http://e-mind.com/~andrea/aa.asc Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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