[Xapian-discuss] Performance of remote database
Olly Betts
olly at survex.com
Tue Nov 7 21:05:08 GMT 2006
On Tue, Nov 07, 2006 at 07:35:58PM +0000, Rafael SDM Sierra wrote:
> WOW!!! 1000 documents in 4 seconds, it's a good change, using
>
> xapian_index =
> xapian.remote_open_writable('/usr/local/xapian-0.9.8/bin/xapian-progsrv','--writable
> /path/to/database')
>
> It was very better, so, the problem is not with the serializator,
> possibility number 2 discarted
And I don't think it's the network as you should definitely be running
over the loopback interface when you use 127.0.0.1.
Try applying the attached patch which seems to help xapian-tcpsrv
performance on the testsuite at least.
Another interesting thing to try might be (you'll need to have ssh
public/private keys set up for 127.0.0.1 so you don't need to type your
password):
xapian_index = xapian.remote_open_writable('ssh', '127.0.0.1 /usr/local/xapian-0.9.8/bin/xapian-progsrv --writable /path/to/database')
Cheers,
Olly
-------------- next part --------------
Index: net/tcpserver.cc
===================================================================
--- net/tcpserver.cc (revision 7451)
+++ net/tcpserver.cc (working copy)
@@ -31,6 +31,7 @@
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
+#include <netinet/tcp.h>
#include <arpa/inet.h>
#ifdef __WIN32__
# include <winsock2.h>
@@ -94,6 +95,12 @@
SO_REUSEADDR,
reinterpret_cast<void *>(&optval),
sizeof(optval));
+
+ if (retval >= 0) {
+ retval = setsockopt(socketfd, IPPROTO_TCP, TCP_NODELAY,
+ reinterpret_cast<void *>(&optval),
+ sizeof(optval));
+ }
}
if (retval < 0) {
More information about the Xapian-discuss
mailing list