incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ChiaHung Lin (Commented) (JIRA)" <>
Subject [jira] [Commented] (HAMA-521) Improve message buffering to save memory
Date Mon, 26 Mar 2012 15:38:28 GMT


ChiaHung Lin commented on HAMA-521:

MemoryQueue is similar to the original way by storing messages in LinkedList that looks ok.

Regarding to memory footprint, how if storing messages remotely e.g. hdfs or spilling messages
to the target server? Or storing in e.g. memcache may be an option. 

Each has its own pros and cons. Storing remote allows messages available, but may be slow;
spilled messages may lost if the target server fails, but speed may be increased because of
local read; memcache may increase dependency/ overhead in lots of setup, etc.
> Improve message buffering to save memory
> ----------------------------------------
>                 Key: HAMA-521
>                 URL:
>             Project: Hama
>          Issue Type: Sub-task
>            Reporter: Thomas Jungblut
>            Assignee: Thomas Jungblut
>         Attachments: HAMA-521.patch, HAMA-521_1.patch
> Suraj and I had a bit of discussion about incoming and outgoing message buffering and
> Currently everything lies on the heap, causing huge amounts of GC and waste of memory.
We can do better.
> Therefore we need to extract an abstract Messenger class which is directly under the
interface but over the compressor class.
> It should abstract the use of the queues in the back (currently lot of duplicated code)
and it should be backed by a sequencefile on local disk.
> Once sync() starts it should return a message iterator for combining and then gets put
into a message bundle which is send over RPC.
> On the other side we get a bundle and looping over it putting everything into the heap
making it much larger than it needs to be. Here we can also flush on disk because we are just
using a queue-like method to the user-side.
> Plus points:
> In case we have enough heap (see our new metric system), we can also implement a buffering
technology that is not flushing everything to disk.
> Open questions:
> I don't know how much slower the whole system gets, but it would save alot of memory.
Maybe we should first evaluate if it is really needed.
> In any case, the refactoring of the duplicate code in the messengers is needed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message