Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id F251DB5DBE9 for ; Fri, 1 Jul 2011 12:54:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 40887-04 for ; Fri, 1 Jul 2011 15:54:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mail.postgresql.org (Postfix) with ESMTP id 5E684B5DBD0 for ; Fri, 1 Jul 2011 12:54:11 -0300 (ADT) Received: from [192.168.1.7] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0Mbo1J-1QspLr0Uqr-00J40T; Fri, 01 Jul 2011 17:54:10 +0200 Message-ID: <4E0DEDA1.3090806@2ndQuadrant.com> Date: Fri, 01 Jul 2011 11:54:09 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110505 Icedove/3.0.11 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Infinite Cache References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:2t6AcIWAtvsci36fcYraFd54EA3mWxCibUPLQYRl4qq HhJqIADn30nw1FS/ZtLkqwDDZ7zyBcmdbwlqOIhw+tuMSjsqAX /Y7XzNk7yUK5LhKsnFGVAsOnHvNtdfo0ZFUu/Hx9aUkdDZkxq8 rt2D6HPfQyqOKhNYKuScFjaKcHekOd762p5yMVzPORhyiEMAbf emCkvt8kw2EIJDleWXvqgRAOB5zggyFmSQQnBUY2oE= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201107/3 X-Sequence-Number: 44215 On 07/01/2011 10:43 AM, Anthony Presley wrote: > Was curious if there was some sort of Open Source version of Infinite > Cache, and/or a memcache layer that can be "dropped" in front of > PostgreSQL without application changes (which seems to be the "key" > piece of Infinite Cache), or is this something that EnterpriseDB owns > and you have to buy their version of the software to use? The best solution available for this class of problem is pgmemcache: http://pgfoundry.org/projects/pgmemcache/ There's not too much documentation about it around, but you'll find an intro talk at http://projects.2ndquadrant.com/char10 I found helpful when Hannu presented it. It does take some work to utilize, including application code changes. The hardest part of which is usually making sure the key hashing scheme it uses to identify re-usable queries is useful to you. And that isn't always the case. This approach scales better than "Infinite Cache" because you can move the whole mess onto another server optimized to be a caching system. Those systems have a very different set of trade-offs and correspondingly economics than a database server must have. The cache system can be a cheap box with a bunch of RAM, that's it. And the read traffic it avoids passing to the server really doesn't touch the database at all, which is way better than going to the database but being serviced quickly. Everyone would prefer performance improvements that don't involve any modification of their application. The unfortunate reality of database design is that any server tuning can only provide a modest gain; if you make things twice as fast you've done a great job. Whereas when doing application redesign for better performance, I aim for a 10X speedup and often do much better than that. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD Comprehensive and Customized PostgreSQL Training Classes: http://www.2ndquadrant.us/postgresql-training/