我们有一个表,导致超时读/写群集时运行“nodetool修复”和导出(COPY FROM)功能是很慢(约150行/分钟)与很多导出期间日志中的GC错误。Cassandra表,停止nodetool修复和导出速度很慢
似乎这可能是模式问题,因为具有类似数据量(大约150万行)的其他表行为正常。
这个模式有什么明显的问题吗?
CREATE TABLE reportingtest.events (
year int,
month int,
day int,
hour int,
action text,
id uuid,
attributes frozen<list<frozen<attribute>>>,
domain text,
organisation text,
status text,
PRIMARY KEY ((year, month), day, hour, action, id)
) WITH CLUSTERING ORDER BY (day ASC, hour ASC, action ASC, id ASC)
使用的两个UDT的是:
CREATE TYPE reportingtest.attribute (
namespace text,
name text,
displayname text,
values frozen<list<frozen<attributevalue>>>
);
和
CREATE TYPE reportingtest.attributevalue (
aggregationvalue text,
extra frozen<map<text, text>>
);
那我做错了吗?
集群运行[cqlsh 5.0.1 | Cassandra 3.0.9 | CQL spec 3.4.0 | Native protocol v4].
Percentile Partition Size Cell Count
50% 25109160 61214
75% 30130992 61214
95% 89970660 182785
98% 129557750 379022
99% 268650950 654949
Min 373 18
Max 464228842 113175
用'tracing on'运行一些查询并检查生成了多少墓碑 –
感谢您的建议。这张表没有删除,也没有任何更新,所以我不确定墓碑是否是问题。尝试几个查询,我每次都会得到'读取1000个实况和0个墓碑单元格'。 – brianofshoe
http://docs.datastax.com/en/cassandra/3.0/cassandra/tools/toolsTablehisto.html - 您还应该检查您的分区是不是“太大” – Mandraenke