Re: Memory Using In Faceted Search (UnInvertedField's)

2013-09-19 Thread Anton M
I ran some load tests and working memory usage was always about 10-11 Gb
(very slowly raising - that should be cause of query cache being filled in,
I think). 6 Gb was always heap size while 4-5 Gb was reported as shareable
memory.
First, I became afraid that Solr could continue taking memory up to all
available, but looks like it stops somewhere after fieldValueCache is filled
in.

Shawn, I had swap file growing (up to 50-60%) and working while load tests
ran. Did you configure 'swapiness' on your Linux box (set it to 0 earlier,
maybe)? If not, my Windows OS could be cause of that difference.

I'm not sure if that's completely an issue about shareable memory or some
missing JVM configurations (I don't have anything special except -Xmx, -Xms
and -XX:MaxPermSize=512M) or some Solr memory leak.
I'd appreciate any thoughts on that.

Thanks.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Memory-Using-In-Faceted-Search-UnInvertedField-s-tp4090889p4091014.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Memory Using In Faceted Search (UnInvertedField's)

2013-09-19 Thread Shawn Heisey
On 9/19/2013 3:14 AM, Anton M wrote:
 Shawn, I had swap file growing (up to 50-60%) and working while load tests
 ran. Did you configure 'swapiness' on your Linux box (set it to 0 earlier,
 maybe)? If not, my Windows OS could be cause of that difference.

The vm.swappiness sysctl setting is 1.  I have used 0 as well.  I don't
want it to start swapping unless it *REALLY* needs to.  The default of
60 is pretty aggressive.

 I'm not sure if that's completely an issue about shareable memory or some
 missing JVM configurations (I don't have anything special except -Xmx, -Xms
 and -XX:MaxPermSize=512M) or some Solr memory leak.
 I'd appreciate any thoughts on that.

As I said before, I think that the memory reported as shareable is not
actually allocated.  It probably should be listed under virtual memory.
 Our app rarely does facets, and it typically sorts on one field, so I
have absolutely no idea what's being measured in the 11g of shared
memory for the solr process.

I was present for a conversation between Lucene committers on IRC where
they seemed to be discussing this issue, and it sounded like it is a
side effect of using MMap in a particular way.  It sounded like they
didn't want to change the way its used, because it was the correct way
of using it.  The conversation went way over my head for the most part.

Thanks,
Shawn



Memory Using In Faceted Search (UnInvertedField's)

2013-09-18 Thread anton
Hello,
 
I'm using Solr 4.3.1 for faceted search and have 4 fields used for faceting. My 
question is about memory consumtion.
I've set up heap size to use 6Gb of RAM, but I see in resource monitor it uses 
much more than that - up to 10Gb where 4 Gb is reported as shareable memory.
I've calculated the size of cached set of UnInverted fields and it's 2Gb - I'm 
fine with that, both GC monitor and 'fieldValueCache' stats in 'Plugins/Stats' 
UI for Solr report that. But I can't understand what's that memory that's being 
reserved after filling in fieldValueCache with uninverted fields (right in 
UnInvertedField.uninvert method) and not used  (or not released).
Is that some memory leak? Or is that something I should tune with garbage 
collector by making it more aggressive (GC only shows me 2.x Gb in Old Space 
and I see those UnInvertedField's there in heap dump)?
 
Some info: Index size is 76 Gb. I have 6 shards there. Windows OS. Java 6.0.24.
 
Best regards,
Anton.


Re: Memory Using In Faceted Search (UnInvertedField's)

2013-09-18 Thread Shawn Heisey
On 9/18/2013 11:08 AM, an...@swooptalent.com wrote:
 I'm using Solr 4.3.1 for faceted search and have 4 fields used for faceting. 
 My question is about memory consumtion.
 I've set up heap size to use 6Gb of RAM, but I see in resource monitor it 
 uses much more than that - up to 10Gb where 4 Gb is reported as shareable 
 memory.
 I've calculated the size of cached set of UnInverted fields and it's 2Gb - 
 I'm fine with that, both GC monitor and 'fieldValueCache' stats in 
 'Plugins/Stats' UI for Solr report that. But I can't understand what's that 
 memory that's being reserved after filling in fieldValueCache with uninverted 
 fields (right in UnInvertedField.uninvert method) and not used  (or not 
 released).
 Is that some memory leak? Or is that something I should tune with garbage 
 collector by making it more aggressive (GC only shows me 2.x Gb in Old Space 
 and I see those UnInvertedField's there in heap dump)?

I have noticed the same thing.  I do not think there is an actual
problem, but just something strange with the operating system memory
reporting.

https://www.dropbox.com/s/zacp4n3gu8wb9ab/idxb1-top-sorted-mem.png

In the screenshot above, you can see that there is 64GiB total memory.
There is 9012k being used by the OS disk cache and 9853824k free
memory.  If you add these two numbers up, you get a number that's
roughly 51 GiB (54302836k).

You can also see that it says Solr (4.2.1) has a resident size of 16g,
with 11g of that in shareable memory.  FYI, the max java heap is 6g,
verified by the Solr dashboard and tools like jconsole.

With these numbers, if Solr really did have a memory resident size of
16g, Solr's memory size plus the combined total of cached and free
memory would require 3g of swap, but as you can see, there is zero swap
in use.

I don't know if the reporting problem can be fixed.  It is interesting
to know that the same thing happens on both Linux and Windows.

Thanks,
Shawn