activemq-dev mailing list archives

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

                 Key: AMQ-1082
                 URL: https://issues.apache.org/activemq/browse/AMQ-1082
             Project: ActiveMQ
          Issue Type: Improvement
    Affects Versions: 4.2.0
            Reporter: jk@penguinsfan.com


This is in kaha.impl.index.IndexManager.java.

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 ListContainerImpl.java) 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: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message