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

Jonathan Ellis commented on CASSANDRA-4175:
-------------------------------------------

bq. Trying to generate atomic cross node auto_ids or using zookeeper for 
coordination of this seems to go against the entire eventual consistency model 
of cassandra.

Schema has never really been eventually consistent since you can't do anything 
useful until the schema has propagated.  Fortunately, since schema changes are 
rare, this isn't a problem in practice.

bq. Why not have a node-local map and use murmur hash.

As mentioned above, this is a reasonable approach, but it does mean we have to 
convert back-and-forth when talking to another node.  (Which actually means you 
*lose* CPU vs the current approach, since you're serializing the same data but 
now you have to go through an extra layer of indirection to so do.)

bq. Also silly question. But if your columns are named 'pw' instead of 
'password' aren't you more optimized then a 32bit or 64 bit integer anyway?

Nope, since it's 2 bytes for name length, then 2 for the name.  To win vs 32bit 
int you'd have to have a single-letter name.  (And of course any use of 
CompositeType blows this right out.)

                
> Reduce memory (and disk) space requirements with a column name/id map
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-4175
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4175
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jonathan Ellis
>             Fix For: 2.1
>
>
> We spend a lot of memory on column names, both transiently (during reads) and 
> more permanently (in the row cache).  Compression mitigates this on disk but 
> not on the heap.
> The overhead is significant for typical small column values, e.g., ints.
> Even though we intern once we get to the memtable, this affects writes too 
> via very high allocation rates in the young generation, hence more GC 
> activity.
> Now that CQL3 provides us some guarantees that column names must be defined 
> before they are inserted, we could create a map of (say) 32-bit int column 
> id, to names, and use that internally right up until we return a resultset to 
> the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to