[Gluster-users] Way to improve GlusterFS performance for serving rails applications?

Horacio Sanson hsanson at gmail.com
Fri Oct 29 16:23:03 UTC 2010

I am testing GlusterFS for hosting Rails web applications but the performance 
is incredibly poor. 

I installed GLusterFS 3.1 in two servers (Ubuntu 10.10 LTS 64 bit)  with 1TB 
disk each formated with ext4. Then created a replicated volume:

sudo gluster volume create opt replica 2 transport tcp host1:/opt host2:/opt

then mounted the volume using the GlusterFS client on my web app server that 
contains my rails applications:

host1:/opt /opt glusterfs defaults,_netdev 0 0 # in /etc/fstab
mount -a

The problem is that if I run any rails application when stored in the gluster 
volume it take minutes to start and then each page load take 5~10 secs. If 
instead I run the rails app from the local hard disk in the same machine it 
goes fast as thunder.

To give an idea here is some output from rails log file:

# Using gluster to store the rails application takes 5.6 secs to render a page
Completed in 5645ms (View: 2948, DB: 46) | 200 OK 

# Using local storage it take 400ms to render the same page
Completed in 401ms (View: 296, DB: 34) | 200 OK

All machines (both storage and rails app) are connected to the same switch via 
1GB ethernet and there is no other traffic in that switch (is isolated).

The questions:

Am I doing something wrong or missing something or is this expected?

Are there any options I can set when mounting the partition to improve 

Are there any options I can use when creating the volume to improve 


Horacio Sanson

More information about the Gluster-users mailing list