You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Tobias Jungen <to...@gmail.com> on 2010/05/11 22:44:56 UTC

(Binary)Memtable flushing

Yet another BMT question, thought this may apply for regular memtables as
well...

After doing a batch insert, I accidentally submitted the flush command
twice. To my surprise, the target node's log indicates that it wrote a new
*-Data.db file, and the disk usage went up accordingly. I tested and issued
the flush command a few more times, and after a few more data files I
eventually triggered a compaction, bringing the disk usage back down. The
data appears to continue to stick around in memory, however, as further
flush commands continue to result in new data files.

Shouldn't flushing a memtable remove it from memory, or is expected behavior
that it sticks around until the node needs to reclaim the memory? Should I
worry about getting out-of-memory errors if I'm doing lots of inserts in
this manner?

Re: (Binary)Memtable flushing

Posted by Tobias Jungen <to...@gmail.com>.
D'oh, forgot to search the JIRA on this one. Thanks Jonathan!

On Wed, May 12, 2010 at 9:37 AM, Jonathan Ellis <jb...@gmail.com> wrote:

> https://issues.apache.org/jira/browse/CASSANDRA-856
>
> On Tue, May 11, 2010 at 3:44 PM, Tobias Jungen <to...@gmail.com>
> wrote:
> > Yet another BMT question, thought this may apply for regular memtables as
> > well...
> >
> > After doing a batch insert, I accidentally submitted the flush command
> > twice. To my surprise, the target node's log indicates that it wrote a
> new
> > *-Data.db file, and the disk usage went up accordingly. I tested and
> issued
> > the flush command a few more times, and after a few more data files I
> > eventually triggered a compaction, bringing the disk usage back down. The
> > data appears to continue to stick around in memory, however, as further
> > flush commands continue to result in new data files.
> >
> > Shouldn't flushing a memtable remove it from memory, or is expected
> behavior
> > that it sticks around until the node needs to reclaim the memory? Should
> I
> > worry about getting out-of-memory errors if I'm doing lots of inserts in
> > this manner?
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

Re: (Binary)Memtable flushing

Posted by Jonathan Ellis <jb...@gmail.com>.
https://issues.apache.org/jira/browse/CASSANDRA-856

On Tue, May 11, 2010 at 3:44 PM, Tobias Jungen <to...@gmail.com> wrote:
> Yet another BMT question, thought this may apply for regular memtables as
> well...
>
> After doing a batch insert, I accidentally submitted the flush command
> twice. To my surprise, the target node's log indicates that it wrote a new
> *-Data.db file, and the disk usage went up accordingly. I tested and issued
> the flush command a few more times, and after a few more data files I
> eventually triggered a compaction, bringing the disk usage back down. The
> data appears to continue to stick around in memory, however, as further
> flush commands continue to result in new data files.
>
> Shouldn't flushing a memtable remove it from memory, or is expected behavior
> that it sticks around until the node needs to reclaim the memory? Should I
> worry about getting out-of-memory errors if I'm doing lots of inserts in
> this manner?
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com