Changeset: 5a667cca538d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5a667cca538d
Modified Files:
        gdk/gdk_utils.c
Branch: Jan2014
Log Message:

Only start vmtrim by default on 32 bit architectures.
The idea is that the vmtrim thread unmaps BATs and destroys their hash
and imprints structures when memory pressure builds.  On 32 bit
systems, the memory pressure is a real problem since the address space
is so limited (and hence we really need to free up address space), but
on 64 bit architectures, the address space is huge, so we let the OS
page out memory pages without freeing the address space, so we don't
actually loose the work we did in building hashes and imprints.


diffs (23 lines):

diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -1123,7 +1123,18 @@ GDKinit(opt *set, int setlen)
                GDKsetenv("monet_pid", buf);
        }
 
-       if ((p = mo_find_option(set, setlen, "gdk_vmtrim")) == NULL ||
+       /* only start vmtrim thread when explicitly asked to do so or
+        * when on a 32 bit architecture and not told to not start
+        * it */
+       p = mo_find_option(set, setlen, "gdk_vmtrim");
+       if (
+#if SIZEOF_VOID_P == 4
+           /* 32 bit architecture */
+           p == NULL ||        /* default is yes */
+#else
+           /* 64 bit architecture */
+           p != NULL &&        /* default is no */
+#endif
            strcasecmp(p, "yes") == 0)
                MT_create_thread(&GDKvmtrim_id, GDKvmtrim, &GDK_mem_maxsize,
                                 MT_THR_JOINABLE);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to