Horacio Sanson
2010-Oct-29 16:23 UTC
[Gluster-users] Way to improve GlusterFS performance for serving rails applications?
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 performance? Are there any options I can use when creating the volume to improve performance? -- regards, Horacio Sanson
Joe Landman
2010-Oct-29 16:27 UTC
[Gluster-users] Way to improve GlusterFS performance for serving rails applications?
On 10/29/2010 12:23 PM, Horacio Sanson wrote:> 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.This sounds like a locking or a stat issue ... though there could be something else going on.> > 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 > performance?What do your client configs look like? -- Joseph Landman, Ph.D Founder and CEO Scalable Informatics Inc. email: landman at scalableinformatics.com web : http://scalableinformatics.com http://scalableinformatics.com/jackrabbit phone: +1 734 786 8423 x121 fax : +1 866 888 3112 cell : +1 734 612 4615
pkoelle
2010-Oct-29 19:41 UTC
[Gluster-users] Way to improve GlusterFS performance for serving rails applications?
Am 29.10.2010 18:23, schrieb Horacio Sanson: [ ... rails via gluster mount ....] Hi Horacio,> The questions: > > Am I doing something wrong or missing something or is this expected?I don't think you are doing something wrong. We tried the same (serving rails apps off of gluster mounts) and performance was terrible. Since there is no lock manager in gluster, the gluster client needs to check all server nodes when the file is accessed locally. This kills performance with many small files. cheers Paul -- this message was sent from my 7 years old Dell D800