Skip site navigation (1) Skip section navigation (2)

Re: pgbench could not send data to client: Broken pipe

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "David Kerr" <dmk(at)mr-paradox(dot)net>
Cc: "Greg Smith" <greg(at)2ndquadrant(dot)com>, <pgsql-performance(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pgbench could not send data to client: Broken pipe
Date: 2010-09-08 21:51:17
Message-ID: 4C87BF0502000025000353BE@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-performance
David Kerr <dmk(at)mr-paradox(dot)net> wrote:
 
> Hmm, i'm not following you. I've got 48 cores. that means my
> sweet-spot active connections would be 96.
 
Plus your effective spindle count.  That can be hard to calculate,
but you could start by just counting spindles on your drive array.
 
> Now if i were to connection pool that out to 15 people per
> connection,
 
Where did you get that number?  We routinely route hundreds of
requests per second (many of them with 10 or 20 joins) from five or
ten thousand connected users through a pool of 30 connections.  It
started out bigger, we kept shrinking it until we hit our sweet
spot.  The reason we started bigger is we've got 40 spindles to go
with the 16 cores, but the active portion of the database is cached,
which reduces our effective spindle count to zero.
 
> that's 1440 users "total" able to use my app at one time. (with
> only 96 actually doing anything). not really great for a web-based
> app that will have millions of users accessing it when we're fully
> ramped up.
 
Once you have enough active connections to saturate the resources,
adding more connections just adds contention for resources and
context switching cost -- it does nothing to help you service more
concurrent users.  The key is, as I mentioned before, to have the
pooler queue requests above the limit and promptly get them running
as slots are freed.
 
-Kevin

In response to

Responses

pgsql-performance by date

Next:From: David KerrDate: 2010-09-08 22:00:11
Subject: Re: pgbench could not send data to client: Broken pipe
Previous:From: David KerrDate: 2010-09-08 21:20:56
Subject: Re: pgbench could not send data to client: Broken pipe

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group