Re: Is Solr cache cleared when I restart Solr?
I did change the JVM heap size from 16GB to 24GB. Will that make a difference? Regards, Edwin On 28 January 2016 at 22:10, Alessandro Benedettiwrote: > As already specified you need to distinguish between Solr Cache and OS > Memory mapped files. > What you should clearly notice in your situation is an increase of space > for the OS Memory mapped files. > Which means faster access to index segments ( almost all the different data > structures are memory mapped ). > > Related the internal Solr Cache, if you haven't changed the java memory > properties, I would expect not that much difference. > If you were on a virtual machine sharing physical memory with other virtual > instances, you could find benefits on the other hand. > > Cheers > > > On 28 January 2016 at 05:44, Zheng Lin Edwin Yeo > wrote: > > > Thanks Erick and Shawn for your reply. > > > > We have recently upgraded the server RAM from 64MB to 192MB, and I > noticed > > that this caching occurs after we upgraded the RAM. Previously, the cache > > may not even be preserved in the same Solr session. > > So is it true that the upgrading of the server RAM creates enough spare > > memory for good caching? > > > > Regards, > > Edwin > > > > > > On 28 January 2016 at 12:27, Shawn Heisey wrote: > > > > > On 1/27/2016 8:11 PM, Zheng Lin Edwin Yeo wrote: > > > > I would like to find out, is the cache in the Solr cleared when I > shut > > > down > > > > the Solr instant and restart it? > > > > > > > > I am suspecting that the cache is not entirely cleared, because when > I > > > try > > > > to do a search on the same query as I did before the search, it still > > > has a > > > > return QTime that is much faster than the initial search. However, > > when I > > > > do a search on a new query, the return QTime is the original speed. > > > > > > > > I am using Solr 5.4.0, and this is my setting for the > queryResultCache. > > > > > > > > > > > size="1024" > > > > initialSize="512" > > > > autowarmCount="0"/> > > > > > > The Solr caches are maintained in the Java heap, which is lost when > Java > > > stops. > > > > > > Although the Solr caches are not preserved across a restart, the > > > operating system does cache actual index data in main memory, so when > > > Solr asks for the same index data off of the disk again, it is pulled > > > directly from RAM, which is a LOT faster than the disk. In order to > > > deliver good performance, Solr is extremely reliant on this built-in > > > feature of all modern operating systems, so there must be enough spare > > > memory for good caching. > > > > > > Here are a couple of pages with some more detail: > > > > > > https://wiki.apache.org/solr/SolrPerformanceProblems > > > https://en.wikipedia.org/wiki/Page_cache > > > > > > Thanks, > > > Shawn > > > > > > > > > > > > -- > -- > > Benedetti Alessandro > Visiting card : http://about.me/alessandro_benedetti > > "Tyger, tyger burning bright > In the forests of the night, > What immortal hand or eye > Could frame thy fearful symmetry?" > > William Blake - Songs of Experience -1794 England >
Re: Is Solr cache cleared when I restart Solr?
As already specified you need to distinguish between Solr Cache and OS Memory mapped files. What you should clearly notice in your situation is an increase of space for the OS Memory mapped files. Which means faster access to index segments ( almost all the different data structures are memory mapped ). Related the internal Solr Cache, if you haven't changed the java memory properties, I would expect not that much difference. If you were on a virtual machine sharing physical memory with other virtual instances, you could find benefits on the other hand. Cheers On 28 January 2016 at 05:44, Zheng Lin Edwin Yeowrote: > Thanks Erick and Shawn for your reply. > > We have recently upgraded the server RAM from 64MB to 192MB, and I noticed > that this caching occurs after we upgraded the RAM. Previously, the cache > may not even be preserved in the same Solr session. > So is it true that the upgrading of the server RAM creates enough spare > memory for good caching? > > Regards, > Edwin > > > On 28 January 2016 at 12:27, Shawn Heisey wrote: > > > On 1/27/2016 8:11 PM, Zheng Lin Edwin Yeo wrote: > > > I would like to find out, is the cache in the Solr cleared when I shut > > down > > > the Solr instant and restart it? > > > > > > I am suspecting that the cache is not entirely cleared, because when I > > try > > > to do a search on the same query as I did before the search, it still > > has a > > > return QTime that is much faster than the initial search. However, > when I > > > do a search on a new query, the return QTime is the original speed. > > > > > > I am using Solr 5.4.0, and this is my setting for the queryResultCache. > > > > > > > > size="1024" > > > initialSize="512" > > > autowarmCount="0"/> > > > > The Solr caches are maintained in the Java heap, which is lost when Java > > stops. > > > > Although the Solr caches are not preserved across a restart, the > > operating system does cache actual index data in main memory, so when > > Solr asks for the same index data off of the disk again, it is pulled > > directly from RAM, which is a LOT faster than the disk. In order to > > deliver good performance, Solr is extremely reliant on this built-in > > feature of all modern operating systems, so there must be enough spare > > memory for good caching. > > > > Here are a couple of pages with some more detail: > > > > https://wiki.apache.org/solr/SolrPerformanceProblems > > https://en.wikipedia.org/wiki/Page_cache > > > > Thanks, > > Shawn > > > > > -- -- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
Re: Is Solr cache cleared when I restart Solr?
On 1/27/2016 8:11 PM, Zheng Lin Edwin Yeo wrote: > I would like to find out, is the cache in the Solr cleared when I shut down > the Solr instant and restart it? > > I am suspecting that the cache is not entirely cleared, because when I try > to do a search on the same query as I did before the search, it still has a > return QTime that is much faster than the initial search. However, when I > do a search on a new query, the return QTime is the original speed. > > I am using Solr 5.4.0, and this is my setting for the queryResultCache. > > size="1024" > initialSize="512" > autowarmCount="0"/> The Solr caches are maintained in the Java heap, which is lost when Java stops. Although the Solr caches are not preserved across a restart, the operating system does cache actual index data in main memory, so when Solr asks for the same index data off of the disk again, it is pulled directly from RAM, which is a LOT faster than the disk. In order to deliver good performance, Solr is extremely reliant on this built-in feature of all modern operating systems, so there must be enough spare memory for good caching. Here are a couple of pages with some more detail: https://wiki.apache.org/solr/SolrPerformanceProblems https://en.wikipedia.org/wiki/Page_cache Thanks, Shawn
Re: Is Solr cache cleared when I restart Solr?
Caches are in-memory structures, there's no provision in Solr to try to preserve them across a shutdown, they'd have to be written to disk then re-read. Any intermediate cached pages, i.e. something in you app server is another story however. Solr has no control over that. Best, Erick On Wed, Jan 27, 2016 at 7:11 PM, Zheng Lin Edwin Yeowrote: > Hi, > > I would like to find out, is the cache in the Solr cleared when I shut down > the Solr instant and restart it? > > I am suspecting that the cache is not entirely cleared, because when I try > to do a search on the same query as I did before the search, it still has a > return QTime that is much faster than the initial search. However, when I > do a search on a new query, the return QTime is the original speed. > > I am using Solr 5.4.0, and this is my setting for the queryResultCache. > > size="1024" > initialSize="512" > autowarmCount="0"/> > > Regards, > Edwin
Is Solr cache cleared when I restart Solr?
Hi, I would like to find out, is the cache in the Solr cleared when I shut down the Solr instant and restart it? I am suspecting that the cache is not entirely cleared, because when I try to do a search on the same query as I did before the search, it still has a return QTime that is much faster than the initial search. However, when I do a search on a new query, the return QTime is the original speed. I am using Solr 5.4.0, and this is my setting for the queryResultCache. Regards, Edwin
Re: Is Solr cache cleared when I restart Solr?
Thanks Erick and Shawn for your reply. We have recently upgraded the server RAM from 64MB to 192MB, and I noticed that this caching occurs after we upgraded the RAM. Previously, the cache may not even be preserved in the same Solr session. So is it true that the upgrading of the server RAM creates enough spare memory for good caching? Regards, Edwin On 28 January 2016 at 12:27, Shawn Heiseywrote: > On 1/27/2016 8:11 PM, Zheng Lin Edwin Yeo wrote: > > I would like to find out, is the cache in the Solr cleared when I shut > down > > the Solr instant and restart it? > > > > I am suspecting that the cache is not entirely cleared, because when I > try > > to do a search on the same query as I did before the search, it still > has a > > return QTime that is much faster than the initial search. However, when I > > do a search on a new query, the return QTime is the original speed. > > > > I am using Solr 5.4.0, and this is my setting for the queryResultCache. > > > > > size="1024" > > initialSize="512" > > autowarmCount="0"/> > > The Solr caches are maintained in the Java heap, which is lost when Java > stops. > > Although the Solr caches are not preserved across a restart, the > operating system does cache actual index data in main memory, so when > Solr asks for the same index data off of the disk again, it is pulled > directly from RAM, which is a LOT faster than the disk. In order to > deliver good performance, Solr is extremely reliant on this built-in > feature of all modern operating systems, so there must be enough spare > memory for good caching. > > Here are a couple of pages with some more detail: > > https://wiki.apache.org/solr/SolrPerformanceProblems > https://en.wikipedia.org/wiki/Page_cache > > Thanks, > Shawn > >