I've just tried doing a replicated Gluster setup between 2 web servers. The performance was very poor with simple PHP file operations like file_exists and is_readable taking 15 - 30ms each. A require_once took 1.1 seconds.
Like most web setups, writes are very infrequent and reads are extremely common. The servers are 2xquad core Xeons, 8 gig ram and RAID 1 disks. There is a dedicated gigabit network between them. Its not the fastest way to set up GlusterFS but it shouldn't be this slow.
What is the best way to improve the situation? The documentation on GlusterFS tuning is lacking, and identifying Can where the bottlenecks are is very difficult.
I've seen some mentions that setting the files up distrubted not replicated can improve speed but that halves reliability and I'm looking to improve reliability (two webservers vs one) not decrease it. Is there a specific configuration involving caching and so on for this kind of work load? Can there be a cache for checking for a new copy of a file on the other server so as often as possible files are served instantly from the local hard disk?