简体   繁体   English

Citus 在我的测试环境中没有横向扩展

[英]Citus does not scale out in my test environment

I have setup a Citus environment: (Citus 7.2.2, Postgres 10.12) 1) 1x coordinator node 2) 5x worker nodes 3) (2GB mem and 2cores VM's for each of the 6 nodes)我已经设置了一个 Citus 环境:(Citus 7.2.2,Postgres 10.12)1)1x 协调器节点 2)5x 工作节点 3)(6 个节点中的每一个都有 2GB 内存和 2 核虚拟机)

I used pgbench with built-in sql (eg simple-update, select-only, tpc-b).我使用带有内置 sql 的 pgbench(例如 simple-update、select-only、tpc-b)。 As I added worker nodes from one to 5 the tps only increase about less than 1-10% (depends on # of client and WAL on hdd or ssd).当我将工作节点从 1 添加到 5 时,tps 仅增加了不到 1-10%(取决于客户端的数量和硬盘或固态硬盘上的 WAL)。

When benchmarking with SELECT, the coordinator VM load can go up to 60+, with other 2 type of SQL the load is only 2 or so.使用 SELECT 进行基准测试时,协调器 VM 负载可以达到 60+,而其他 2 种 SQL 的负载仅为 2 左右。 The worker nodes load always about 1 and disk io is between 500 and 2000 io/sec工作节点负载总是大约 1 并且磁盘 io 在 500 到 2000 io/sec 之间

Does this result sound right?这个结果听起来对吗? Anything I can do to improve the performance?我可以做些什么来提高性能?

Thanks, David谢谢,大卫

For a scale factor of 1 the tables will have:对于比例因子 1,表格将具有:

table                   # of rows
---------------------------------
pgbench_branches        1
pgbench_tellers         10
pgbench_accounts        100000
pgbench_history         0

https://www.postgresql.org/docs/current/pgbench.html https://www.postgresql.org/docs/current/pgbench.html

So scaling factor 30 will have 3M rows in pgbench_accounts, which will probably fit into memory of a single node as suggested by jjanes.所以缩放因子 30 将在 pgbench_accounts 中有 3M 行,这可能会适合 jjanes 建议的单个节点的内存。

And you have 5 worker nodes so you can definitely increase the scaling factor much more.而且您有 5 个工作节点,因此您绝对可以进一步增加缩放系数。 When the data doesn't fit to a memory of a single node, you should see the difference with citus.当数据不适合单个节点的内存时,您应该看到与citus的区别。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM