Re: Parallel Seq Scan
От | Thom Brown |
---|---|
Тема | Re: Parallel Seq Scan |
Дата | |
Msg-id | CAA-aLv7iGpu0gF3HMbKTLMEGEsSJDbi9up2COvsbAjr7Oj=ONQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Parallel Seq Scan (Amit Kapila <amit.kapila16@gmail.com>) |
Список | pgsql-hackers |
On 2 January 2015 at 11:13, Amit Kapila <amit.kapila16@gmail.com> wrote:
On Fri, Jan 2, 2015 at 4:09 PM, Thom Brown <thom@linux.com> wrote:
>
> On 1 January 2015 at 10:34, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>
>> > Running it again, I get the same issue. This is with parallel_seqscan_degree set to 8, and the crash occurs with 4 and 2 too.
>> >
>> > This doesn't happen if I set the pgbench scale to 50. I suspect this is a OOM issue. My laptop has 16GB RAM, the table is around 13GB at scale 100, and I don't have swap enabled. But I'm concerned it crashes the whole instance.
>> >
>>
>> Isn't this a backend crash due to OOM?
>> And after that server will restart automatically.
>
>
> Yes, I'm fairly sure it is. I guess what I'm confused about is that 8 parallel sequential scans in separate sessions (1 per session) don't cause the server to crash, but in a single session (8 in 1 session), they do.
>
It could be possible that master backend retains some memoryfor longer period which causes it to hit OOM error, by the wayin your test does always master backend hits OOM or is itrandom (either master or worker)
Just ran a few tests, and it appears to always be the master that hits OOM, or at least I don't seem to be able to get an example of the worker hitting it.
>
> Will there be a GUC to influence parallel scan cost? Or does it take into account effective_io_concurrency in the costs?
>> And will the planner be able to decide whether or not it'll choose to use background workers or not? For example:
>
Yes, we are planing to introduce cost model for parallelcommunication (there is some discussion about the sameupthread), but it's still not there and that's why youare seeing it to choose parallel plan when it shouldn't.Currently in patch, if you set parallel_seqscan_degree, itwill most probably choose parallel plan only.
Ah, okay. Great.
Thanks.
Thanks.
Thom
В списке pgsql-hackers по дате отправления: