OPAC Search too slow in Koha 18.05.05

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

OPAC Search too slow in Koha 18.05.05

Camilo Freire
Good afternoon. My name is Camilo Freire, from Montevideo, Uruguay.

I have a catalogue with around 280.000 bibliographic records in Koha
18.05.05. When I do some searches whose hit's number is about 14.000
records the time of search climbs from an average of 2 seconds per search
to 40 to 80 seconds around. I've a virtual machine with 6GB of RAM, with a
virtual Xeon of 2GHz.

Koha is making the OPAC search calling the function getRecords which is in
the lib/C4/Search.pm file. As I've seen this function first makes a call to
the ZOOM::search function and then makes an asynchronous loop for getting
the records (don't do that in ZOOM::search?) and facets, calling the
_ZOOM_event_function. The Zebra search in ZOOM::search is quite fast, and
takes no more than 0.3 seconds to perform the search. It seems that the
delay is in the asynchronous facets in the _ZOOM_event_loop function. Is
not clear to me what exactly the _ZOOM_event_loop is doing, apart from
retrieving the facets, which are not necessary for me.

Can I resolve in some way this problem, getting rid of the _ZOOM_event_loop
or installing other version? As a first step I've enabled plack, which is a
great help in speeding up the application but not in this case.

Thank you very much in advance.
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: OPAC Search too slow in Koha 18.05.05

Mark Tompsett
Greetings,

I don't promise to be right, but here are a couple thoughts:
1) You can use Zebra Facets -- there's a koha-conf.xml line in there
somewhere.
2) Also, do you have plack turned on? Plack increases response times
considerably.

GPML,
Mark Tompsett

_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: OPAC Search too slow in Koha 18.05.05

barton
Actually, if you have Zebra facets enabled, turn them *off*. I believe that
they're enabled by default, and they're dog slow.

Zebra is *very* disk IO intensive. Make sure that its temporary directory
is being written to the fastest drive you have.

If you have the QueryFuzzy or QueryStemming system preferences enabled, be
aware that they don't like single letter words such as "A" or "I" --
essentially, they end up trying to search for 'a*' or 'i*'; on a slow file
system they can entirely time out and not return any results. Those system
preferences *do* provide for easier searching -- disabling them means that
keywords have to be typed exactly as they are in the record, so there's a
trade-off between speed and user utility, but if the searches are too slow,
it might be worth looking into.

Finally, take a look at ElasticSearch. It isn't at feature-parity with
Zebra in 18.05, but it might be worth a look.

On Wed, Nov 7, 2018 at 6:23 PM Mark Tompsett <[hidden email]> wrote:

