Yes, I have analyzed several heap dumps and it is all NodeId, HashMap$Entry, 
NameSet, ChildNodeEntry, NodeState, etc.  When observing with a profiler, the 
moment the query starts I see memory shoot up, hit the heap limit, thrash for a 
little while, and then run out.


-----Original Message-----
From: Chetan Mehrotra [mailto:chetan.mehro...@gmail.com] 
Sent: Monday, March 28, 2016 2:01 AM
To: users@sling.apache.org
Subject: Re: Out of memory during query

> select * from [nt:base] where uploadToImageManagerFlag = true

Logically this query should not consume much memory (no order by also). Given 
that its JR 1.0 (per comments above  Jackrabbit 1.0, not
Oak) cannot say much on how it works and how to get it perform better.
Have you analyed heap dump to see what all is being held up?
Chetan Mehrotra


On Sat, Mar 26, 2016 at 2:47 AM, Jason Bailey <jason.bai...@sas.com> wrote:
> I don't think you'll find that specific answer on this list.
>
> From a practical point of view. I had to create a service that provided a 
> report on all the pages in our system that we considered an active page.
>
> That would be iterating through ~400k pages across 70 sites and checking 
> several properties on each page. To minimize the memory consumption, each 
> time I would find a matching node, I would write the path out to the response 
> object and not actually keep the node reference in memory.
>
> That process, running on our hardware, would spit 370k results in just over a 
> minute.
>
> The best we could ever get it to run in jackrabbit with a query was 10 
> minutes.
>
>
> -----Original Message-----
> From: Roll, Kevin [mailto:kevin-r...@idexx.com]
> Sent: Friday, March 25, 2016 4:51 PM
> To: users@sling.apache.org
> Subject: RE: Out of memory during query
>
> A practical question on #3... I'm trying it and it seems to work well. Let's 
> say I do this:
>
>             final Session session = resourceResolver.adaptTo(Session.class);
>             final Node rootNode = session.getRootNode();
>
> ...and then start recursively traversing all of the nodes. Is there anything 
> in the Session that will accumulate the nodes I traverse? Or, will they be 
> reclaimable as soon as I am finished with them? Again, I am extremely 
> paranoid about memory usage and I cannot have an out-of-memory condition.
>
>
> -----Original Message-----
> From: Jason Bailey [mailto:jason.bai...@sas.com]
> Sent: Friday, March 25, 2016 1:01 PM
> To: users@sling.apache.org
> Subject: RE: Out of memory during query
>
> A couple of observations.
>
> 3. Queries are generally slow. In the most counter intuitive experience I've 
> ever had. We've discovered it is far faster to manually descend through the 
> resources and identify the items that you are searching for than any query 
> we've created.

Reply via email to