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?


You can try mounting gluster via NFS and the performance will be much better because of the caching done by the NFS client.

Alternatively you can also enable prefetch for small files and increase the cache by using gluster set volume option (use gluster help to view all the options).

If you don't have a lot of writing going on maybe rsyncing the directories would be a better option for your scenario.

| improve this answer | |
  • I did try various cache options but I never seemed to get a sweet spot. It seems to be very difficult to get any feedback on if a setting is working well or not. As for rsync, with the number of files it would take 72 hours+ to do a full rsync. Its much better to catch writes in the filesystem layer. – Nick Apr 29 '12 at 6:42
  • 1
    The first rsync always takes longer, but the next will be faster. as for gluster if you have many small files nfs would help. – Jure1873 Apr 29 '12 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.