Cache Requirements for Cache (Cassandra 1.0)

I checked the line cache and found out that this requires a large amount of heap - I would like to test this theory.

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: {....},

 } 

}

Each row in CF: TestCF contains 8 columns. The line cache is on, the key cache is off. A queue hit ratio of 0.99 is just a read test.

My test loads 1,500,000 lines into the cache - and it allocates about 3.5 GB of heap - this is about 2 KB about one line - that’s a lot ....

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

Thanks Maciej

+4
source share
1 answer

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

+5
source

Source: https://habr.com/ru/post/1379291/


All Articles