From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Chris <dmagick(at)gmail(dot)com> |
Cc: | Robert James <srobertjames(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Will Postgres ever lock with read only queries? |
Date: | 2009-07-28 01:40:36 |
Message-ID: | 1657.1248745236@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Chris <dmagick(at)gmail(dot)com> writes:
> Robert James wrote:
>> Hi. I'm seeing some weird behavior in Postgres. I'm running read only
>> queries (SELECT that is - no UPDATE or DELETE or INSERT is happening at
>> all). I can run one rather complicated query and the results come
>> back... eventually. Likewise with another. But, when I run both
>> queries at the same time, Postgres seems to ground to a halt.
> They're probably not blocking each other but more likely you're
> exhausting your servers resources. If they return "eventually"
> individually, then running both at the same time will take at least
> "eventually x2".
It could be a lot more than x2. If the two queries together eat enough
RAM to drive the machine into swapping, where it didn't swap while
doing one at a time, the slowdown could be orders of magnitude.
Watching vmstat output might be informative --- it would at least give
an idea if the bottleneck is CPU, I/O, or swap.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Wakeling | 2009-07-28 09:45:01 | Re: hyperthreaded cpu still an issue in 8.4? |
Previous Message | Chris | 2009-07-28 01:21:01 | Re: Will Postgres ever lock with read only queries? |