]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Allow the hot object -> transit object transition point to be configurable,
authoradrian <>
Tue, 15 Aug 2000 13:14:03 +0000 (13:14 +0000)
committeradrian <>
Tue, 15 Aug 2000 13:14:03 +0000 (13:14 +0000)
rather than hard-coded at SM_PAGE_SIZE. This change should allow a higher
memory hitrate, and makes the current object memory code kind of behave like
the old 'all or nothing' hot object memory cache.

This change should now be placed in the handbook/FAQ somewhere.

ChangeLog
src/cf.data.pre
src/store_swapout.cc
src/structs.h

index 8b880c32d1a6ad7081178558068275c03a6a2a16..33b079a98b2e11ea0926a1849209e5853d15642e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -84,6 +84,10 @@ Changes to Squid-2.4.DEVEL4 ():
        - Made store dir selection algorithm configurable.
        - Added support for admin-definable extension methods,
          up to 20.
+       - Added 'maximum_object_size_in_memory' as a configuration option -
+         this defines the watermark where objects transit from being true
+         hot objects to being in-transit objects in memory. It currently
+         defaults to 8 KB.
 
 Changes to Squid-2.4.DEVEL3 ():
 
index 10a1a68d43d85532149cce4f27b91096e7b0040e..716a03a934750ffbb2b58e135c64129c767205d2 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.194 2000/07/18 06:16:41 wessels Exp $
+# $Id: cf.data.pre,v 1.195 2000/08/15 07:14:04 adrian Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -558,6 +558,18 @@ DOC_START
        means there is no minimum.
 DOC_END
 
+NAME: maximum_object_size_in_memory
+COMMENT: (bytes)
+TYPE: b_size_t
+DEFAULT: 8 KB
+LOC: Config.Store.maxInMemObjSize
+DOC_START
+        Objects greater than this size will not be attempted to kept in
+        the memory cache. This should be set high enough to keep objects
+        accessed frequently in memory to improve performance whilst low
+        enough to keep larger objects from hoarding cache_mem .
+DOC_END
+
 NAME: ipcache_size
 COMMENT: (number of entries)
 TYPE: int
index 9019802e97f7f5522f875014ce0d41c617f9c4f9..2732a8811e724927cf50b498e3daf33dbc42355d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapout.cc,v 1.74 2000/07/21 06:06:22 wessels Exp $
+ * $Id: store_swapout.cc,v 1.75 2000/08/15 07:14:04 adrian Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -144,7 +144,7 @@ storeSwapOut(StoreEntry * e)
      */
     if (mem->inmem_hi < lowest_offset)
        new_mem_lo = lowest_offset;
-    else if (mem->inmem_hi - lowest_offset > SM_PAGE_SIZE)
+    else if (mem->inmem_hi - lowest_offset > Config.Store.maxInMemObjSize)
        new_mem_lo = lowest_offset;
     else
        new_mem_lo = mem->inmem_lo;
index fcd8c8b3e47cf215bf5e6a235d72081ca153ad29..4f8192d63061d18e271025e5f590fd366b268294 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.349 2000/08/10 21:44:44 wessels Exp $
+ * $Id: structs.h,v 1.350 2000/08/15 07:14:04 adrian Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -378,6 +378,7 @@ struct _SquidConfig {
        size_t avgObjectSize;
        size_t maxObjectSize;
        size_t minObjectSize;
+       size_t maxInMemObjSize;
     } Store;
     struct {
        int high;