行缓存堆需求(Cassandra 1.0) [英] Row Cache Heap Requirements (Cassandra 1.0)

查看:111
本文介绍了行缓存堆需求(Cassandra 1.0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经测试了行缓存,并发现,它需要大量的堆 - 我想验证这个理论。

I've tested row cache, and find out, that it requires large amount of Heap - I would like to verify this theory.

这是我的测试键空格:
{
TestCF:{

This is my test key space: { TestCF: {

    row_key_1: {
        { clientKey: "MyTestCluientKey" },
        { tokenSecret: "kd94hf93k423kf44" },
        { verifier: "hfdp7dh39dks9884" },
        { callbackUrl: "http%3A%2F%2Fprinter.test.com%2Fready" },
        { accountId: "234567876545"},
        { mytestResourceId: "ADB112"},
        { dataTimestamp: "1308903420400" },
        { dataType: "ACCESS_PERMANENT"}
    },
    row_key_2: {
        { clientKey: "MyTestCluientKey" },
        { tokenSecret: "qdqergvhetyhvetyh" },
        { verifier: "wtrgvebyjnrnuiucewrqxcc" },
        { callbackUrl: "http%3A%2F%2Fprinter.test.com%2Fready" },
        { accountId: "23456789746534"},
        { mytestResourceId: "DQERGCWRTHB"},
        { dataTimestamp: "130890342333200" },
        { dataType: "ACCESS_LIMITED"}
    },

...
row_key_x:{
....
},

... row_key_x: { .... },

}

}

CF:TestCF包含8列。行高速缓存已启用,密钥高速缓存已禁用。行命中率0.99 - 这是只读测试。

Each row in CF: TestCF contains 8 columns. Row cache is enabled, key cache is disabled. Row hit rate 0.99 - this is read only test.

我的测试加载了1.500.000行到缓存 - 这分配了大约3.5GB的堆 - 这是大约2KB pro单

My test loads 1.500.000 rows into cache - and this allocates about 3.5GB heap - this is about 2KB pro single row - this is a lot....

有可能,单行(8列)可以分配大约2KB的堆?

Is it possible, that single row (8 columns) can allocate about 2KB heap?

谢谢你,
Maciej

Thank you, Maciej

推荐答案

是的,经验法则是memtable或行缓存将需要大约8x到12x的序列化大小。这是一个原因,如果您安装了JNA,则离线缓存是1.0中的默认值:off-heap以序列化形式存储行。

Yes, rule of thumb is that a row in a memtable or row cache will take about 8x to 12x its serialized size. This is one reason the off-heap cache is the default in 1.0 if you have JNA installed: off-heap stores the rows in serialized form.

这篇关于行缓存堆需求(Cassandra 1.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