Hello,

I tried tweaking the parameters you suggested but there was no 
significant change. To get a measure of the total peak size of all the 
engine "memories", I wrote a simple test. I am creating an arraylist of 
1000 objects and calling definstance immediately followed by 
undefinstance. This is being done in a loop for 500 times. I am loosing 
   all references to this arraylist at the end of the loop, so I know 
that's not a cause of memory leak. The profiler shows that the memory 
graph never plateaus. It just keeps growing until I get out of memory. 
This happens after 195 counts of the loop. Data from the profiler is 
attached for your reference.

I ran this test with all modifications to TokenVector mentioned in 
earlier mails.

Thanks a lot for your help
Dheeraj

[EMAIL PROTECTED] wrote:

> The important issue is not whether the memory usage grows, but whether
> it grows forever or levels off. It is normal for it to grow and not
> shrink; it would not be normal for it to grow forever, however. Which
> are you observing?
> 
> The Rete network contains many "memories," and each one grows in
> capacity as required. In the current implementation, they never
> shrink, only grow. Growing (which comes down to allocating bigger
> arrays and copying elements) is costly, and shrinking would be an
> additional expense.
> 
> After a system has run for a while, all the memories get to their peak
> sizes, and RAM usage levels off. A lot of RAM will then be consumed by
> empty but reserved space making up the memories, and this is probably
> what you're observing. You can adjust this total memory usage by
> playing with the global node-index-hash value, which will reduce the
> total number of submemories, possibly impacting performance,
> 
> Alternatively, the existing memories could be made to shrink
> sometimes. You could do this in TokenVector.removeElementAt(), by
> doing something like
> 
>   final void removeElementAt(int i) 
>   {
>     m_v[i] = m_v[m_ptr-1];
>     m_v[--m_ptr] = null;
>     if (m_ptr > 10 && (m_v.length - m_ptr) > m_ptr) {
>        Token[] tmp = new Token[m_ptr + 5];
>        System.arraycopy(m_v, 0, tmp, 0, m_ptr);
>        m_v = tmp;
>     }        
>   }
> 
> But you'd have to think about it and make some careful measurements to
> avoid thrashing (grow, shrink, grow, shrink...)
> 
> 
> I think Dheeraj Kakar wrote:
> 
>>Hello,
>>
>>Thanks for your reply.
>>The test was done after applying the fixes to TokenVector.
>>
>>Thanks
>>
>>
>>
>>[EMAIL PROTECTED] wrote:
>>
>>
>>>This is probably a bug described previously on this list:
>>>
>>>  http://www.mail-archive.com/[email protected]/msg04114.html
>>>
>>>The patch was included in version 6.1a2, or you can apply it yourself
>>>to 6.0.
>>>
>>>
> 
> ---------------------------------------------------------
> Ernest Friedman-Hill  
> Distributed Systems Research        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> Org. 8920, MS 9012                  [EMAIL PROTECTED]
> PO Box 969                  http://herzberg.ca.sandia.gov
> Livermore, CA 94550
> 
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------
> 
> 

Virtual Machine Information

Virtual machine data

