From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <487F1917.9060406@gmx.de> Date: Thu, 17 Jul 2008 12:04:07 +0200 From: Kernel Panic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: <2125ed224c77c85fc13d81eb95377a2a@terzarima.net> In-Reply-To: <2125ed224c77c85fc13d81eb95377a2a@terzarima.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 8 cores Topicbox-Message-UUID: e97d6322-ead3-11e9-9d60-3106f5b1d025 Charles Forsyth wrote: >> I could imagine that databases use mmap() havily >> > > it's a little mystery for me why they would do that since it's slower (or ought to be), > because the trap path and fault recovery must do more work than syscall (perhaps much more). > it's also difficult then to optimise the replacement strategy for the application > without madvise calls (and you trust those implicitly?) but those are system calls that cost time. > > makes sense of course... but at least mysql uses mmap() for some table types as a caching mechanism. http://www.mysqlperformanceblog.com/2006/05/26/myisam-mmap-feature-51/ this may just be an exception and real databases use read()/write() syscalls and implement the caching themself. but where should i know... i dont need/use databases and have not looked at the sourcecode of one. cinap