> Greetings,
>
> I don't promise to be right, but here are a couple thoughts:
> 1) You can use Zebra Facets -- there's a koha-conf.xml line in there
> somewhere.
> 2) Also, do you have plack turned on? Plack increases response times
> considerably.
>
> GPML,
> Mark Tompsett
>
> _______________________________________________
> Koha mailing list  http://koha-community.org
> [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: OPAC Search too slow in Koha 18.05.05

Cab Vinton
A couple follow up questions for you, Barton.

Are Zebra facets a general system preference? I see a few
facets-related preferences, but nothing specifically tied to Zebra.

We're still using Zebra in our system. Can you clarify what you mean
by ElasticSearch not yet being at feature-parity in 18.05?

We just upgraded to 18.05. Thoughts on staying w/ Zebra vs. switching
over to ES?

Many thanks in advance,

Cab Vinton
Plaistow Public Library
Plaistow, NH


On Thu, Nov 8, 2018 at 6:48 AM Barton Chittenden
<[hidden email]> wrote:

>
> Actually, if you have Zebra facets enabled, turn them *off*. I believe that
> they're enabled by default, and they're dog slow.
>
> Zebra is *very* disk IO intensive. Make sure that its temporary directory
> is being written to the fastest drive you have.
>
> If you have the QueryFuzzy or QueryStemming system preferences enabled, be
> aware that they don't like single letter words such as "A" or "I" --
> essentially, they end up trying to search for 'a*' or 'i*'; on a slow file
> system they can entirely time out and not return any results. Those system
> preferences *do* provide for easier searching -- disabling them means that
> keywords have to be typed exactly as they are in the record, so there's a
> trade-off between speed and user utility, but if the searches are too slow,
> it might be worth looking into.
>
> Finally, take a look at ElasticSearch. It isn't at feature-parity with
> Zebra in 18.05, but it might be worth a look.
>
> On Wed, Nov 7, 2018 at 6:23 PM Mark Tompsett <[hidden email]> wrote:
>
> > Greetings,
> >
> > I don't promise to be right, but here are a couple thoughts:
> > 1) You can use Zebra Facets -- there's a koha-conf.xml line in there
> > somewhere.
> > 2) Also, do you have plack turned on? Plack increases response times
> > considerably.
> >
> > GPML,
> > Mark Tompsett
> >
> > _______________________________________________
> > Koha mailing list  http://koha-community.org
> > [hidden email]
> > https://lists.katipo.co.nz/mailman/listinfo/koha
> >
> _______________________________________________
> Koha mailing list  http://koha-community.org
> [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

More on OPAC Search too slow in Koha 18.05.05

Camilo Freire
In reply to this post by Camilo Freire
With respect to my last post on problems in OPAC Search in Koha, I've found
that the problem is in the method  _get_facets_from_zebra called from the
method GetFacets of the class Search.pm. The asyncronous programming has
nothing to do with the problem.

Perhaps someone have had a similar problem or can help me about this.

Thanks in advance
Camilo Freire



---------- Forwarded message ---------
From: Camilo Freire <[hidden email]>
Date: mié., 7 nov. 2018 a las 20:09
Subject: OPAC Search too slow in Koha 18.05.05
To: <[hidden email]>


Good afternoon. My name is Camilo Freire, from Montevideo, Uruguay.

I have a catalogue with around 280.000 bibliographic records in Koha
18.05.05. When I do some searches whose hit's number is about 14.000
records the time of search climbs from an average of 2 seconds per search
to 40 to 80 seconds around. I've a virtual machine with 6GB of RAM, with a
virtual Xeon of 2GHz.

Koha is making the OPAC search calling the function getRecords which is in
the lib/C4/Search.pm file. As I've seen this function first makes a call to
the ZOOM::search function and then makes an asynchronous loop for getting
the records (don't do that in ZOOM::search?) and facets, calling the
_ZOOM_event_function. The Zebra search in ZOOM::search is quite fast, and
takes no more than 0.3 seconds to perform the search. It seems that the
delay is in the asynchronous facets in the _ZOOM_event_loop function. Is
not clear to me what exactly the _ZOOM_event_loop is doing, apart from
retrieving the facets, which are not necessary for me.

Can I resolve in some way this problem, getting rid of the _ZOOM_event_loop
or installing other version? As a first step I've enabled plack, which is a
great help in speeding up the application but not in this case.

Thank you very much in advance.
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: More on OPAC Search too slow in Koha 18.05.05

Jonathan Druart
Hola Camilo,

Take a look at the value of use_zebra_facets in your koha-conf.xml file.
If enabled, disable it (see bug 13665). You may also want to play with the
value of maxRecordsForFacets.

Saludos,
Jonathan

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13665


On Thu, 8 Nov 2018 at 19:35 Camilo Freire <[hidden email]> wrote:

> With respect to my last post on problems in OPAC Search in Koha, I've found
> that the problem is in the method  _get_facets_from_zebra called from the
> method GetFacets of the class Search.pm. The asyncronous programming has
> nothing to do with the problem.
>
> Perhaps someone have had a similar problem or can help me about this.
>
> Thanks in advance
> Camilo Freire
>
>
>
> ---------- Forwarded message ---------
> From: Camilo Freire <[hidden email]>
> Date: mié., 7 nov. 2018 a las 20:09
> Subject: OPAC Search too slow in Koha 18.05.05
> To: <[hidden email]>
>
>
> Good afternoon. My name is Camilo Freire, from Montevideo, Uruguay.
>
> I have a catalogue with around 280.000 bibliographic records in Koha
> 18.05.05. When I do some searches whose hit's number is about 14.000
> records the time of search climbs from an average of 2 seconds per search
> to 40 to 80 seconds around. I've a virtual machine with 6GB of RAM, with a
> virtual Xeon of 2GHz.
>
> Koha is making the OPAC search calling the function getRecords which is in
> the lib/C4/Search.pm file. As I've seen this function first makes a call to
> the ZOOM::search function and then makes an asynchronous loop for getting
> the records (don't do that in ZOOM::search?) and facets, calling the
> _ZOOM_event_function. The Zebra search in ZOOM::search is quite fast, and
> takes no more than 0.3 seconds to perform the search. It seems that the
> delay is in the asynchronous facets in the _ZOOM_event_loop function. Is
> not clear to me what exactly the _ZOOM_event_loop is doing, apart from
> retrieving the facets, which are not necessary for me.
>
> Can I resolve in some way this problem, getting rid of the _ZOOM_event_loop
> or installing other version? As a first step I've enabled plack, which is a
> great help in speeding up the application but not in this case.
>
> Thank you very much in advance.
> _______________________________________________
> Koha mailing list  http://koha-community.org
> [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha