On 7/17/2013 9:35 AM, Ayman Plaha wrote:
> In my solrconfig.xml I've got these caching config by default which I
don't
> think I will need. Since my index is updated with new documents every 3
> minutes caching anything would be pointless. Am I on the right ?
>
> <!-- <filterCache class="solr.FastLRUCache" size="512"
> initialSize="512" autowarmCount="0" />
> <queryResultCache class="solr.LRUCache" size="512"
> initialSize="512" autowarmCount="0" />
> <documentCache class="solr.LRUCache" size="512"
initialSize="512"
> autowarmCount="0" /> -->
That depends on how many queries you expect to have in those three
minutes. The Solr caches help performance because they cause Solr to
entirely skip the process of gathering the data for a query that has
been done before.
I would say that you should never turn Solr's caches completely off, and
small autowarmCount values are probably a good idea unless you are
indexing extremely often. Every three minutes isn't often. I index
once a minute, and I don't consider that to be often.
Further info: you can't directly warm the documentCache, so putting a
value in that autowarmCount doesn't do anything. The example config
should have a comment that says this.
> If yes, saying I have an index of 80GB and since I won't be using cache I
> won't have to worry about having too much RAM ? May be just enough
ram for
> processing ? say 8GB ram and 240GB SSD ?
Solr caches and the OS disk cache are very different things. The OS
disk cache is something that the operating system does at all times for
most programs, if there is free memory. Solr performance will be
TERRIBLE if you don't have enough RAM for the OS to cache the index.
The reason for this is simple - reading off the disk is exponentially
slower than reading from RAM. SSD is very fast, but still not as fast
as RAM.
If you have an index of 80GB, then your OS disk cache should be at LEAST
40GB, and 80GB is better, so a total memory size of 64-128GB would be
about right for an 80GB index on spinning disks, assuming Solr is the
only thing on the machine.
If you have your index on SSD, then I would say you should have between
20 and 40GB for your OS disk cache, which means that 24-48GB of total
RAM would be the right size for an 80GB index on SSD.
No matter what kind of disks you have, more RAM is better.
Thanks,
Shawn