DCC version 1.2.37

Vernon Schryver vjs@calcite.rhyolite.com
Fri Mar 26 13:16:18 UTC 2004


> From: Krzysztof Snopek

> Does this madvise or WILLNEED work automatically or needs to be configured
> by user ? 

It is automatic.

>           I can't find it in docs or sources ? I'm running 1.2.38 now.

The main stuff starts at line 1502 in srvrlib/db.c:

#ifdef MADV_WILLNEED
        } else if ((DB_IS_LOCKED() || db_rdonly)
                   && (DB_PTR)(db_fsize+hash_fsize) < db_max_rss) {
                /* Tell the kernel to keep entire buffers in RAM if
                 * we have plenty and if dbclean is not running or if
                 * this is dbclean */
                if (madv_willneed_ok
                    && 0 > madvise(p, db_page_size, MADV_WILLNEED)) {
                        dcc_trace_msg("madvise(MADV_WILLNEED): %s",
                                      ERROR_STR());
                        madv_willneed_ok = 0;
                }
#endif


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.