Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.37.53]) by hub.org (8.8.8/8.7.5) with SMTP id SAA28857 for ; Tue, 14 Apr 1998 18:26:18 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.10/8.1B) with SMTP id PAA14489; Tue, 14 Apr 1998 15:25:53 -0700 Message-Id: <199804142225.PAA14489@faerie.CS.Berkeley.EDU> X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol From: aoki@CS.Berkeley.EDU (Paul M. Aoki) To: pgsql-hackers@hub.org (hackers-digest) Cc: wollman@khavrinen.lcs.mit.edu Subject: Re: [HACKERS] Safe/Fast I/O ... Reply-To: aoki@CS.Berkeley.EDU (Paul M. Aoki) In-reply-to: Your message of Tue, 14 Apr 1998 11:28:02 -0400 (EDT) <199804141528.LAA09003@hub.org> Date: Tue, 14 Apr 98 15:25:47 -0700 Sender: aoki@postgres.Berkeley.EDU X-Mts: smtp > Date: Mon, 13 Apr 1998 12:26:59 -0400 (EDT) > From: Garrett Wollman > Subject: Re: [HACKERS] Safe/Fast I/O ... > > [Please forgive me for the way this post is put together; I'm not > actually on your mailing-list, but was just perusing the archives.] > if your operating system is at all reasonable, using > memory mapping allows you to take advantage of all the work that has > gone into tuning your VM system. If you map a large file, and then > access in some way that shows reasonable locality, the VM system will > probably be able to do a better job of page replacement on a > system-wide basis than you could do with a cache built into your > application. not necessarily. in this case, the application (the database) has several very different page access patterns, some of which (e.g., non-boustrophedonic nested-loops join, index leaf accesses) *do not* exhibit reasonable locality and therefore benefit from the ability to turn on hate-hints or MRU paging on a selective basis. database query processing is one of the classic examples why "one size does not fit all" when it comes to page replacement -- no amount of "tuning" of an LRU/clock algorithm will help if the access pattern is wrong. stonebraker's 20-year-old CACM flame on operating system services for databases has motivated a lot of work, e.g., microkernel external pagers and the more recent work at stanford and princeton on application-specific paging, but many older VM systems still don't have a working madvise().. meaning that a *portable* database still has to implement its own buffer cache if it wants to exploit its application-specific paging behavior. -- Paul M. Aoki | University of California at Berkeley aoki@CS.Berkeley.EDU | Dept. of EECS, Computer Science Division #1776 | Berkeley, CA 94720-1776