我正在用pgbench进行性能测试,以评估在Postgresql中使用Glusterfs的影响。我创建了一个gluster复制卷,其中包含3个砖块/服务器:

Volume Name: gv0
Type: Replicate
Volume ID: a7e617ec-c564-4a01-aec9-807e87fcccb3
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: 10.112.76.37:/export/sdb1/brick
Brick2: 10.112.76.38:/export/sdb1/brick
Brick3: 10.112.76.39:/export/sdb1/brick
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off

之后,我将postgres配置为使用卷gv0。在低压力下一切正常。但是,当负载增加时,会发生以下错误:
client 14 aborted in state 9: ERROR:  unexpected data beyond EOF in block 0 of relation base/16384/16503
HINT:  This has been seen to occur with buggy kernels; consider updating your system.
client 7 aborted in state 9: ERROR:  unexpected data beyond EOF in block 0 of relation base/16384/16503
HINT:  This has been seen to occur with buggy kernels; consider updating your system.
client 5 aborted in state 9: ERROR:  unexpected data beyond EOF in block 0 of relation base/16384/16503
HINT:  This has been seen to occur with buggy kernels; consider updating your system.
client 6 aborted in state 9: ERROR:  unexpected data beyond EOF in block 0 of relation base/16384/16503
HINT:  This has been seen to occur with buggy kernels; consider updating your system.
client 8 aborted in state 9: ERROR:  unexpected data beyond EOF in block 0 of relation base/16384/16503
HINT:  This has been seen to occur with buggy kernels; consider updating your system.
client 0 aborted in state 9: ERROR:  unexpected data beyond EOF in block 0 of relation base/16384/16503
HINT:  This has been seen to occur with buggy kernels; consider updating your system.
client 11 aborted in state 9: ERROR:  unexpected data beyond EOF in block 0 of relation base/16384/16503
HINT:  This has been seen to occur with buggy kernels; consider updating your system.

知道是什么原因吗?

最佳答案

Gluster不支持“结构化数据”,如GlusterFS Install Guide中所述:
Gluster不支持所谓的“结构化数据”,即实时SQL数据库。当然,使用Gluster来备份和恢复数据库是很好的——Gluster在使用至少16KB大小的文件时传统上更好(最好是128KB左右)。
我的猜测是,当负荷很小时,Gluster几乎可以跟上复制,但当负荷增加到某一点以上时,Gluster会挣扎,可能会导致分裂大脑错误。
您可以使用命令gluster volume heal <volume_name> info split-brain查看split brain中的文件,或者使用命令gluster volume heal <volume_name> info查看所有需要修复的文件。

09-11 02:22