|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Delete *and free memory* from a SHARED ROW |
« View previous topic :: View next topic » |
Author |
Message
|
maurito |
Posted: Fri Nov 21, 2014 5:57 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Hi Craig,
it seems to me the use of 2 shared rows is unnecessary, the temporary one could be in the Environment or LocalEnvironment ( or even better, a local ROW variable) which would be released automatically at end of message processing, while the shared would remain in memory ( as the redundant one does not seem to be deleted after the "curly braces magic" ).
so I would change the code to:
delete the line
Code: |
DECLARE mySharedRow SHARED ROW;
|
inside procedure reloadCache
Code: |
DECLARE mySharedRow ROW NULL; |
and then delete the line
Code: |
DELETE FIELD mySharedRow.Calls; |
and see what difference that makes |
|
Back to top |
|
|
mqsiuser |
Posted: Sun Nov 23, 2014 3:50 am Post subject: |
|
|
Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
@maurito: Good point: I will remove one shared row (it will at least make the problem less worse by a factor of 2)
@Craig: I can/may give you more info by tomorrow. Roughly I get some rows, then I group by one of the column-names ("users"). This group-by-users allows the requests of the users (that come in "in-between the 10-seconds") to be instantly served (no computation just a "MOVE to mySharedRow2.Calls.{user}"... so just return the tree (basically without using any CPU).
Btw: Controlling the underlying hash map (that Broker uses internally (for the logical type tree)) and the creation (naming) of tree-nodes (when parsing out) (e.g. XML-Element&-Attribute(-Names)) could be decoupled (in a downwards compatible manner) by adding the following option (to the ESQL-Language ):
Currently possible:
Code: |
myTreeStructure.myParents.{criteriaToControlTheHashMap_AND_TreeFieldName}(.myField) = myValue; |
Decoupling control of the hash map and (tree)element naming:
Code: |
myTreeStructure.myParents.{criteriaToControlTheHashMap:NameToUseForATreeElementWhenWritingOut}(.myField) = myValue; |
I will try to explicitly create parsers (with "CREATE ... DOMAIN 'XMLNSC') tomorrow and delete that with "DELETE FIELD ..." and look if the memory is recycled that way. _________________ Just use REFERENCEs |
|
Back to top |
|
|
mqsiuser |
Posted: Mon Nov 24, 2014 12:37 am Post subject: |
|
|
Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
I am currently trying this:
Code: |
CREATE LASTCHILD OF refMySharedRow AS refMySharedRow DOMAIN('XMLNS') NAME 'Calls'; |
And I get this exception:
Code: |
Attempt to use XML parser in a shared tree |
ups, trying now:
Code: |
CREATE LASTCHILD OF refMySharedRow AS refMySharedRow DOMAIN('XMLNSC') NAME 'Calls'; |
EDIT (2014-11-26): The flow's statistics are now:
Summary: ApproxMemKB = 11577.34 (my interpretation of that is "less than 12MB")
MQROOT: Fields = 25363 (so ~25 tsd) (and not > 5 million anymore)
Thank you all, yay _________________ Just use REFERENCEs |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|