You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucy.apache.org by goran kent <go...@gmail.com> on 2011/11/09 19:33:31 UTC
[lucy-user] LucyX::Remote::SearchServer concurrency
Hi,
I'm trying to anticipate possible issues and a thought occurred to me
while I was testing search-node caching: up until now
LucyX::Remote::SearchServer is only being hit by a single searcher,
me.
Looking at the code (and I'm no Perl guru) for
LucyX::Remote::SearchServer->serve(), I don't see any forking or other
multitasking mechanisms being used. Correct me if I'm miss-reading
the code, but doesn't that mean that serve() will block until it
finishes the current search -- ie, no concurrent searches?
Re: [lucy-user] LucyX::Remote::SearchServer concurrency
Posted by goran kent <go...@gmail.com>.
On Wed, Nov 9, 2011 at 8:41 PM, Marvin Humphrey <ma...@rectangular.com> wrote:
>> Correct me if I'm miss-reading
>> the code, but doesn't that mean that serve() will block until it
>> finishes the current search -- ie, no concurrent searches?
>
> Yes.
>
> FWIW, Searchers are cheap, because we rely heavily on the OS cache rather than
> dump stuff into process RAM. That aids with multi-process concurrency,
> because adding another worker is inexpensive.
ok, what's the recommended route to facilitate concurrent searches on
a remote search server? Rewrite LucyX/Remote/SearchServer.pm to fork
off a worker process for each new connection?
Right now off the top of my head I can't think of a way to wrap
LucyX/Remote/SearchServer.pm to achieve this.
Re: [lucy-user] LucyX::Remote::SearchServer concurrency
Posted by Marvin Humphrey <ma...@rectangular.com>.
On Wed, Nov 09, 2011 at 08:33:31PM +0200, goran kent wrote:
> Looking at the code (and I'm no Perl guru) for
> LucyX::Remote::SearchServer->serve(), I don't see any forking or other
> multitasking mechanisms being used. Correct me if I'm miss-reading
> the code, but doesn't that mean that serve() will block until it
> finishes the current search -- ie, no concurrent searches?
Yes.
FWIW, Searchers are cheap, because we rely heavily on the OS cache rather than
dump stuff into process RAM. That aids with multi-process concurrency,
because adding another worker is inexpensive.
Marvin Humphrey