Search code examples
glusterfs

GlusterFS extremely slow (creating 100 empty files takes ~2 minutes)


I am trying glusterfs for the first time, I used this tutorial to get started:

https://www.digitalocean.com/community/tutorials/how-to-create-a-redundant-storage-pool-using-glusterfs-on-ubuntu-servers

And I did not create a separate partition like suggested in the official docs.

Everything is up and running on EC2 (ubuntu instances), but it is extremely slow creating 100 empty files takes around 2 minutes

time sudo touch file{1..100}

real    1m43.220s
user    0m0.008s
sys 0m0.004s

Am I missing something or doing something wrong ?

Current setup: I am using 2 servers and a client, all in the same region, the replication level is 2. This is the command I used to create the pool:

sudo gluster volume create myvolume replica 2 transport tcp host1:/gluster-storage host2:/gluster-storage force

CORRECTION: The client was in a different region, this is the speed when I create 100 files from a client inside the same region:

time sudo touch file{1..100}

real    0m1.237s
user    0m0.004s
sys 0m0.000s

I will leave the question open because I think 2 minutes to create empty files is too long even if the client is in a different region (Oregon -> N. Virginia)


Solution

  • As such stretched cluster (means across regions in your case) is NOT supported.

    Note, there are various communications happens back and forth between the nodes and then the client getting success reply.

    maybe you can try the same within same region(LAN) and check out the latency.