I currently have 2 web servers (CentOS 5.5) and am using GlusterFS as client/server on both using Automatic File Replication.
For both webservers:
The GlusterFS mount point is:
/mnt/glusterfs/site1
The local GlusterFS brick is
/export/sdb1/glusterfs/site1
I am using a bind mount to point to the GlusterFS mount in Apache:
/var/www/site -> /mnt/glusterfs/site1
The dynamic pages (where caching the page itself isn't an option) that require many small files to be read before the page is rendered, the performance with GlusterFS is at least 5 times slower than using the local filesystem. i.e. the local GlusterFS brick.
Note that I am using the option read-subvolume
option so that the files are read from the local GlusterFS brick but I understand that the metadata is checked on the other brick over the network which is what I assume is slowing things down.
Unfortunately I can't just get Apache to use the local GlusterFS brick as Apache itself does some writes.
Since /mnt/glusterfs/site1
and /export/sdb1/glusterfs/site1
are effectively the same filesystem is there any way for Apache to read directly off the local brick but write to the GlusterFS mount?
This would significantly increase performance.
I am aware of NFS, OCFS, GFS2, Lustre and DRBD but if it's possible to do the above, this would be the simplest solution.
Perhaps an Apache directive, Apache module (custom module even) or even at the system level?
I would appreciate any suggestions/comments/direction.