Solr cache clear

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

Solr cache clear

Rajdeep Sahoo
Hi all,
Without restarting is it possible to clear the cache?
Reply | Threaded
Open this post in threaded view
|

Re: Solr cache clear

Shawn Heisey-2
On 11/20/2018 9:25 AM, Rajdeep Sahoo wrote:
> Hi all,
> Without restarting is it possible to clear the cache?

You'll need to clarify what cache you're talking about, but I think for
the most part that if you reload the core (or collection if running
SolrCloud) that all caches should be rebuilt empty.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: Solr cache clear

Erick Erickson
Why would you want to? This  sounds like an XY problem, there's some
problem you think would be cured by clearing the cache. What is
that problem?

Because I doubt this would do anything useful, pretty soon the caches
would be filled up again and you'd be right  back where you started and
the real solution is to stop doing whatever you're doing that leads to
whatever the real problem is. Maybe reducing the cache sizes.

Best,
Erick
On Tue, Nov 20, 2018 at 9:05 AM Shawn Heisey <[hidden email]> wrote:

>
> On 11/20/2018 9:25 AM, Rajdeep Sahoo wrote:
> > Hi all,
> > Without restarting is it possible to clear the cache?
>
> You'll need to clarify what cache you're talking about, but I think for
> the most part that if you reload the core (or collection if running
> SolrCloud) that all caches should be rebuilt empty.
>
> Thanks,
> Shawn
>
Reply | Threaded
Open this post in threaded view
|

Re: Solr cache clear

Edward Ribeiro
Disabling or reducing autowarming can help too, in addition to cache size
reduction.

Edward

Em ter, 20 de nov de 2018 17:29, Erick Erickson <[hidden email]
escreveu:

> Why would you want to? This  sounds like an XY problem, there's some
> problem you think would be cured by clearing the cache. What is
> that problem?
>
> Because I doubt this would do anything useful, pretty soon the caches
> would be filled up again and you'd be right  back where you started and
> the real solution is to stop doing whatever you're doing that leads to
> whatever the real problem is. Maybe reducing the cache sizes.
>
> Best,
> Erick
> On Tue, Nov 20, 2018 at 9:05 AM Shawn Heisey <[hidden email]> wrote:
> >
> > On 11/20/2018 9:25 AM, Rajdeep Sahoo wrote:
> > > Hi all,
> > > Without restarting is it possible to clear the cache?
> >
> > You'll need to clarify what cache you're talking about, but I think for
> > the most part that if you reload the core (or collection if running
> > SolrCloud) that all caches should be rebuilt empty.
> >
> > Thanks,
> > Shawn
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Solr cache clear

Rajdeep Sahoo
Hi all,
The problem is that we are using master slave solr configuration and for
similar type of query  sometime it is taking 512 ms and sometime it is 29
ms . we are observing this issue since the query modification. As part of
modification we have reduced a large no of facet.field param. In
solrconfig.xml file we have changed the cache size and reloaded the the
cores as part of this modification.
     Reloading cores is not clearing the cache. Is there any reason why we
are getting this much of difference in response time for similar type of
queries.
On Nov 21, 2018 4:16 AM, "Edward Ribeiro" <[hidden email]> wrote:

> Disabling or reducing autowarming can help too, in addition to cache size
> reduction.
>
> Edward
>
> Em ter, 20 de nov de 2018 17:29, Erick Erickson <[hidden email]
> escreveu:
>
> > Why would you want to? This  sounds like an XY problem, there's some
> > problem you think would be cured by clearing the cache. What is
> > that problem?
> >
> > Because I doubt this would do anything useful, pretty soon the caches
> > would be filled up again and you'd be right  back where you started and
> > the real solution is to stop doing whatever you're doing that leads to
> > whatever the real problem is. Maybe reducing the cache sizes.
> >
> > Best,
> > Erick
> > On Tue, Nov 20, 2018 at 9:05 AM Shawn Heisey <[hidden email]>
> wrote:
> > >
> > > On 11/20/2018 9:25 AM, Rajdeep Sahoo wrote:
> > > > Hi all,
> > > > Without restarting is it possible to clear the cache?
> > >
> > > You'll need to clarify what cache you're talking about, but I think for
> > > the most part that if you reload the core (or collection if running
> > > SolrCloud) that all caches should be rebuilt empty.
> > >
> > > Thanks,
> > > Shawn
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Solr cache clear

Shawn Heisey-2
On 11/21/2018 8:36 AM, Rajdeep Sahoo wrote:
> The problem is that we are using master slave solr configuration and for
> similar type of query  sometime it is taking 512 ms and sometime it is 29
> ms . we are observing this issue since the query modification. As part of
> modification we have reduced a large no of facet.field param. In
> solrconfig.xml file we have changed the cache size and reloaded the the
> cores as part of this modification.
>       Reloading cores is not clearing the cache. Is there any reason why we
> are getting this much of difference in response time for similar type of
> queries.

What *SPECIFIC* evidence do you have that reloading the cores isn't
emptying caches?  Have you gone into plugins/stats and checked to see
what the current cache sizes are?

Often when a query fully utilizes Solr's caches, it will return in one
or two milliseconds.  A 29 millisecond query time probably means that
the result did NOT come from Solr's caches, unless the machine is
particularly slow.

The cache that is likely affecting query performance in your case is not
part of Solr at all -- it's the operating system.  All modern operating
systems use unallocated memory to cache any data on disk that has been
read or written.  Solr is highly reliant on this OS feature for good
performance -- if you do not have extra memory not allocated to
programs, Solr performance is probably going to be very bad.

https://wiki.apache.org/solr/SolrPerformanceProblems#RAM

Thanks,
Shawn