Time Heap Size Heap Used GC Load Factor Thread Active Class
00:00:00 0 0 0 0 0 0
00:00:01 0 0 0 0 0 0
00:00:02 2342912 2264704 72 6 0 858
00:00:03 2342912 1459928 99 6 1 966
00:00:04 2342912 1597280 100 6 1 1054
00:00:05 2363392 1988032 86 6 1 1123
00:00:06 2461696 1861976 96 6 1 1296
00:00:07 3301376 2098960 98 9 0 1413
00:00:08 3608576 2434656 97 9 1 1442
00:00:09 3608576 2435120 6 9 1 1442
00:00:10 3608576 2435584 0 9 0 1442
00:00:11 3608576 2436048 0 9 0 1442
00:00:12 4243456 3097776 78 9 1 1444
00:00:13 5390336 3856352 89 9 1 1444
00:00:14 5677056 3431616 98 9 1 1444
00:00:15 7061504 4500800 99 9 1 1444
00:00:16 7766016 4678528 97 9 1 1444
00:00:17 9928704 6290064 100 9 1 1444
00:00:18 9928704 9785336 56 9 1 1444
00:00:19 11493376 7684728 88 9 1 1444
00:00:20 11493376 11118600 56 9 1 1444
00:00:21 13709312 9487240 92 9 1 1444
00:00:22 13709312 12986024 59 9 1 1444
00:00:23 16150528 9559520 96 9 1 1444
00:00:24 16150528 13104688 72 9 1 1444
00:00:25 17641472 11078336 100 9 1 1444
00:00:26 17641472 13306952 80 9 1 1444
00:00:27 17641472 16658720 54 9 1 1444
00:00:28 21905408 12980856 97 9 1 1444
00:00:29 21905408 16456200 76 9 1 1444
00:00:30 21905408 19723040 55 9 1 1444
00:00:31 25251840 15902848 100 9 1 1444
00:00:32 25251840 19389744 81 9 1 1444
00:00:33 25251840 22421672 61 9 1 1444
00:00:34 25251840 25100376 42 9 1 1444
00:00:35 30359552 17944592 95 9 1 1444
00:00:36 30359552 21404480 81 9 1 1444
00:00:37 30359552 24811680 67 9 1 1444
00:00:38 30359552 27511784 53 9 1 1444
00:00:39 33964032 21316808 100 9 1 1444
00:00:40 33964032 24539664 86 9 1 1444
00:00:41 33964032 27240688 72 9 1 1444
00:00:42 33964032 30682896 58 9 1 1444
00:00:43 40505344 23662376 97 9 1 1444
00:00:44 40505344 23662376 97 9 1 1444
00:00:45 40505344 26397968 85 9 1 1444
00:00:46 40505344 29998832 73 9 1 1444
00:00:47 40505344 33461800 61 9 1 1444
00:00:48 40505344 36228808 48 9 1 1444
00:00:49 40505344 39388704 36 9 1 1444
00:00:50 47767552 29605552 100 9 1 1444
00:00:51 47767552 32957632 89 9 1 1444
00:00:52 47767552 36409096 78 9 1 1444
00:00:53 47767552 39495200 67 9 1 1444
00:00:54 47767552 42501088 56 9 1 1444
00:00:55 47767552 45106456 45 9 1 1444
00:00:56 55005184 32047112 95 9 1 1444
00:00:57 55005184 32047112 95 9 1 1444
00:00:58 55005184 32047112 95 9 1 1444
00:00:59 55005184 35385712 88 9 1 1444
00:01:00 55005184 38830624 80 9 1 1444
00:01:01 55005184 41965984 73 9 1 1444
00:01:02 55005184 44910864 65 9 1 1444
00:01:03 55005184 48334600 58 9 1 1444
00:01:04 55005184 51678080 50 9 1 1444
00:01:05 55005184 54238784 43 9 1 1444
00:01:06 64933888 39946992 100 9 1 1444
00:01:07 64933888 39946992 100 9 1 1444
00:01:08 64933888 43192544 92 9 1 1444
00:01:09 64933888 46584032 84 9 1 1444
00:01:10 64933888 49047976 76 9 1 1444
00:01:11 64933888 52256248 68 9 1 1444
00:01:12 64933888 55689144 59 9 1 1444
00:01:13 64933888 59096232 51 9 1 1444
00:01:14 64933888 61691312 43 9 1 1444
00:01:15 76062720 43448640 97 9 1 1444
00:01:16 76062720 43448640 97 9 1 1444
00:01:17 76062720 43448640 97 9 1 1444
00:01:18 76062720 43503200 97 9 1 1444
00:01:19 76062720 46949208 91 9 1 1444
00:01:20 76062720 49699104 84 9 1 1444
00:01:21 76062720 53028200 78 9 1 1444
00:01:22 76062720 56839488 72 9 1 1444
00:01:23 76062720 59839736 66 9 1 1444
00:01:24 76062720 62935784 59 9 1 1444
00:01:25 76062720 66274944 53 9 1 1444
00:01:26 76062720 69504344 47 9 1 1444
00:01:27 76062720 72194472 41 9 1 1444
00:01:28 76062720 75424496 34 9 1 1444
00:01:29 90091520 54993024 100 9 1 1444
00:01:30 90091520 54993024 100 9 1 1444
00:01:31 90091520 55060000 100 9 1 1444
00:01:32 90091520 58507936 94 9 1 1444
00:01:33 90091520 61639728 88 9 1 1444
00:01:34 90091520 64609000 82 9 1 1444
00:01:35 90091520 68060424 77 9 1 1444
00:01:36 90091520 71486808 71 9 1 1444
00:01:37 90091520 74241992 65 9 1 1444
00:01:38 90091520 77549400 59 9 1 1444
00:01:39 90091520 80954392 53 9 1 1444
00:01:40 90091520 83713048 47 9 1 1444
00:01:41 90091520 86914184 41 9 1 1444
00:01:42 90091520 88037392 36 9 1 1444
00:01:43 104546304 59370312 95 9 0 1444
00:01:44 104546304 59370312 95 9 0 1444
00:01:45 104546304 59370312 95 9 0 1444
00:01:46 104546304 59370312 95 9 0 1444
00:01:47 104546304 59370312 95 9 0 1444
00:01:48 104546304 60841840 92 9 1 1444
00:01:49 104546304 64286408 89 9 1 1444
00:01:50 104546304 67729000 85 9 1 1444
00:01:51 104546304 70441608 81 9 1 1444
00:01:52 104546304 73808912 77 9 1 1444
00:01:53 104546304 77244744 73 9 1 1444
00:01:54 104546304 80043944 69 9 1 1444
00:01:55 104546304 83330312 65 9 1 1444
00:01:56 104546304 86764984 61 9 1 1444
00:01:57 104546304 89988424 57 9 1 1444
00:01:58 104546304 92713840 53 9 1 1444
00:01:59 104546304 96058584 49 9 1 1444
00:02:00 104546304 99359984 45 9 1 1444
00:02:01 104546304 101987384 41 9 1 1444
00:02:02 122957824 74713384 100 9 0 1444
00:02:03 122957824 74713384 100 9 0 1444
00:02:04 122957824 74713384 100 9 0 1444
00:02:05 122957824 74713384 100 9 0 1444
00:02:06 122957824 76862752 97 9 1 1444
00:02:07 122957824 80242160 93 9 1 1444
00:02:08 122957824 83684232 88 9 1 1444
00:02:09 122957824 86522096 84 9 1 1444
00:02:10 122957824 89784904 80 9 1 1444
00:02:11 122957824 93127640 76 9 1 1444
00:02:12 122957824 94916608 71 9 1 1444
00:02:13 122957824 98288464 67 9 1 1444
00:02:14 122957824 101712120 63 9 1 1444
00:02:15 122957824 104522608 58 9 1 1444
00:02:16 122957824 107767872 54 9 1 1444
00:02:17 122957824 111168768 50 9 1 1444
00:02:18 122957824 114283824 46 9 1 1444
00:02:19 122957824 117130144 41 9 1 1444
00:02:20 122957824 120501192 37 9 1 1444
00:02:21 143736832 81151192 97 9 0 1444
00:02:22 143736832 81151192 97 9 0 1444
00:02:23 143736832 81151192 97 9 0 1444
00:02:24 143736832 81151192 97 9 0 1444
00:02:25 143736832 81151192 97 9 0 1444
00:02:26 143736832 81151192 97 9 0 1444
00:02:27 143736832 84085216 94 9 1 1444
00:02:28 143736832 87519864 91 9 1 1444
00:02:29 143736832 90795072 88 9 1 1444
00:02:30 143736832 93652560 84 9 1 1444
00:02:31 143736832 97063616 81 9 1 1444
00:02:32 143736832 100493256 78 9 1 1444
00:02:33 143736832 103266680 74 9 1 1444
00:02:34 143736832 106567928 71 9 1 1444
00:02:35 143736832 110818952 68 9 1 1444
00:02:36 143736832 113826992 64 9 1 1444
00:02:37 143736832 116872496 61 9 1 1444
00:02:38 143736832 120296344 58 9 1 1444
00:02:39 143736832 123689144 54 9 1 1444
00:02:40 143736832 126225080 51 9 1 1444
00:02:41 143736832 129543728 48 9 1 1444
00:02:42 143736832 132828832 45 9 1 1444
00:02:43 143736832 135494824 41 9 1 1444
00:02:44 143736832 138668256 38 9 1 1444
00:02:45 143736832 141974104 35 9 1 1444
00:02:46 169594880 102696240 100 9 0 1444
00:02:47 169594880 102696240 100 9 0 1444
00:02:48 169594880 102696240 100 9 0 1444
00:02:49 169594880 102696240 100 9 0 1444
00:02:50 169594880 102696240 100 9 0 1444
00:02:51 169594880 104824104 99 9 1 1444
00:02:52 169594880 107722616 95 9 1 1444
00:02:53 169594880 111150768 92 9 1 1444
00:02:54 169594880 114580592 89 9 1 1444
00:02:55 169594880 117366136 86 9 1 1444
00:02:56 169594880 120681168 83 9 1 1444
00:02:57 169594880 124110576 80 9 1 1444
00:02:58 169594880 127214656 77 9 1 1444
00:02:59 169594880 130201960 74 9 1 1444
00:03:00 169594880 133624344 70 9 1 1444
00:03:01 169594880 137044464 67 9 1 1444
00:03:02 169594880 139786520 64 9 1 1444
00:03:03 169594880 143127464 61 9 1 1444
00:03:04 169594880 146529728 58 9 1 1444
00:03:05 169594880 149384856 55 9 1 1444
00:03:06 169594880 152429944 52 9 1 1444
00:03:07 169594880 155774032 49 9 1 1444
00:03:08 169594880 158765376 45 9 1 1444
00:03:09 169594880 161696888 42 9 1 1444
00:03:10 169594880 165028336 39 9 1 1444
00:03:11 169594880 168191120 36 9 1 1444
00:03:12 199118848 112047424 94 9 0 1444
00:03:13 199118848 112047424 94 9 0 1444
00:03:14 199118848 112047424 94 9 0 1444
00:03:15 199118848 112047424 94 9 0 1444
00:03:16 199118848 112047424 94 9 0 1444
00:03:17 199118848 112047424 94 9 0 1444
00:03:18 199118848 112047424 94 9 0 1444
00:03:19 199118848 112047424 94 9 0 1444
00:03:20 199118848 112047424 94 9 0 1444
00:03:21 199118848 112047424 94 9 0 1444
00:03:22 199118848 112688552 94 9 1 1444
00:03:23 199118848 116077272 92 9 1 1444
00:03:24 199118848 118900496 89 9 1 1444
00:03:25 199118848 122171152 87 9 1 1444
00:03:26 199118848 125600320 85 9 1 1444
00:03:27 199118848 128925304 83 9 1 1444
00:03:28 199118848 131720616 81 9 1 1444
00:03:29 199118848 135110632 79 9 1 1444
00:03:30 199118848 138531248 77 9 1 1444
00:03:31 199118848 141300760 75 9 1 1444
00:03:32 199118848 144590136 73 9 1 1444
00:03:33 199118848 148010640 70 9 1 1444
00:03:34 199118848 151141264 68 9 1 1444
00:03:35 199118848 154085920 66 9 1 1444
00:03:36 199118848 157513216 64 9 1 1444
00:03:37 199118848 160935856 62 9 1 1444
00:03:38 199118848 163679360 60 9 1 1444
00:03:39 199118848 165433104 58 9 1 1444
00:03:40 199118848 166156640 56 9 1 1444
00:03:41 199118848 169246032 54 9 1 1444
00:03:42 199118848 172088032 51 9 1 1444
00:03:43 199118848 175427752 49 9 1 1444
00:03:44 199118848 178743664 47 9 1 1444
00:03:45 199118848 181336408 45 9 1 1444
00:03:46 199118848 184614352 43 9 1 1444
00:03:47 199118848 187706040 41 9 1 1444
00:03:48 199118848 190318648 39 9 1 1444
00:03:49 199118848 193621112 37 9 1 1444
00:03:50 199118848 196939280 34 9 1 1444
00:03:51 235991040 142533648 100 9 0 1444
00:03:52 235991040 142533648 100 9 0 1444
00:03:53 235991040 142533648 100 9 0 1444
00:03:54 235991040 142533648 100 9 0 1444
00:03:55 235991040 142533648 100 9 0 1444
00:03:56 235991040 142533648 100 9 0 1444
00:03:57 235991040 142533648 100 9 0 1444
00:03:58 235991040 143194480 100 9 1 1444
00:03:59 235991040 146565400 98 9 1 1444
00:04:00 235991040 149997256 96 9 1 1444
00:04:01 235991040 152799744 93 9 1 1444
00:04:02 235991040 156067704 91 9 1 1444
00:04:03 235991040 159496912 89 9 1 1444
00:04:04 235991040 162763896 87 9 1 1444
00:04:05 235991040 165575208 85 9 1 1444
00:04:06 235991040 168986656 83 9 1 1444
00:04:07 235991040 172402704 81 9 1 1444
00:04:08 235991040 175168960 79 9 1 1444
00:04:09 235991040 178477072 76 9 1 1444
00:04:10 235991040 181885384 74 9 1 1444
00:04:11 235991040 184894792 72 9 1 1444
00:04:12 235991040 187941192 70 9 1 1444
00:04:13 235991040 191349104 68 9 1 1444
00:04:14 235991040 194358480 66 9 1 1444
00:04:15 235991040 195169128 64 9 1 1444
00:04:16 235991040 197968928 61 9 1 1444
00:04:17 235991040 201211616 59 9 1 1444
00:04:18 235991040 204610488 57 9 1 1444
00:04:19 235991040 207792176 55 9 1 1444
00:04:20 235991040 210633328 53 9 1 1444
00:04:21 235991040 213989944 51 9 1 1444
00:04:22 235991040 217342048 49 9 1 1444
00:04:23 235991040 219972200 46 9 1 1444
00:04:24 235991040 222847848 44 9 1 1444
00:04:25 235991040 226100880 42 9 1 1444
00:04:26 235991040 228779920 40 9 1 1444
00:04:27 235991040 232093864 38 9 1 1444
00:04:28 235991040 235418984 36 9 1 1444
00:04:29 275238912 154400336 97 9 0 1444
00:04:30 275238912 154400336 97 9 0 1444
00:04:31 275238912 154400336 97 9 0 1444
00:04:32 275238912 154400336 97 9 0 1444
00:04:33 275238912 154400336 97 9 0 1444
00:04:34 275238912 154400336 97 9 0 1444
00:04:35 275238912 154400336 97 9 0 1444
00:04:36 275238912 154400336 97 9 0 1444
00:04:37 275238912 154400336 97 9 0 1444
00:04:38 275238912 154400336 97 9 0 1444
00:04:39 275238912 156272408 96 9 1 1444
00:04:40 275238912 159703000 94 9 1 1444
00:04:41 275238912 163122536 93 9 1 1444
00:04:42 275238912 165863104 91 9 1 1444
00:04:43 275238912 169192152 89 9 1 1444
00:04:44 275238912 172611744 88 9 1 1444
00:04:45 275238912 175443328 86 9 1 1444
00:04:46 275238912 178667392 84 9 1 1444
00:04:47 275238912 182078128 83 9 1 1444
00:04:48 275238912 185468368 81 9 1 1444
00:04:49 275238912 188167632 79 9 1 1444
00:04:50 275238912 191525040 77 9 1 1444
00:04:51 275238912 194929024 76 9 1 1444
00:04:52 275238912 197686776 74 9 1 1444
00:04:53 275238912 200962704 72 9 1 1444
00:04:54 275238912 204383752 71 9 1 1444
00:04:55 275238912 207404920 69 9 1 1444
00:04:56 275238912 210426200 67 9 1 1444
00:04:57 275238912 213846536 65 9 1 1444
00:04:58 275238912 217265864 64 9 1 1444
00:04:59 275238912 219979840 62 9 1 1444
00:05:00 275238912 223331376 60 9 1 1444
00:05:01 275238912 226742976 59 9 1 1444
00:05:02 275238912 230998368 57 9 1 1444
00:05:03 275238912 234236576 55 9 1 1444
00:05:04 275238912 237583784 54 9 1 1444
00:05:05 275238912 240326448 52 9 1 1444
00:05:06 275238912 243038904 50 9 1 1444
00:05:07 275238912 246364368 48 9 1 1444
00:05:08 275238912 248782328 47 9 1 1444
00:05:09 275238912 252018088 45 9 1 1444
00:05:10 275238912 255194056 43 9 1 1444
00:05:11 275238912 257805208 42 9 1 1444
00:05:12 275238912 261045680 40 9 1 1444
00:05:13 275238912 264344392 38 9 1 1444
00:05:14 275238912 266994104 36 9 1 1444
00:05:15 275238912 270196216 35 9 1 1444
00:05:16 275238912 273300440 33 9 1 1444
00:05:17 327016448 197148872 100 9 0 1444
00:05:18 327016448 197148872 100 9 0 1444
00:05:19 327016448 197148872 100 9 0 1444
00:05:20 327016448 197148872 100 9 0 1444
00:05:21 327016448 197148872 100 9 0 1444
00:05:22 327016448 197148872 100 9 0 1444
00:05:23 327016448 197148872 100 9 0 1444
00:05:24 327016448 197148872 100 9 0 1444
00:05:25 327016448 197148872 100 9 0 1444
00:05:26 327016448 197148872 100 9 0 1444
00:05:27 327016448 197706480 100 9 1 1444
00:05:28 327016448 201031872 98 9 1 1444
00:05:29 327016448 204452104 97 9 1 1444
00:05:30 327016448 207197160 95 9 1 1444
00:05:31 327016448 210513344 94 9 1 1444
00:05:32 327016448 213929256 92 9 1 1444
00:05:33 327016448 216876560 90 9 1 1444
00:05:34 327016448 219987648 89 9 1 1444
00:05:35 327016448 223416312 87 9 1 1444
00:05:36 327016448 226820528 86 9 1 1444
00:05:37 327016448 229526432 84 9 1 1444
00:05:38 327016448 232880296 82 9 1 1444
00:05:39 327016448 236291040 81 9 1 1444
00:05:40 327016448 239079392 79 9 1 1444
00:05:41 327016448 242348208 78 9 1 1444
00:05:42 327016448 245758320 76 9 1 1444
00:05:43 327016448 248967096 74 9 1 1444
00:05:44 327016448 251827960 73 9 1 1444
00:05:45 327016448 255231728 71 9 1 1444
00:05:46 327016448 258633856 70 9 1 1444
00:05:47 327016448 261363120 68 9 1 1444
00:05:48 327016448 264661576 66 9 1 1444
00:05:49 327016448 268067472 65 9 1 1444
00:05:50 327016448 270919272 63 9 1 1444
00:05:51 327016448 274108320 62 9 1 1444
00:05:52 327016448 277493472 60 9 1 1444
00:05:53 327016448 280783288 58 9 1 1444
00:05:54 327016448 283504656 57 9 1 1444
00:05:55 327016448 286866176 55 9 1 1444
00:05:56 327016448 290232440 54 9 1 1444
00:05:57 327016448 292901872 52 9 1 1444
00:05:58 327016448 296153344 50 9 1 1444
00:05:59 327016448 299492704 49 9 1 1444
00:06:00 327016448 301911976 47 9 1 1444
00:06:01 327016448 305155392 46 9 1 1444
00:06:02 327016448 308483936 44 9 1 1444
00:06:03 327016448 311159552 42 9 1 1444
00:06:04 327016448 314362432 41 9 1 1444
00:06:05 327016448 317588704 39 9 1 1444
00:06:06 327016448 320256856 38 9 1 1444
00:06:07 327016448 323441896 36 9 1 1444

Reply via email to