X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 085BFD78F8 for ; Wed, 24 Aug 2005 13:57:00 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62000-06 for ; Wed, 24 Aug 2005 16:56:55 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by svr1.postgresql.org (Postfix) with ESMTP id 50CC7D7833 for ; Wed, 24 Aug 2005 13:56:54 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 8so85104nzo for ; Wed, 24 Aug 2005 09:56:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=gMKjZvIOlGpCuVmiCnaTfbNwP5PX+4gVkP14bo3lpZWWoblAYpM2CGLD2oKtKPVnod7P8oJ5yQKGbwT9Ox6fVAzsbPreHYq2h0xvoWnhuzCJJUDLPmXZexHGZ8ZOe4PM4KDNeum/g7sSxewke70xbUT9H3KKGy6qiexSEevpxek= Received: by 10.36.74.13 with SMTP id w13mr3206721nza; Wed, 24 Aug 2005 09:56:54 -0700 (PDT) Received: by 10.36.24.2 with HTTP; Wed, 24 Aug 2005 09:56:54 -0700 (PDT) Message-ID: <1d219a6f05082409563775a8a7@mail.gmail.com> Date: Wed, 24 Aug 2005 12:56:54 -0400 From: Chris Hoover To: pgsql-performance@postgresql.org Subject: Some ideas for comment Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 required=5 tests=[RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/393 X-Sequence-Number: 14140 Ok, there is always a lot of talk about tuning PostgreSQL on linux and how PostgreSQL uses the linux kernel cache to cache the tables and indexes. My question is, is there anyway to see what files linux is caching at this moment? My reasoning behind this question is: I have several database systems each with 1 PostgreSQL cluster.=20 However, each cluster has a large number of identical databases on it. Since there can be a great amount of size disparity between the databases, I am wondering if some of slowness we see might be caused by the kernel cache having to reload a lot of data that keeps getting swapped out. (most systems have at least 100GB of data/indexes on them with 8 or 12GB ram). If this is the case, what sort of symptoms would you expect? To help mitigate this potential, I have been researching the following, and am thinking of proposing it to management. Any comments would be appreciated. 1. Implement a partition type layout using views and rules - This will allow me to have one table in each view with the "active" data, and the inactive data stored by year in other tables. So I would have the following (for each major table): Table View as select * from active_table union all=20 select * from table_2005 union all select * from table_2004 etc. Each table would have identical indexes, however only the "active_table" would have data that is actively being worked. The rules and a nightly job can keep the data correctly stored. I am thinking that with this setup, the active table indexes should almost always be in memory. And, if they do happen to be pushed out, they are much smaller than the indexes I have today (where all data is in one table), so they should load faster with less i/o pressure.