Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5FD2F9FA47C for ; Mon, 16 Oct 2006 17:30:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 39474-03 for ; Mon, 16 Oct 2006 20:30:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.197]) by postgresql.org (Postfix) with ESMTP id 551FC9FA2CC for ; Mon, 16 Oct 2006 17:30:30 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id i11so640958nzi for ; Mon, 16 Oct 2006 13:30:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LSOCcZeOklStbBAscgm/3piCEnNJvib0EyAeIODwvNuQna1ixg8SLO0B2rupIWy1Cy/uSB9B7BHTrNlnm2ye3p107RbS8ttJJUXPQEZy1X+VhnRjtqrXSiGyDd56KfgAbZal2AsPn+DGBYAfioeGIuaKzX1kBpXv25xR58yojvE= Received: by 10.35.88.18 with SMTP id q18mr13592986pyl; Mon, 16 Oct 2006 13:30:28 -0700 (PDT) Received: by 10.35.33.2 with HTTP; Mon, 16 Oct 2006 13:30:27 -0700 (PDT) Message-ID: <7be3f35d0610161330r4df390f2uecf8d411c861911c@mail.gmail.com> Date: Mon, 16 Oct 2006 22:30:27 +0200 From: "Harald Armin Massa" To: "Magnus Hagander" Subject: Re: measuring shared memory usage on Windows Cc: pgsql-performance@postgresql.org In-Reply-To: <6BCB9D8A16AC4241919521715F4D8BCEA357F5@algol.sollentuna.se> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7be3f35d0610160518h649c8f20pee9949a90796c346@mail.gmail.com> <6BCB9D8A16AC4241919521715F4D8BCEA357F5@algol.sollentuna.se> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/304 X-Sequence-Number: 21433 Magnus, > That shows that you don't really know how the memory manager in NT+ > works ;-) *ALL* normal file I/O is handled through the memory manager > :-) So yes, they are both different access methods to the memory > manager, really. "don't really" is a overstatement, I do not know at all how the memory manager works in NT+. All I learned is "Inside Windows NT" of H. Custer from 1993 :) So, just to make sure I understood correctly: If PostgreSQL reads a file from disk, Windows NT does this file I/O though the same memory manager than when PostgreSQL puts parts of this read file [for example an index segment] into shared memory - which is nothing but a file, that usually stays in main memory. Correct so far? I continued from this thoughts: lets say there is 500MB memory available, we have 100MB of shared_memory configured. Now PostgreSQL reads 100MB from a file - memory manager takes 100MB memory to fullfill this file access (optimizations aside) Now PostgreSQL reshuffles that 100MB and decides: "hmmmm, that may be valuable for ALL of the currently running postgres.exe" and pushes those 100MB into shared memory for all to use. It caches the 100MB - a fine chunk of an index.