Hi people I've got a project which uses Xapian for searches (duh). It's being developed on Linux and OS X (10.4) using PHP 5 (SWIG-bindings). On both the development machines the searches run as fast as expected but on the live machine (Linux 2.4.22) the searches take seconds (2-7 seconds). And the live machine is much faster than the devel machines. The index is split, sub_index_0 = 1.7 GB, sub_index_1 = 50 MB, and it's a Flint database/index. Got some information from xapian-config (not sure if it's helpful or not): # ./xapian-config --cxxflags -I/home/wrk/apache_php5/xapian-core-0.9.9/include # ./xapian-config --libs ./xapian-config: Use libtool and 'xapian-config --ltlibs' to link with an uninstalled libxapian. # ./xapian-config --ltlibs libxapian.la # ./xapian-config --swigflags -I/home/wrk/apache_php5/xapian-core-0.9.9/include quartzcheck (couldn't find any flintcheck, but quartzcheck seems to be happy) returns the following: sub_index_0 ----------- record: baseB blocksize=8K items=250001 lastblock=4662 revision=27 levels=2 root=65 B-tree checked okay record table structure checked OK termlist: baseB blocksize=8K items=250000 lastblock=50169 revision=27 levels=2 root=9 B-tree checked okay termlist table structure checked OK postlist: baseB blocksize=8K items=9419013 lastblock=154384 revision=27 levels=3 root=11 B-tree checked okay postlist table structure checked OK position: baseB blocksize=8K items=1591373 lastblock=8012 revision=27 levels=2 root=225 B-tree checked okay position table structure checked OK value: baseB blocksize=8K items=250000 lastblock=1486 revision=27 levels=2 root=7 B-tree checked okay value table structure checked OK No errors found sub_index_1 ----------- record: baseA blocksize=8K items=6740 lastblock=157 revision=2 levels=1 root=62 B-tree checked okay record table structure checked OK termlist: baseA blocksize=8K items=6739 lastblock=1543 revision=2 levels=2 root=664 B-tree checked okay termlist table structure checked OK postlist: baseA blocksize=8K items=266182 lastblock=4376 revision=2 levels=2 root=1964 B-tree checked okay postlist table structure checked OK position: baseA blocksize=8K items=41709 lastblock=211 revision=2 levels=1 root=81 B-tree checked okay position table structure checked OK value: baseA blocksize=8K items=6739 lastblock=40 revision=2 levels=1 root=17 B-tree checked okay value table structure checked OK No errors found I'm lost! Any help is, of course, welcome :) Thanks in advance! Kind regards, Daniel Andersson
On Thu, Jan 25, 2007 at 10:02:59PM +0200, Daniel Andersson wrote:> On both the development machines the searches run as fast as expected > but on the live machine (Linux 2.4.22) the searches take seconds (2-7 > seconds). And the live machine is much faster than the devel machines.What do you mean by "faster"? Raw CPU speed isn't usually the limiting factor for a large database - does it have at least as much RAM and a disk subsystem which as at least as fast? Also, is the live machine doing a lot of other work?> The index is split, sub_index_0 = 1.7 GB, sub_index_1 = 50 MB, and > it's a Flint database/index. > > Got some information from xapian-config (not sure if it's helpful or > not):No, that's just where you've installed Xapian - it's not relevant here.> quartzcheck (couldn't find any flintcheck, but quartzcheck seems to > be happy) returns the following:There isn't currently a program for checking flint databases. Both flint and quartz use essentially the same Btree table manager but the structure inside these isn't quite the same and the names are different ("." rather than "_") so quartzcheck should be able to successfully check a flint database (it failed when I just tried it). What does "ls -l sub_index_0" show? Cheers, Olly