[rules-users] Drools rule [Planner] - memory consumption scaling

André Fróes arfmoraes at gmail.com
Wed Jan 30 11:28:34 EST 2013


Actually i'm only with eclipse and VisualVM open. I don't know either why
is it taking 1500MB, I got no apache nor any other kind of java based
program opened.
But be aware that this machine is not really good :D, planner is really
light. Regarding the heap space problem, when u told me to increase do
Xmx512, i did a test regarding 128/256/512
I generate a graph with the 3 executions with 1000 engineer/2000 workorders
to see if it would do any difference. By what I can see (by my noobie
saight), it was no difference regarding time and amount of memory usage. It
used the full memory (128/256/512) when running the planner.

[image: Imagem inline 1]


2013/1/30 Geoffrey De Smet <ge0ffrey.spam at gmail.com>

>  Interesting benchmarks.
> These images would make an interesting blog post on how memory consumption
> scales in planner, if you're interested in writing one.
>
> I still don't understand why you start out with 1500MB already taken
> (before planner starts) if the engineers and workorder objects are so light.
> Is it running on a heavy app server?
>
> Op 30-01-13 16:23, André Fróes schreef:
>
> Would be this:
>
>  [image: Imagem inline 2]
>  i noticed 2 thing doing this test, 1st, the ID binded on
> workorder/engineer can be the same, for example, it will run if I have an
> workorder id 0 and an engineer id 0, and that it will run if provided time
> enough to do the comparison by the xml file, otherwise, it will present a
> result full of "null's".
>
>  I generate the workorder/engineer this way:
> --------
>  List<Engineer> engineerList = new ArrayList<Engineer>();
> for (int i = 1; i < 1001; i++){
>  engineerList.add(new Engineer(i, "engineer " + i, 8 ));
> }
>
>  List<WorkOrder> workOrderList = new ArrayList<WorkOrder>();
>  for (int i = 1002; i < 3002; i++){
>  workOrderList.add(new WorkOrder(i, (new Random().nextInt(5-1+1)+1)));
> }
> ----------------
>
>  in order to stop receiving nulls, i increased the termination from 5s to
> 120s, and it worked
>
>  ----------------
>  <termination>
>     <maximumSecondsSpend>120</maximumSecondsSpend>
> </termination>
>  ----------------
>
>
>
> 2013/1/30 Geoffrey De Smet <ge0ffrey.spam at gmail.com>
>
>>  Now try 2000 workorders and 1000 engineers and see what it does ;-)
>>
>> Op 30-01-13 14:27, André Fróes schreef:
>>
>> Just to knowledge, i'm sending the graph of memory usage when running it
>> with, first marker(between first 2 green lines) peak with 10 workorders and
>> 5 engineers, and, secong marker (between last 2 green lines),  26 workordes
>> and 10 engineers.
>> [image: Imagem inline 1]
>>
>>
>> 2013/1/30 Geoffrey De Smet <ge0ffrey.spam at gmail.com>
>>
>>>  I wonder why it worked on the 5.5.0.Final with the cloudbalance but
>>> not with my workorder example that was much simpler,
>>>
>>>  Me too. All the examples / unit tests work with 5.5.0.Final, but
>>> there's clearly a case they don't cover.
>>> Good thing is that 5.6 will be out soon.
>>>
>>> Op 30-01-13 13:30, André Fróes schreef:
>>>
>>>
>>> It worked with the 5.5.1-SNAPSHOT
>>>
>>>  -----------------
>>>  10:27:49.215 [main] INFO  o.d.p.core.solver.DefaultSolver - Solving
>>> started: time spend (179), score (null), new best score (null), random seed
>>> (0).
>>> 10:27:49.254 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (0), time spend (224), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-15]).
>>> 10:27:49.256 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (1), time spend (225), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-14]).
>>> 10:27:49.284 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (2), time spend (254), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-13]).
>>> 10:27:49.293 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (3), time spend (263), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-12]).
>>> 10:27:49.297 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (4), time spend (267), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-11]).
>>> 10:27:49.300 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (5), time spend (270), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-10]).
>>> 10:27:49.306 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (6), time spend (276), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-9]).
>>> 10:27:49.310 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (7), time spend (280), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-8]).
>>> 10:27:49.315 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (8), time spend (285), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-7]).
>>> 10:27:49.321 [main] DEBUG o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Step index (9), time spend (291), score (0hard/0soft), initialized planning
>>> entity ([WorkOrder-6]).
>>> 10:27:49.321 [main] INFO  o.d.p.c.c.g.DefaultGreedyFitSolverPhase -
>>> Phase constructionHeuristic ended: step total (10), time spend (291), best
>>> score (0hard/0soft).
>>> 10:27:50.041 [main] DEBUG o.d.p.c.l.DefaultLocalSearchSolverPhase -
>>> Step index (0), time spend (1010), score (0hard/0soft),     best score
>>> (0hard/0soft), accepted/selected move count (1000/1000) for picked step
>>> ([WorkOrder-8] <=> [WorkOrder-12]).
>>> 10:27:50.744 [main] DEBUG o.d.p.c.l.DefaultLocalSearchSolverPhase -
>>> Step index (1), time spend (1714), score (0hard/0soft),     best score
>>> (0hard/0soft), accepted/selected move count (1000/1422) for picked step
>>> ([WorkOrder-14] <=> [WorkOrder-10]).
>>> 10:27:51.568 [main] DEBUG o.d.p.c.l.DefaultLocalSearchSolverPhase -
>>> Step index (2), time spend (2538), score (0hard/0soft),     best score
>>> (0hard/0soft), accepted/selected move count (1000/2013) for picked step
>>> ([WorkOrder-6] <=> [WorkOrder-9]).
>>> 10:27:52.083 [main] DEBUG o.d.p.c.l.DefaultLocalSearchSolverPhase -
>>> Step index (3), time spend (3053), score (0hard/0soft),     best score
>>> (0hard/0soft), accepted/selected move count (1000/3635) for picked step
>>> ([WorkOrder-11] <=> [WorkOrder-15]).
>>> 10:27:52.902 [main] DEBUG o.d.p.c.l.DefaultLocalSearchSolverPhase -
>>> Step index (4), time spend (3872), score (0hard/0soft),     best score
>>> (0hard/0soft), accepted/selected move count (1000/8864) for picked step
>>> ([WorkOrder-7] <=> [WorkOrder-13]).
>>> 10:27:54.030 [main] DEBUG o.d.p.c.l.DefaultLocalSearchSolverPhase -
>>> Step index (5), time spend (5000), score (0hard/0soft),     best score
>>> (0hard/0soft), accepted/selected move count (0/31698) for picked step
>>> ([WorkOrder-15] <=> [WorkOrder-7]).
>>> 10:27:54.031 [main] INFO  o.d.p.c.l.DefaultLocalSearchSolverPhase -
>>> Phase localSearch ended: step total (6), time spend (5001), best score
>>> (0hard/0soft).
>>> 10:27:54.031 [main] INFO  o.d.p.core.solver.DefaultSolver - Solving
>>> ended: time spend (5001), best score (0hard/0soft), average calculate count
>>> per second (9730).
>>>
>>>  Solved distribution with 10 work orders and 5 engineers:
>>>   6: ID: 5 - Monkey D. Ruffy
>>>   7: ID: 5 - Monkey D. Ruffy
>>>   8: ID: 4 - Mr. Miyagi
>>>   9: ID: 4 - Mr. Miyagi
>>>   10: ID: 3 - Rambo
>>>   11: ID: 3 - Rambo
>>>   12: ID: 2 - Chuck Norris
>>>   13: ID: 2 - Chuck Norris
>>>   14: ID: 1 - Aladin
>>>   15: ID: 1 - Aladin
>>>  ---------------
>>>
>>>  I wonder why it worked on the 5.5.0.Final with the cloudbalance but
>>> not with my workorder example that was much simpler, i mean, the rule was
>>> only a hard constraint and the pojo simples though.
>>>
>>>
>>> 2013/1/29 André Fróes <arfmoraes at gmail.com>
>>>
>>>> Okay I'll try it now and then  post the result.
>>>>
>>>
>>>
>>>
>>>   _______________________________________________
>>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>
>>
>> _______________________________________________
>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
>
> _______________________________________________
> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130130/87cfb1a9/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 34792 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20130130/87cfb1a9/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 29836 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20130130/87cfb1a9/attachment-0004.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 24669 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20130130/87cfb1a9/attachment-0005.png 


More information about the rules-users mailing list