Reputation: 127
If we invoke some xquery
module first time it takes some time. Subsequent invoke calls are faster may be because xquery
module is parsed and present in module cache.
Consider following scenario :-
HTTP Server1- xdmp:invoke('/a/sample.xqy')
HTTP Server2 - xdmp:invoke('/a/sample.xqy')
Both app servers point to same Modules DB.
Questions :-
Why subsequent invoke calls are faster?
However invoke is slow if we invoke same module in diff app server.For caching purpose will this xquery module be considered as separate object based on appserver?
How MarkLogic decides which entry to move out of Module Cache?
How long MarkLogic keeps module in cache after xdmp:invoke
call?
Is there any ML configuration to increase module cache size?
Upvotes: 2
Views: 713
Reputation: 1
1. caching :- There are three kind of cache - expanded tree, compressed tree , list.Expanded tree store more recently used one then compressed and then list. ML documents explains it very nicely.
2. If the second app server is in the same group then ideally it should not take more time . if its in a diffrent group then it will take time . Because cacheing is done at group level.
3. Most recently used will be in expanded tree chache and least recently used will be in list cache . Which are not recently used will be flushed off from cache.
4. Refer to point three
5. yes , go to Admin--> group-->choose your group ---> configure tab.
Upvotes: 0
Reputation: 305
Is the query touching data in the database? If so, subsequent calls to the very same query could be access Expanded tree cache in the E-node on the second call.
How much faster is the second call? Last time I measured it, the difference in query evaluation time was small compared to the seek time on most I/O solutions.
Upvotes: 0
Reputation: 7840
Upvotes: 3