[ 
https://issues.apache.org/jira/browse/CASSANDRA-8231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14215994#comment-14215994
 ] 

Benjamin Lerer commented on CASSANDRA-8231:
-------------------------------------------

I added to Jamm 0.2.9 the ability to exclude fields that have the been annoted 
with the Unmetered annotation. I started to use it but I realizes that what we 
really want to exclude is some specific classes that we consider as Singleton 
(e.g. the functions ot the AbstractTypes). Being able to directly annotate a 
Type like Function is safer as we only have to annotate the Interface once and 
it will not be taken into account by MemoryMeter no matter in which statement 
type or part of the statement it is. It is also more refactoring proof. 

> Wrong size of cached prepared statements
> ----------------------------------------
>
>                 Key: CASSANDRA-8231
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8231
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Jaroslav Kamenik
>            Assignee: Benjamin Lerer
>         Attachments: 8231-notes.txt, Unsafes.java
>
>
> Cassandra counts memory footprint of prepared statements for caching 
> purposes. It seems, that there is problem with some statements, ie 
> SelectStatement. Even simple selects is counted as 100KB object, updates, 
> deletes etc have few hundreds or thousands bytes. Result is that cache - 
> QueryProcessor.preparedStatements  - holds just fraction of statements..
> I dig a little into the code, and it seems that problem is in jamm in class 
> MemoryMeter. It seems that if instance contains reference to class, it counts 
> size of whole class too. SelectStatement references EnumSet through 
> ResultSet.Metadata and EnumSet holds reference to Enum class...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to