Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1CFE364FD15 for ; Thu, 4 Sep 2008 16:24:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65391-08 for ; Thu, 4 Sep 2008 16:24:29 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id C79CD64FCEF for ; Thu, 4 Sep 2008 16:24:26 -0300 (ADT) Received: (qmail invoked by alias); 04 Sep 2008 19:24:20 -0000 Received: from pD9E83BEA.dip.t-dialin.net (EHLO [192.168.2.50]) [217.232.59.234] by mail.gmx.net (mp007) with SMTP; 04 Sep 2008 21:24:20 +0200 X-Authenticated: #7655942 X-Provags-ID: V01U2FsdGVkX1/RlqVJE7LRjmwqeAO7Rlyd7fe/qZ3aFJwSI4NK8+ b0aAIXV4ZIwOze Message-ID: <48C035E2.3070407@gmx.net> Date: Thu, 04 Sep 2008 21:24:18 +0200 From: Ulrich User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: More shared_buffers instead of effective_cache_size? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.59 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/59 X-Sequence-Number: 31372 Hi, I have a virtual server with 256 MB of RAM. I am using it as a webserver, mailserver and for postgres. So there is something like 150MB left for postgres. Here are my configs (I haven't benchmarked...) max_connections = 12 (I think, I will not have more parallel connections, because I only have 10 PHP worker threads) shared_buffers = 24MB work_mem = 1MB maintenance_work_mem = 16MB (effective_cache_size = 80MB) Normally, the file-cache is part of the free ram. But on my virtual server, it looks like if there is one big file cache for the whole hardware node and I do not have my own reserved cached, so it is not easy to find a good value for effective_cache_size. I've also benchmarked the file-cache using dd (100MB file) 1. Read from HDD: 104857600 bytes (105 MB) copied, 8.38522 seconds, 12.5 MB/s 2. Read from Cache: 104857600 bytes (105 MB) copied, 3.48694 seconds, 30.1 MB/s That is really really slow (10 times slower than on my other machine). What would you do now? Increasing shared_buffers to 100MB and setting effective_cache_size to 0MB? Or increasing effective_cache_size, too? Thanks for help. Regards, -Ulrich