Performance and memory pb with INN 2.3

Katsuhiro Kondou kondou at nec.co.jp
Wed Aug 2 03:14:06 UTC 2000


In article <20000801173256.A89091 at becile.teaser.fr>,
	Laurent Frigault <lfrigault at teaser.fr> wrote;

}         $c->xover($first,$last);

I don't think your problem caused by LISTGROUP, but XOVER.

} Is there a way to fix this or to disable the LISTGROUP primitive ?

How about attached?
-- 
Katsuhiro Kondou

--- storage/ov3/ov3.c.orig	Mon Jul 10 07:26:22 2000
+++ storage/ov3/ov3.c	Wed Aug  2 12:11:56 2000
@@ -484,6 +484,9 @@
 	if ((gh->indexmem = (INDEXENTRY *)mmap(0, gh->indexlen, PROT_READ, MAP_SHARED, 
 					       gh->indexfd, 0)) == (INDEXENTRY *)-1) {
 	    syslog(L_ERROR, "tradindexed: could not mmap index file for  %s: %m", gh->group);
+#if defined(MADV_DONTNEED) && defined(HAVE_MADVISE)
+	    madvise(gh->datamem, gh->datalen, MADV_DONTNEED);
+#endif
 	    munmap(gh->datamem, gh->datalen);
 	    return FALSE;
 	}
@@ -565,10 +568,18 @@
 STATIC void OV3closegroupfiles(GROUPHANDLE *gh) {
     close(gh->indexfd);
     close(gh->datafd);
-    if (gh->indexmem)
+    if (gh->indexmem) {
+#if defined(MADV_DONTNEED) && defined(HAVE_MADVISE)
+	madvise(gh->indexmem, gh->indexlen, MADV_DONTNEED);
+#endif
 	munmap((void *)gh->indexmem, gh->indexlen);
-    if (gh->datamem)
+    }
+    if (gh->datamem) {
+#if defined(MADV_DONTNEED) && defined(HAVE_MADVISE)
+	madvise(gh->datamem, gh->datalen, MADV_DONTNEED);
+#endif
 	munmap(gh->datamem, gh->datalen);
+    }
     if (gh->group)
 	DISPOSE(gh->group);
     DISPOSE(gh);



More information about the inn-workers mailing list