[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a different glimpseserver fix
Hi Sam, hi all
Not there yet on the memory usage, but on the way I noticed something else
possibly of interest. Since I didn't have any indexes quite that large on my
live server, I installed glimpseindex on my new test machine - and got the
error,
glimpseserver: Cannot bind to socket: Cannot assign requested address
It turns out that the old main.c code had a not-quite-kosher way to assign the
server address using a memcpy. The following changes fixed it on my test box,
running Linux 2.2.14, I plan to check them in unless anyone has objections
(I'm not sure if inet_aton is generally available on all systems):
=================================================================== RCS file:
/disk2/cvs/glimpse/main.c,v retrieving revision 1.5
diff -r1.5 main.c
9a10,12
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <arpa/inet.h>
1022c1025,1029
< memcpy((caddr_t)&serv_addr.sin_addr, hp->h_addr, hp->h_length);
---
> /* memcpy((caddr_t)&serv_addr.sin_addr, hp->h_addr, hp->h_length); */
>
> inet_aton("127.0.0.1",&serv_addr.sin_addr);
>
>
Now I can go and try the large index & UNIX sockets...
--Golda
On Thu, 22 Jun 2000, you wrote:
> Hello all. I've got a question about glimpseserver. The man pages seems
> to suggest the glimpseserver reads the index into memory and uses the
> in-memory copy to serve searches quickly. This sounds great, but it
> doesn't seem to be happening. I have a 100MB index but the memory usage
> for glimpseserver never gets above 4MB or so. I therefore doubt that it
> is really reading the index into memory. Does anyone know if there is any
> way to get glimpseindex to actually read the index into memory?
>
> Oh, and while I'm here: has anyone gotten the USE_UNIXSOCKETS option
> working? Was this an abandoned development path or is there something
> working hidden here? It seems to me that using unix sockets could provide
> a small but real performance improvement for searches running against
> local glimpseservers.
>
> Thanks!
> -sam