Re: WIP: shared ispell dictionary

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: WIP: shared ispell dictionary
Date: 2010-03-18 11:45:55
Message-ID: 4BA21273.5090600@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule wrote:
> attached patch add possibility to share ispell dictionary between
> processes. The reason for this is the slowness of first tsearch query
> and size of allocated memory per process. When I tested loading of
> ispell dictionary (for Czech language) I got about 500 ms and 48MB.
> With simple allocator it uses only 25 MB. If we remove some check and
> tolower string transformation from loading stage it needs only 200 ms.
> But with broken dict or affix file it can put wrong results. This
> patch significantly reduce load on servers that use ispell
> dictionaries.
>
> I know so Tom worries about using of share memory. I think so it
> unnecessarily. After loading data from dictionary are only read, never
> modified. Second idea - this dictionary template can be distributed as
> separate project (it needs a few changes in core - and simple
> allocator).

Fixed-size shared memory blocks are always problematic. Would it be
possible to do the preloading with shared_preload_libraries somehow?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-03-18 12:06:04 Re: WIP: shared ispell dictionary
Previous Message Gokulakannan Somasundaram 2010-03-18 11:11:45 Re: An idle thought