Re: index build faster on 8G laptop than 30G server - Mailing list pgsql-general

From Tory M Blue
Subject Re: index build faster on 8G laptop than 30G server
Date
Msg-id CAEaSS0Zy5qqXwcUhhpuEBeJ5Pi8C5zZBCy3MmG+QqxqNQnOo3Q@mail.gmail.com
Whole thread Raw
In response to Re: index build faster on 8G laptop than 30G server  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On Tue, Apr 19, 2016 at 2:30 PM, John R Pierce <pierce@hogranch.com> wrote:
> On 4/19/2016 2:28 PM, Bill Ross wrote:
>>
>> I've been running an index build for almost an hour on my 30G server that
>> takes ~ 20 mins on my puny old macbook.
>>
>> It seems like I've tuned all I can.. what am I missing?
>
>
>
>
> maintenance_work_mem is the main thing that affects index building times, I
> didn't see that in your list of tuning parameters.    I generally set it to
> 1GB.
>
> --
> john r pierce, recycling bits in santa cruz
>
>
>
> --

I've got some indexes that take well over 7 hours to create on a
256GB machine. Last time I posted for help, I was told they have yet
to really fix the tuple issue and that using a tiny number in work_mem
helped allieviate some of the issues. Still takes a long time but i'm
at 512MB, no slower than 7GB+

Here is what was told to me before

"Yes. There is a hard limit on the number of tuples than can be sorted
in memory prior to PostgreSQL 9.4. It's also the case that very large
work_mem or maintenance_work_mem settings are unlikely to help unless
they result in a fully internal sort.

There is evidence that the heap that tuple sorting uses benefits from
*lower* settings. Sometimes as low as 64MB.

We're working to make this better in 9.6."

Tory


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: index build faster on 8G laptop than 30G server
Next
From: Scott Mead
Date:
Subject: Re: index build faster on 8G laptop than 30G server