Stuart Hungerford
2007-May-22 02:11 UTC
[Ferret-talk] acts as ferret, make index in /tmp then copy back to avoid NFS slowness?
Hi, We''re happily using Ferret through acts_as_ferret on a Rails website, but we have an issue with rebuilding indexes. The Rails project directories are on an NFS mounted volume and running Model.rebuld_index there seems to take 60-100 times longer than it does on a local filesystem (e.g. /tmp). What we''d like to do is rebuild our indexes in say /tmp, then copy them back when done to the NFS volume with the Rails directories. Is there any simple way to get Model.rebuild_index to build indexes in a different place, or do we need to take another approach? Thanks in advance, Stu -- Stuart Hungerford ANUSF Data Intensive Projects
Jens Kraemer
2007-May-22 09:33 UTC
[Ferret-talk] acts as ferret, make index in /tmp then copy back to avoid NFS slowness?
On Tue, May 22, 2007 at 12:11:36PM +1000, Stuart Hungerford wrote:> Hi, > > We''re happily using Ferret through acts_as_ferret on a Rails website, > but we have an issue with rebuilding indexes. > > The Rails project directories are on an NFS mounted volume and > running Model.rebuld_index there seems to take 60-100 times longer > than it does on a local filesystem (e.g. /tmp). > > What we''d like to do is rebuild our indexes in say /tmp, then copy > them back when done to the NFS volume with the Rails directories. > > Is there any simple way to get Model.rebuild_index to build indexes > in a different place, or do we need to take another approach?If you use the DRb server it would be relatively easy since that (at least in svn trunk) does index rebuilds in a separate directory independent from the current index that is in use for searching. By default the rebuild directory is named RAILS_ROOT/index/class_name/rebuild should be relatively easy to hack or even make this a configuration option. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa