</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>allow-from</term>
+ <listitem>
+ <para>
+ Comma separated netmasks that are allowed to use the server. The default allows complete access!
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>client-tcp-timeout</term>
<listitem>
<term>local-address</term>
<listitem>
<para>
- Local IP address (singular) to bind to. Defaults to all addresses.
+ Local IP addresses to bind to, comma separated. Defaults to all addresses.
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>max-cache-entries</term>
+ <listitem>
+ <para>
+ Maximum number of cache entries. 1 million will generally suffice for most installations.
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>max-tcp-clients</term>
<listitem>
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>socket-dir</term>
+ <listitem>
+ <para>
+ Where to store the control socket. This option also works with the controller, <command>rec_control</command>.
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>trace</term>
<listitem>
struct timeval now;
gettimeofday(&now, 0);
- if(now.tv_sec - last_prune > 60) {
+ if(now.tv_sec - last_prune > 300) {
DTime dt;
dt.setTimeval(now);
RC.doPrune();
else
++i;
- // cerr<<"Pruned "<<pruned<<" records, left "<<SyncRes::s_negcache.size()<<"\n";
+ // cerr<<"Pruned "<<pruned<<" records, left "<<SyncRes::s_negcache.size()<<"\n";
// cout<<"Prune took "<<dt.udiff()<<"usec\n";
last_prune=time(0);
}
unsigned int cacheSize=d_cache.size();
- if(maxCached && cacheSize > maxCached)
+ if(maxCached && cacheSize > maxCached) {
toTrim = cacheSize - maxCached;
+ }
// cout<<"Need to trim "<<toTrim<<" from cache to meet target!\n";
typedef cache_t::nth_index<1>::type sequence_t;
sequence_t& sidx=d_cache.get<1>();
-
unsigned int tried=0, lookAt, erased=0;
// two modes - if toTrim is 0, just look through 10000 records and nuke everything that is expired
if(toTrim)
lookAt=5*toTrim;
else
- lookAt=cacheSize/50;
+ lookAt=cacheSize/10;
sequence_t::iterator iter=sidx.begin(), eiter;