Max. size of wide rows?
Asked Answered
M

2

17

Theoretically, Cassandra allows up to 2 billion columns in a wide row.

I have heard that in reality up to 50.000 cols/50 MB are fine; 50.000-100.000 cols/100 MB are OK but require some tuning; and that one should never go above 100.000/100 MB columns per row. The reason being that this will put pressure on the heap.

Is there some truth to this?

Mcvey answered 6/3, 2015 at 6:23 Comment(1)
You "have heard" where?Opt
W
23

In Cassandra, the maximum number of cells (rows x columns) in a single partition is 2 billion.

Additionally, a single column value may not be larger than 2GB, but in practice, "single digits of MB" is a more reasonable limit, since there is no streaming or random access of blob values.

Partitions greater than 100Mb can cause significant pressure on the heap.

Wilson answered 6/3, 2015 at 12:26 Comment(1)
Adding on to this excellent answer : How to calculate partitions size from Cassandra docs, and a very convenient Partition Size Calculator : cqlguru.ioAtmospheric
C
3

One of our tables with cassandra 1.2 went pass 100 MB columns per row limit due to new write patterns we experienced. We have experienced significant pressure on both compactions and our caches. Btw, we had rows with several hundred MBs.

One approach is to just redesign and migrate the table to a better designed table(s) that will keep your wide rows under that limit. If that is not an option, then I suggest tune your cassandra so both compactions and caches configs can deal with your wide rows effectively.

Some interesting links to things to tune:

Cassandra Performance Tuning

in_memory_compaction_limit_in_mb

Cheetah answered 13/9, 2015 at 18:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.