hot object memory patch

From: Adrian Chadd <adrian@dont-contact.us>
Date: Thu, 10 Aug 2000 02:41:46 +0800

Hi,

Thought this might be ofuse to some people. Instead of trying to keep objects
less than SM_PAGE_SIZE in memory as 'hot objects', it now makes that amount
a configurable parameter. This should make the current transit cache a little
more like the hot object cache from yesteryear.

Comments? If I don't hear anything I'll commit this next week.

Adrian

Index: cf.data.pre
===================================================================
RCS file: /server/cvs-server/squid/squid/src/cf.data.pre,v
retrieving revision 1.194
diff -u -r1.194 cf.data.pre
--- cf.data.pre 2000/07/18 06:16:41 1.194
+++ cf.data.pre 2000/08/09 18:27:23
@@ -1,6 +1,6 @@
 
 #
-# $Id$
+# $Id: cf.data.pre,v 1.194 2000/07/18 06:16:41 wessels Exp $
 #
 #
 # SQUID Internet Object Cache http://squid.nlanr.net/Squid/
@@ -556,6 +556,18 @@
         Objects smaller than this size will NOT be saved on disk. The
         value is specified in kilobytes, and the default is 0 KB, which
         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
Index: store_swapout.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/store_swapout.c,v
retrieving revision 1.74
diff -u -r1.74 store_swapout.c
--- store_swapout.c 2000/07/21 06:06:22 1.74
+++ store_swapout.c 2000/08/09 18:27:24
@@ -1,6 +1,6 @@
 
 /*
- * $Id$
+ * $Id: store_swapout.c,v 1.74 2000/07/21 06:06:22 wessels Exp $
  *
  * DEBUG: section 20 Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -144,7 +144,7 @@
      */
     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: structs.h
===================================================================
RCS file: /server/cvs-server/squid/squid/src/structs.h,v
retrieving revision 1.348
diff -u -r1.348 structs.h
--- structs.h 2000/07/16 04:24:22 1.348
+++ structs.h 2000/08/09 18:27:51
@@ -1,6 +1,6 @@
 
 /*
- * $Id$
+ * $Id: structs.h,v 1.348 2000/07/16 04:24:22 wessels Exp $
  *
  *
  * SQUID Internet Object Cache http://squid.nlanr.net/Squid/
@@ -378,6 +378,7 @@
         size_t avgObjectSize;
         size_t maxObjectSize;
         size_t minObjectSize;
+ size_t maxInMemObjSize;
     } Store;
     struct {
         int high;
Received on Wed Aug 09 2000 - 12:41:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:34 MST