You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Leleu Eric <Er...@worldline.com> on 2014/08/26 19:20:48 UTC

Question about MemoryMeter liveRatio

Hi,


I'm trying to understand what is the liveRatio and if I have to care about it.
I found some reference on the web and if I understand them, the liveRatio represents  the Memtable size divided by the amount of data serialized on the disk. Is it the truth?


When I see the following log, what can I deduce about it ?

    INFO [MemoryMeter:1] 2014-08-26 19:02:41,047 Memtable.java (line 481) CFS(Keyspace='ufapi', ColumnFamily='users') liveRatio is 8.52308554793235 (just-counted was 8.514143642185562).  calculation took 3613ms for 272646 cells
   INFO [MemoryMeter:1] 2014-08-26 18:36:09,965 Memtable.java (line 481) CFS(Keyspace='system', ColumnFamily='compactions_in_progress') liveRatio is 40.1893491
1242604 (just-counted was 16.37869822485207).  calculation took 0ms for 7 cells


According to my read, the liveRatio is set between 1 and 64. If My liveRatio is around 64, should I care about some things?
Does Cassandra use the liveRatio for some internal task or it is just a metric?


Regards,
Eric

________________________________

Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? de Worldline ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

Re: Question about MemoryMeter liveRatio

Posted by Chris Lohfink <cl...@blackbirdit.com>.
Computing how much actual memory the memtables cost including jvm overhead etc is expensive (using https://github.com/jbellis/jamm).  So instead the memorymeter thread pool will periodically find the size and compare it to the serialized size to compute the ratio to give an appropriate estimate at real time.  This is used to determine how much memory a memtable is taking up and how often to flush it.

---
Chris Lohfink

On Aug 26, 2014, at 12:20 PM, Leleu Eric <Er...@worldline.com> wrote:

> Hi,
>  
>  
> I’m trying to understand what is the liveRatio and if I have to care about it.
> I found some reference on the web and if I understand them, the liveRatio represents  the Memtable size divided by the amount of data serialized on the disk. Is it the truth?
>  
>  
> When I see the following log, what can I deduce about it ?
>  
>     INFO [MemoryMeter:1] 2014-08-26 19:02:41,047 Memtable.java (line 481) CFS(Keyspace='ufapi', ColumnFamily='users') liveRatio is 8.52308554793235 (just-counted was 8.514143642185562).  calculation took 3613ms for 272646 cells
>    INFO [MemoryMeter:1] 2014-08-26 18:36:09,965 Memtable.java (line 481) CFS(Keyspace='system', ColumnFamily='compactions_in_progress') liveRatio is 40.1893491
> 1242604 (just-counted was 16.37869822485207).  calculation took 0ms for 7 cells
>  
>  
> According to my read, the liveRatio is set between 1 and 64. If My liveRatio is around 64, should I care about some things?
> Does Cassandra use the liveRatio for some internal task or it is just a metric?
>  
>  
> Regards,
> Eric
> 
> 
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.
> 
> This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.