X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 786D69DC993 for ; Tue, 27 Dec 2005 17:18:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90430-08 for ; Tue, 27 Dec 2005 17:18:26 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 573139DCA50 for ; Tue, 27 Dec 2005 17:18:23 -0400 (AST) Received: from mail.jobflash.com (oncallweb2.jobflash.com [64.62.211.41]) by svr4.postgresql.org (Postfix) with ESMTP id 76A735AF078 for ; Tue, 27 Dec 2005 21:18:25 +0000 (GMT) Received: from [192.168.255.194] (adsl-71-134-28-177.dsl.pltn13.pacbell.net [71.134.28.177]) by mail.jobflash.com (Postfix) with ESMTP id 1BD19420E5; Tue, 27 Dec 2005 13:18:23 -0800 (PST) Message-ID: <43B1AEFB.6030802@jobflash.com> Date: Tue, 27 Dec 2005 13:15:39 -0800 From: Tom Arthurs User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jim C. Nasby" Cc: Dan Austin , pgsql-admin@postgresql.org Subject: Re: Pgstat.tmp file activity References: <20051227210844.GP72143@pervasive.com> In-Reply-To: <20051227210844.GP72143@pervasive.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/328 X-Sequence-Number: 20048 From http://docs.sun.com/source/817-1836-10/perfplat.html High File System Page-in Rate If you are seeing high file system page-in rates on Solaris 8 or 9, you may benefit from increasing the value of segmap_percent. This parameter is set by adding the following line to the /etc/system file: set segmap_percent=25 segmap_percent adjusts the percentage of memory that the kernel will map into its address space for the file system cache. The default value is 12; that is, the kernel will reserve enough space to map at most 12% of memory for the file system cache. On a heavily loaded machine with 4 GB of physical memory, improvements have been seen with values as high as 60. You should experiment with this value, starting with values around 25. On systems with large amounts of physical memory, you should raise this value in small increments, as it can significantly increase kernel memory requirements. ==================================== I think this can also be set with the kernel debugger. I keep it at 50% on my E3500 and E4500 systems (8 and 12 GB memory). Jim C. Nasby wrote: >On Fri, Dec 23, 2005 at 04:50:32PM +1100, Dan Austin wrote: > > >>>[...] >>>Right, the file is fully written under a temp name, and then >>>rename()'d >>> >>> >>This makes sense and is almost certainly not the cause of the problem. >>Although there is a lot more data being written to that file than I >>would have thought. >> >>One of Sun's kernel engineers has come up with a solution that seems to >>have fixed the problem. Instead of increasing work_mem (which we still >>might do) we've mounted a swapfs partition over the pg temp directory: >> >> # mount | grep pgsql_tmp >> /export/data/pgsql/data/base/64920741/pgsql_tmp on swap [...] >> >>This has actually reduced the disk activity considerably. So far, the >>blocking problem seems to have gone. >> >>Now to find some Postgres DBAs in Sydney to do some review / tuning of >>our memory settings. :-) >> >> > >Note also that Solaris by default limits the amount of memory used for >disk caching, which is Not Good for PostgreSQL. IIRC this can be changed >with a sysctl, but I don't recall the details off-hand. > >