Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EDCD0633687 for ; Wed, 16 Jun 2010 05:27:14 -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 02075-02 for ; Wed, 16 Jun 2010 08:27:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mail.postgresql.org (Postfix) with ESMTP id E58C4633038 for ; Wed, 16 Jun 2010 05:27:07 -0300 (ADT) Received: from [75.197.189.222] (222.sub-75-197-189.myvzw.com [75.197.189.222]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0M5c8C-1P8wOc3bDs-00xklv; Wed, 16 Jun 2010 10:27:03 +0200 Message-ID: <4C188AD4.20209@2ndquadrant.com> Date: Wed, 16 Jun 2010 04:27:00 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: "jgardner@jonathangardner.net" CC: pgsql-performance@postgresql.org Subject: Re: PostgreSQL as a local in-memory cache References: <87bpbcpabg.fsf@cbbrowne-laptop.afilias-int.info> <4C17A417.2040600@noao.edu> <87ocfcnqmk.fsf@cbbrowne-laptop.afilias-int.info> <4C180A3B.7090905@agliodbs.com> <4634b12c-749f-4605-9d95-121b8e2bd9e4@k17g2000pro.googlegroups.com> In-Reply-To: <4634b12c-749f-4605-9d95-121b8e2bd9e4@k17g2000pro.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19uWskU0qSDh+eXfloOVpdbzxA0BqSW2gdX8HV qKAEb9DSzWyRRvt4eyQPnymZ0UIEcwN1Lv8HyaHrqH14Mjja1V dYjX1d/G9BWObQ7ySMcovJz9SHYIeWU X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/282 X-Sequence-Number: 39138 jgardner@jonathangardner.net wrote: > NOTE: If I do one giant commit instead of lots of littler ones, I get > much better speeds for the slower cases, but I never exceed 5,500 > which appears to be some kind of wall I can't break through. > That's usually about where I run into the upper limit on how many statements Python can execute against the database per second. Between that and the GIL preventing better multi-core use, once you pull the disk out and get CPU bound it's hard to use Python for load testing of small statements and bottleneck anywhere except in Python itself. I normally just write little performance test cases in the pgbench scripting language, then I get multiple clients and (in 9.0) multiple driver threads all for free. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us