activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " (JIRA)" <>
Subject [jira] Created: (AMQ-1082) Improve Kaha freeList
Date Fri, 01 Dec 2006 03:37:02 GMT
Improve Kaha freeList

                 Key: AMQ-1082
             Project: ActiveMQ
          Issue Type: Improvement
    Affects Versions: 4.2.0

This is in

The index currently maintains an in-memory free list.  Each entry costs at least 51 bytes
of RAM.  Issue is that the more free space that there is in the file, the more RAM is used
(oddly enough).

I am worried about the case where suppose a producer enqueues millions of messages and then
stops.  Now, suppose a consumer dequeues all of the messages (no producers are starting up
during this time, so the free entries are not being reclaimed).  Seems like this could use
a huge amount of memory.  Yes, 51 MB is not that much, but suppose there are a bunch of consumers
and hence a ConsumerMessageRef for each one.  (Maybe I'm missing something....)

Perhaps this linked list could be pushed into the Kaha store itself, by rewriting the IndexItems
on disk to point previous/next free item, thus maintaining this on disk and in place.  For
perf reasons, maybe supplement with some caching but that might not really be necessary because
the OS cache should help out.

A lot of the other places in Kaha (such as have caches which limit
to say 100 cached items, but the free list seems to obviate all of that stuff due to it being
essentially unbounded.

Any thoughts?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message