horribly slow gluster performance

vkhera

Member
Feb 24, 2015
192
15
18
Maryland, USA
I have a three-node cluster, all ZFS. One node is small used just for quorum.

I set up two of the nodes to hold gluster data in a ZFS data set on each. The set up and configuration was pretty straight forward, just gluster peer probe each other after installing the glusterfs-server package.

The volume was created as follows:

Code:
zfs create tank/gluster
mkdir /tank/gluster/brick

gluster volume create datastore replica 2 transport tcp pve1-cluster:/tank/gluster/brick pve2-cluster:/tank/gluster/brick
gluster volume start datastore
gluster volume info
# create /var/lib/glusterd/groups/virt as per Virt-store-usecase wiki page.
gluster volume set datastore group virt

The gluster wiki virt-store-usecase settings are:

Code:
quick-read=off
read-ahead=off
io-cache=off
stat-prefetch=off
eager-lock=enable
remote-dio=enable
quorum-type=auto
server-quorum-type=server

I moved a VM with a 32GB virtual disk from being on a ZFS volume to the glusterfs. The read/write performance became horribly, horribly slow. About 1/4 to 1/3 the speed on writes, and nearly infinity slower on the reads.

Specifically, a simple dd test run on the original ZFS backed VM:

Code:
/usr/bin/time dd if=/dev/urandom of=bigfile bs=8k count=204800

204800+0 records in
204800+0 records out
1677721600 bytes transferred in 72.410429 secs (23169613 bytes/sec)
       72.41 real         0.00 user         5.60 sys

The speed is pretty variable, ranging from 50 to 100 seconds, but not so bad.

Running the same test on the glusterfs backed VM takes upwards of 260 seconds or more:

Code:
1677721600 bytes transferred in 262.989241 secs (6379431 bytes/sec)

some other test runs show even slower, when turning off atime on the underlying ZFS dataset gluster is using (tank/gluster).

Code:
1677721600 bytes transferred in 403.081872 secs (4162235 bytes/sec)

The VM uses no-cache on the disk. I tried write-through but that was so slow I just killed the test.

I also tried to run an MD5 checksum on my "bigfile" file, and after an hour I killed it. There's no reason an md5 checksum on that file should take over an hour, especially after I just wrote it. On direct hardware this takes just a few seconds.

Now, I expected some slowdown due to the client-based replication, but this is downright unusable.

My questions are:

1) Is this expected slowdown?

2) If not, what can I do about it?
 
Are you using latest GlusterFS 3.7?

I have good enough performance with GlusterFS on ZFS RAID10 with 3-way replication. I get around 150-250MBps on average for read and write throughput.

Pretty much I left all GlusterFS and kernel parameters to their default settings and only tweaked some parameters as follows:
> GlusterFS 3.7 parameters:
nfs.trusted-sync: on
performance.cache-size: 1GB
performance.io-thread-count: 16
performance.write-behind-window-size: 8MB
performance.readdir-ahead: on
client.event-threads: 8
server.event-threads: 8
cluster.quorum-type: auto
cluster.server-quorum-type: server
cluster.server-quorum-ratio: 51%

> Kernel parameters:
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_fin_timeout = 15
net.core.somaxconn = 65535
vm.swappiness = 1
vm.dirty_ratio = 5
vm.dirty_background_ratio = 2
vm.min_free_kbytes = 524288 # this is on 128GB RAM


/chrone
 
  • Like
Reactions: correctonet
I'm running 3.5.2 as comes with PVE.

From where did you get those gluster settings? I'm using the recommended "virt" settings from the gluster wiki. There the cache is disabled. I don't understand that, but that seems to be the recommended configuration.
 
I'm running 3.5.2 as comes with PVE.

From where did you get those gluster settings? I'm using the recommended "virt" settings from the gluster wiki. There the cache is disabled. I don't understand that, but that seems to be the recommended configuration.
Hi vkhera,

From various places such as:
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!