Discussion:
[Koha] OPAC Search too slow in Koha 18.05.05
Camilo Freire
2018-11-07 23:09:48 UTC
Permalink
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
***@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listi
Mark Tompsett
2018-11-07 23:22:47 UTC
Permalink
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
***@lists.katipo.co.nz
https://li
Barton Chittenden
2018-11-08 11:48:04 UTC
Permalink
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.
Post by Mark Tompsett
Greetings,
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
https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
https://lists.katipo.co.nz/mai
Cab Vinton
2018-11-08 17:12:23 UTC
Permalink
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
Post by Barton Chittenden
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.
Post by Mark Tompsett
Greetings,
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
https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org
https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/lis
Camilo Freire
2018-11-08 22:35:03 UTC
Permalink
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 <***@gmail.com>
Date: miƩ., 7 nov. 2018 a las 20:09
Subject: OPAC Search too slow in Koha 18.05.05
To: <***@lists.katipo.co.nz>


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.

Loading...